Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport fix/feature to stable 2.2 #1171

Merged
merged 13 commits into from
Mar 24, 2023

Commits on Mar 23, 2023

  1. builder: support --parent-bootstrap for merge

    This option allows merging multiple bootstraps of upper layer with
    the bootstrap of a parent image, so that we can implement container
    commit operation for nydus image.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    7e65027 View commit details
    Browse the repository at this point in the history
  2. smoke: add --parent-bootstrap for merge test

    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    a2ad16d View commit details
    Browse the repository at this point in the history
  3. rafs: do not fix blob id for old bootstrap

    In fact, there is no way to tell if a separate old bootstrap file
    was inline to the blob, for example, for an old merged bootstrap,
    we can't set the blob id it references to as the filename, otherwise
    it will break blob table on loading rafs.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    b0f5edb View commit details
    Browse the repository at this point in the history
  4. nydusify: fix pulling all platforms of source image

    We should only handle specific platform for pulling by
    `platforms.MatchComparer`, otherwise nydusify will pull
    the layer data of all platforms for an source image.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    da8083c View commit details
    Browse the repository at this point in the history
  5. nydusify: fix --oci option for convert subcommand

    The `--oci` option is not working, we make it reverse before,
    this patch fix it and keep compatibility with the old option
    `--docker-v2-format`.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    b60e92a View commit details
    Browse the repository at this point in the history
  6. nydusify: fix unnecessary golang-lint error

    ```
    golangci-lint run
    Error: pkg/converter/provider/ported.go:47:64: SA1019: rCtx.ConvertSchema1 is deprecated: use Schema 2 or OCI images. (staticcheck)
    	if desc.MediaType == images.MediaTypeDockerSchema1Manifest && rCtx.ConvertSchema1 {
    	                                                              ^
    Error: pkg/converter/provider/ported.go:20:2: SA1019: "github.com/containerd/containerd/remotes/docker/schema1" is deprecated: use images formatted in Docker Image Manifest v2, Schema 2, or OCI Image Spec v1. (staticcheck)
    	"github.com/containerd/containerd/remotes/docker/schema1"
    	^
    ```
    
    Disabled the check, it's unnecessary to check the ported codes.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    37e382c View commit details
    Browse the repository at this point in the history
  7. nydusify: forcibly enabled --oci option when --oci-ref be enabled

    We need to forcibly enable `--oci` option for allowing to append
    related annotation for zran image, otherwise an error be thrown:
    
    ```
    merge nydus layers: invalid label containerd.io/snapshot/nydus-ref=: invalid checksum digest format
    ```
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    3fb31b9 View commit details
    Browse the repository at this point in the history
  8. rafs: fix amplify can not be skipped

    ``` json
    {
        "device":{
            "backend":{
                "type":"registry",
                "config":{
                    "readahead":false,
                    "host":"dockerhub.kubekey.local",
                    "repo":"dfns/alpine",
                    "auth":"YWRtaw46SGFyYm9VMTIZNDU=",
                    "scheme":"https",
                    "skip_verify":true,
                    "proxy":{
                        "fallback":false
                    }
                }
            },
            "cache":{
                "type":"",
                "config":{
                    "work_dir":"/var/lib/containerd-nydus/cache",
                    "disable_indexed_map":false
                }
            }
        },
        "mode":"direct",
        "digest_validate":false,
        "jostats_files":true,
        "enable_xattr":true,
        "access_pattern":true,
        "latest_read_files":true,
        "batch_size":0,
        "amplify_io":0,
        "fs_prefetch":{
            "enable":false,
            "prefetch_all":false,
            "threads_count":10,
            "merging_size":131072,
            "bandwidth_rate":1048576,
            "batch_size":0,
            "amplify_io":0
        }
    }
    ```
    `{.fs_prefetch.merging_size}` is used, instead of `{.amplify_io}`
    
    Signed-off-by: 泰友 <cuichengxu.ccx@antgroup.com>
    泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    62d213e View commit details
    Browse the repository at this point in the history
  9. nydusify: fix oci media type handle

    Bump nydus snapshotter v0.7.3 and bring some fixups:
    
    1. If the original image is already an OCI type, we should forcibly set the bootstrap layer to the OCI type.
    2. We need to append history item for bootstrap layer, to ensure the history consistency, see: https://github.com/distribution/distribution/blob/e5d5810851d1f17a5070e9b6f940d8af98ea3c29/manifest/schema1/config_builder.go#L136
    
    Related PR: containerd/nydus-snapshotter#427, goharbor/acceleration-service#119
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    009443b View commit details
    Browse the repository at this point in the history
  10. nydusify: cleanup work directory when conversion finish

    Remove the work directory to clean up the temporary image
    blob data after the conversion is finished.
    
    We should only clean up when the work directory not exists
    before, otherwise it may delete user data by mistake.
    
    Fix: dragonflyoss#1162
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    d885d1a View commit details
    Browse the repository at this point in the history
  11. fix: ci: actions are not triggered for stable/v2.2

    Signed-off-by: 泰友 <cuichengxu.ccx@antgroup.com>
    泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    6973d9d View commit details
    Browse the repository at this point in the history
  12. ci test: fix bug of compiling nydus-snapshotter

    Since developers changed "make clear" to "make clean" in the Makefile
    in nydus-snapshotter, it also needs to be updated in ci test.
    Signed-off-by: Yiqun Leng <yqleng@linux.alibaba.com>
    yqleng1987 authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    3c4ceb6 View commit details
    Browse the repository at this point in the history
  13. deps: bump tempfile version to 3.4.0

    Update tempfile related crates to fix GHSA-mc8h-8q98-g5hr
    
    Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
    adamqqqplay authored and 泰友 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    3031f75 View commit details
    Browse the repository at this point in the history