Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: containerd/containerd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5ff8fce1fcc6
Choose a base ref
...
head repository: containerd/containerd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.6.3
Choose a head ref
  • 14 commits
  • 31 files changed
  • 8 contributors

Commits on Apr 2, 2022

  1. [release/1.6] go.mod: update image-spec to merge-commit of v1 into main

    This is a follow-up to 7ede40c, where we pinned
    the version of this dependency to prevent go modules rolling it back.
    
    This patch updates the version to use the merge-commit that merged the v1.0
    release branch back to the main branch in github.com/opencontainers/image-spec,
    so that go modules considers it "more recent" and doesn't roll back.
    
    Updating does not introduce changes in the vendored code, as changs of the merged
    commits were either already in the main branch, or only affected non-code files.
    
    - full diff: opencontainers/image-spec@693428a...c5a74bc
    - raw diff: https://github.com/opencontainers/image-spec/compare/693428a734f5..c5a74bcca799
    
    Thanks to Tõnis Tiigi for pointing to this commit!
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    8b81a78 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6766 from thaJeztah/1.6_fix_pseudo_version

    [release/1.6] go.mod: update image-spec to merge-commit of v1 into main
    AkihiroSuda authored Apr 2, 2022
    Configuration menu
    Copy the full SHA
    4f30dda View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2022

  1. metrics/cgroups: fix deadlock issue in Add during Collect

    The Collector.Collect will be the field ns'Collect's callback, which be
    invoked periodically with internal lock. And Collector.Add also runs
    with ns.Lock in Collector.Lock, which is easy to cause deadlock.
    
    Goroutine X:
    
    	ns.Collect
    	  ns.Lock
    	    Collector.Collect
    	      Collector.RLock
    
    Goroutine Y:
    
    	Collector.Add
    	  Collector.Lock
    	    ns.Lock
    
    We should use ns.Lock without Collector.Lock in Add.
    
    Fix: #6772
    
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    (cherry picked from commit 8a1280b)
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 11, 2022
    Configuration menu
    Copy the full SHA
    fe6ba62 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6801 from fuweid/cherry-pick-6772

    [release/1.6] metrics/cgroups: fix deadlock issue in Add during Collect
    Kazuyoshi Kato authored Apr 11, 2022
    Configuration menu
    Copy the full SHA
    eed3a2a View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2022

  1. check for duplicate nspath possibilities

    (cherry picked from commit 147f0a7)
    Signed-off-by: Mike Brown <brownwm@us.ibm.com>
    mikebrow committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    c09cc12 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6813 from mikebrow/cherrypick-#6806-release-1.6

    [release/1.6] check for duplicate nspath possibilities
    dmcgowan authored Apr 15, 2022
    Configuration menu
    Copy the full SHA
    b7bce90 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. [release/1.6] update golang to 1.17.9

    go1.17.9 (released 2022-04-12) includes security fixes to the crypto/elliptic
    and encoding/pem packages, as well as bug fixes to the linker and runtime. See
    the Go 1.17.9 milestone on the issue tracker for details:
    
    Includes fixes for:
    
    - CVE-2022-24675 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24675)
    - CVE-2022-28327 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-28327)
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    9cd76d4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6823 from thaJeztah/1.6_backport_bump_golang_1.17.9

    [release/1.6] update golang to 1.17.9
    estesp authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    64d2cf4 View commit details
    Browse the repository at this point in the history
  3. CRI: improve image pulling performance

    Background:
    
    With current design, the content backend uses key-lock for long-lived
    write transaction. If the content reference has been marked for write
    transaction, the other requestes on the same reference will fail fast with
    unavailable error. Since the metadata plugin is based on boltbd which
    only supports single-writer, the content backend can't block or handle
    the request too long. It requires the client to handle retry by itself,
    like OpenWriter - backoff retry helper. But the maximum retry interval
    can be up to 2 seconds. If there are several concurrent requestes fo the
    same image, the waiters maybe wakeup at the same time and there is only
    one waiter can continue. A lot of waiters will get into sleep and we will
    take long time to finish all the pulling jobs and be worse if the image
    has many more layers, which mentioned in issue #4937.
    
    After fetching, containerd.Pull API allows several hanlers to commit
    same ChainID snapshotter but only one can be done successfully. Since
    unpack tar.gz is time-consuming job, it can impact the performance on
    unpacking for same ChainID snapshotter in parallel.
    
    For instance, the Request 2 doesn't need to prepare and commit, it
    should just wait for Request 1 finish, which mentioned in pull
    request #6318.
    
    ```text
    	Request 1	Request 2
    
    	Prepare
    	   |
    	   |
    	   |
    	   |		Prepare
    	Commit		   |
    			   |
    			   |
    			   |
    			Commit(failed on exist)
    ```
    
    Both content backoff retry and unnecessary unpack impacts the performance.
    
    Solution:
    
    Introduced the duplicate suppression in fetch and unpack context. The
    deplicate suppression uses key-mutex and single-waiter-notify to support
    singleflight. The caller can use the duplicate suppression in different
    PullImage handlers so that we can avoid unnecessary unpack and spin-lock
    in OpenWriter.
    
    Test Result:
    
    Before enhancement:
    
    ```bash
    ➜  /tmp sudo bash testing.sh "localhost:5000/redis:latest" 20
    crictl pull localhost:5000/redis:latest (x20) takes ...
    
    real	1m6.172s
    user	0m0.268s
    sys	0m0.193s
    
    docker pull localhost:5000/redis:latest (x20) takes ...
    
    real	0m1.324s
    user	0m0.441s
    sys	0m0.316s
    
    ➜  /tmp sudo bash testing.sh "localhost:5000/golang:latest" 20
    crictl pull localhost:5000/golang:latest (x20) takes ...
    
    real	1m47.657s
    user	0m0.284s
    sys	0m0.224s
    
    docker pull localhost:5000/golang:latest (x20) takes ...
    
    real	0m6.381s
    user	0m0.488s
    sys	0m0.358s
    ```
    
    With this enhancement:
    
    ```bash
    ➜  /tmp sudo bash testing.sh "localhost:5000/redis:latest" 20
    crictl pull localhost:5000/redis:latest (x20) takes ...
    
    real	0m1.140s
    user	0m0.243s
    sys	0m0.178s
    
    docker pull localhost:5000/redis:latest (x20) takes ...
    
    real	0m1.239s
    user	0m0.463s
    sys	0m0.275s
    
    ➜  /tmp sudo bash testing.sh "localhost:5000/golang:latest" 20
    crictl pull localhost:5000/golang:latest (x20) takes ...
    
    real	0m5.546s
    user	0m0.217s
    sys	0m0.219s
    
    docker pull localhost:5000/golang:latest (x20) takes ...
    
    real	0m6.090s
    user	0m0.501s
    sys	0m0.331s
    ```
    
    Test Script:
    
    localhost:5000/{redis|golang}:latest is equal to
    docker.io/library/{redis|golang}:latest. The image is hold in local registry
    service by `docker run -d -p 5000:5000 --name registry registry:2`.
    
    ```bash
    
    image_name="${1}"
    pull_times="${2:-10}"
    
    cleanup() {
      ctr image rmi "${image_name}"
      ctr -n k8s.io image rmi "${image_name}"
      crictl rmi "${image_name}"
      docker rmi "${image_name}"
      sleep 2
    }
    
    crictl_testing() {
      for idx in $(seq 1 ${pull_times}); do
        crictl pull "${image_name}" > /dev/null 2>&1 &
      done
      wait
    }
    
    docker_testing() {
      for idx in $(seq 1 ${pull_times}); do
        docker pull "${image_name}" > /dev/null 2>&1 &
      done
      wait
    }
    
    cleanup > /dev/null 2>&1
    
    echo 3 > /proc/sys/vm/drop_caches
    sleep 3
    echo "crictl pull $image_name (x${pull_times}) takes ..."
    time crictl_testing
    echo
    
    echo 3 > /proc/sys/vm/drop_caches
    sleep 3
    echo "docker pull $image_name (x${pull_times}) takes ..."
    time docker_testing
    ```
    
    Fixes: #4937
    Close: #4985
    Close: #6318
    
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    (cherry picked from commit 8113758)
    Signed-off-by: Davanum Srinivas <davanum@gmail.com>
    fuweid authored and dims committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    1764ea9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ec44f6b View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2022

  1. tracing: fix panic on startup when configured

    When support for http/protobuf was added, the OTLP tracing processor
    plugin was mistakenly changed to return a raw OTLP exporter instance.
    Consequently, the type-assertion to a trace.SpanProcessor inside the
    tracing pluigin would panic if the processor plugin was configured.
    Modify the OTLP plugin to return a BatchSpanProcessor derived from the
    exporter once more.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit 927b34e)
    Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
    corhere authored and Kazuyoshi Kato committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    e8da82a View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6853 from kzys/16-backport-6789

    [release/1.6] tracing: fix panic on startup when configured
    dmcgowan authored Apr 25, 2022
    Configuration menu
    Copy the full SHA
    595e77b View commit details
    Browse the repository at this point in the history
  3. Prepare release notes for v1.6.3

    Signed-off-by: Derek McGowan <derek@mcg.dev>
    dmcgowan committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    baa386d View commit details
    Browse the repository at this point in the history
  4. Merge pull request #6844 from dmcgowan/prepare-1.6.3

    Prepare release notes for v1.6.3
    dmcgowan authored Apr 25, 2022
    Configuration menu
    Copy the full SHA
    f830866 View commit details
    Browse the repository at this point in the history
Loading