8000 [release-1.32] Backport containers common/image/storage by hswong3i · Pull Request #8974 · cri-o/cri-o · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[release-1.32] Backport containers common/image/storage #8974

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

Open
wants to merge 1 commit into
base: release-1.32
Choose a base branch
from

Conversation

hswong3i
Copy link
Contributor
@hswong3i hswong3i commented Feb 3, 2025

What type of PR is this?

/kind bug
/kind dependency-change

What this PR does / why we need it:

Original CRI-O v1.32.0 release keep crashing when working with Kubernetes v1.32.1, containers could create correctly.

Once backport following go mod from main branch, problem get solved:

  • github.com/containers/common@v0.61.1
  • github.com/containers/image/v5@v5.33.1
  • github.com/containers/storage@v1.56.1

Code updated with following commands:

go get github.com/containers/common@v0.61.1
go get github.com/containers/storage@v1.56.1
go get github.com/containers/image/v5@v5.33.1
go mod tidy
go mod download
go mod vendor
git add --all --force vendor/

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

[release-1.32] Backport containers common/image/storage

@hswong3i hswong3i requested a review from mrunalp as a code owner February 3, 2025 05:18
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/dependency-change Categorizes issue or PR as related to changing dependencies labels Feb 3, 2025
Copy link
Contributor
openshift-ci bot commented Feb 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hswong3i
Once this PR has been reviewed and has the lgtm label, please assign haircommander for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 3, 2025
8000
Copy link
Contributor
openshift-ci bot commented Feb 3, 2025

Hi @hswong3i. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.03%. Comparing base (318db72) to head (76a05ba).
Report is 18 commits behind head on release-1.32.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.32    #8974      +/-   ##
================================================
- Coverage         47.03%   47.03%   -0.01%     
================================================
  Files               154      154              
  Lines             22170    22170              
================================================
- Hits              10428    10427       -1     
- Misses            10672    10673       +1     
  Partials           1070     1070              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haircommander
Copy link
Member

hm do you have an idea of the commit is fixing this? our vendoring scheme is a bit complex and we may need to cherry-pick something rather than bumping

hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Feb 4, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.1-1.spec
    cp ../cri-o*1.32.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.1/
    rm -rf ../cri-o*1.32.1*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
@hswong3i
Copy link
Contributor Author
hswong3i commented Feb 4, 2025

hm do you have an idea of the commit is fixing this? our vendoring scheme is a bit complex and we may need to cherry-pick something rather than bumping

I try to cherry-pick 1005e0e to release-1.32 but seems too much update.

I couldn't even run make binaries correctly with following error message:

go build -trimpath  -ldflags '-s -w -X github.com/cri-o/cri-o/internal/version.buildDate='2025-02-04T07:15:09Z' ' -tags "containers_image_ostree_stub apparmor exclude_graphdriver_btrfs btrfs_noversion  seccomp selinux  exclude_graphdriver_devicemapper" -o bin/crio ./cmd/crio
# github.com/opencontainers/runc/libcontainer/utils
vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go:337:56: cannot use int(mode) (value of type int) as os.FileMode value in argument to securejoin.MkdirAllHandle
make: *** [Makefile:215: bin/crio] Error 1

@sohankunkerkar
Copy link
Member

@hswong3i I checked out the release-1.32, and tried running make binaries; it didn't give me any errors, though. Do you want to try that once?

@hswong3i
Copy link
Contributor Author
hswong3i commented Feb 5, 2025

Build directly with release-1.32: build ok, runtime crash in create containers.

Build with release-1.32 + this PR: build ok, runtime ok

Build with release-1.32 + cherry-pick that huge commit from master: build failed

@sohankunkerkar
Copy link
Member

Build directly with release-1.32: build ok, runtime crash in create containers.

$ sudo crictl run test/testdata/container_sleep.json test/testdata/sandbox_config.json 
DEBU[0000] get image connection                         
DEBU[0000] get runtime connection                       
DEBU[0000] RunPodSandboxRequest: &RunPodSandboxRequest{Config:&PodSandboxConfig{Metadata:&PodSandboxMetadata{Name:podsandbox1,Uid:redhat-test-crio,Namespace:redhat.test.crio,Attempt:1,},Hostname:crictl_host,LogDirectory:,DnsConfig:&DNSConfig{Servers:[8.8.8.8],Searches:[],Options:[],},PortMappings:[]*PortMapping{},Labels:map[string]string{group: test,},Annotations:map[string]string{com.example.test: sandbox annotation,owner: hmeng,security.alpha.kubernetes.io/seccomp/pod: unconfined,},Linux:&LinuxPodSandboxConfig{CgroupParent:pod_123-456.slice,SecurityContext:&LinuxSandboxSecurityContext{NamespaceOptions:&NamespaceOption{Network:POD,Pid:CONTAINER,Ipc:POD,TargetId:,UsernsOptions:nil,},SelinuxOptions:&SELinuxOption{User:system_u,Role:system_r,Type:svirt_lxc_net_t,Level:s0:c4,c5,},RunAsUser:nil,ReadonlyRootfs:false,SupplementalGroups:[],Privileged:false,SeccompProfilePath:,RunAsGroup:nil,Seccomp:nil,Apparmor:nil,},Sysctls:map[string]string{},Overhead:nil,Resources:nil,},Windows:nil,},RuntimeHandler:,} 
DEBU[0000] RunPodSandboxResponse: 59d9db45b9a0a5c4ac51cffb2e8f34af2fc46210896244fce7d4e2d582590da8 
DEBU[0000] PullImageRequest: &PullImageRequest{Image:&ImageSpec{Image:quay.io/crio/fedora-crio-ci:latest,Annotations:map[string]string{},UserSpecifiedImage:,RuntimeHandler:,},Auth:nil,SandboxConfig:&PodSandboxConfig{Metadata:&PodSandboxMetadata{Name:podsandbox1,Uid:redhat-test-crio,Namespace:redhat.test.crio,Attempt:1,},Hostname:crictl_host,LogDirectory:,DnsConfig:&DNSConfig{Servers:[8.8.8.8],Searches:[],Options:[],},PortMappings:[]*PortMapping{},Labels:map[string]string{group: test,},Annotations:map[string]string{com.example.test: sandbox annotation,owner: hmeng,security.alpha.kubernetes.io/seccomp/pod: unconfined,},Linux:&LinuxPodSandboxConfig{CgroupParent:pod_123-456.slice,SecurityContext:&LinuxSandboxSecurityContext{NamespaceOptions:&NamespaceOption{Network:POD,Pid:CONTAINER,Ipc:POD,TargetId:,UsernsOptions:nil,},SelinuxOptions:&SELinuxOption{User:system_u,Role:system_r,Type:svirt_lxc_net_t,Level:s0:c4,c5,},RunAsUser:nil,ReadonlyRootfs:false,SupplementalGroups:[],Privileged:false,SeccompProfilePath:,RunAsGroup:nil,Seccomp:nil,Apparmor:nil,},Sysctls:map[string]string{},Overhead:nil,Resources:nil,},Windows:nil,},} 
DEBU[0001] PullImageResponse: &PullImageResponse{ImageRef:quay.io/crio/fedora-crio-ci@sha256:7f3bd3e9c21eb31e22ea0d8bcf5f67e3dcc07bd7834028ea003a40aa796493f3,} 
DEBU[0001] CreateContainerRequest: &CreateContainerRequest{PodSandboxId:59d9db45b9a0a5c4ac51cffb2e8f34af2fc46210896244fce7d4e2d582590da8,Config:&ContainerConfig{Metadata:&ContainerMetadata{Name:podsandbox-sleep,Attempt:0,},Image:&ImageSpec{Image:quay.io/crio/fedora-crio-ci:latest,Annotations:map[string]string{},UserSpecifiedImage:quay.io/crio/fedora-crio-ci:latest,RuntimeHandler:,},Command:[/bin/sleep 6000],Args:[6000],WorkingDir:/,Envs:[]*KeyValue{&KeyValue{Key:PATH,Value:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,},&KeyValue{Key:GLIBC_TUNABLES,Value:glibc.pthread.rseq=0,},},Mounts:[]*Mount{},Devices:[]*Device{},Labels:map[string]string{},Annotations:map[string]string{pod: podsandbox,},LogPath:,Stdin:false,StdinOnce:false,Tty:false,Linux:&LinuxContainerConfig{Resources:&LinuxContainerResources{CpuPeriod:10000,CpuQuota:20000,CpuShares:512,MemoryLimitInBytes:268435456,OomScoreAdj:30,CpusetCpus:,CpusetMems:,HugepageLimits:[]*HugepageLimit{},Unified:map[string]string{},MemorySwapLimitInBytes:0,},SecurityContext:&LinuxContainerSecurityContext{Capabilities:nil,Privileged:false,NamespaceOptions:&NamespaceOption{Network:POD,Pid:CONTAINER,Ipc:POD,TargetId:,UsernsOptions:nil,},SelinuxOptions:nil,RunAsUser:nil,RunAsUsername:,ReadonlyRootfs:false,SupplementalGroups:[],ApparmorProfile:,SeccompProfilePath:,NoNewPrivs:false,RunAsGroup:nil,MaskedPaths:[],ReadonlyPaths:[],Seccomp:nil,Apparmor:nil,},},Windows:nil,CDIDevices:[]*CDIDevice{},},SandboxConfig:&PodSandboxConfig{Metadata:&PodSandboxMetadata{Name:podsandbox1,Uid:redhat-test-crio,Namespace:redhat.test.crio,Attempt:1,},Hostname:crictl_host,LogDirectory:,DnsConfig:&DNSConfig{Servers:[8.8.8.8],Searches:[],Options:[],},PortMappings:[]*PortMapping{},Labels:map[string]string{group: test,},Annotations:map[string]string{com.example.test: sandbox annotation,owner: hmeng,security.alpha.kubernetes.io/seccomp/pod: unconfined,},Linux:&LinuxPodSandboxConfig{CgroupParent:pod_123-456.slice,SecurityContext:&LinuxSandboxSecurityContext{NamespaceOptions:&NamespaceOption{Network:POD,Pid:CONTAINER,Ipc:POD,TargetId:,UsernsOptions:nil,},SelinuxOptions:&SELinuxOption{User:system_u,Role:system_r,Type:svirt_lxc_net_t,Level:s0:c4,c5,},RunAsUser:nil,ReadonlyRootfs:false,SupplementalGroups:[],Privileged:false,SeccompProfilePath:,RunAsGroup:nil,Seccomp:nil,Apparmor:nil,},Sysctls:map[string]string{},Overhead:nil,Resources:nil,},Windows:nil,},} 
DEBU[0001] CreateContainerResponse: 8b47cf9c0be2391190162d63a0c6dcb6e7ec0a1b77b3e7b02284000a77ec8904 
8b47cf9c0be2391190162d63a0c6dcb6e7ec0a1b77b3e7b02284000a77ec8904

$ sudo crictl ps -a
DEBU[0000] get runtime connection                       
DEBU[0000] get image connection                         
DEBU[0000] ListContainerResponse: [&Container{Id:8b47cf9c0be2391190162d63a0c6dcb6e7ec0a1b77b3e7b02284000a77ec8904,PodSandboxId:59d9db45b9a0a5c4ac51cffb2e8f34af2fc46210896244fce7d4e2d582590da8,Metadata:&ContainerMetadata{Name:podsandbox-sleep,Attempt:0,},Image:&ImageSpec{Image:quay.io/crio/fedora-crio-ci:latest,Annotations:map[string]string{},UserSpecifiedImage:,RuntimeHandler:,},ImageRef:quay.io/crio/fedora-crio-ci@sha256:457da543f980417ffa752b5c026b2953a92707c41c4f3365542ceddb9edf6b63,State:CONTAINER_RUNNING,CreatedAt:1738768784055629513,Labels:map[string]string{},Annotations:map[string]string{pod: podsandbox,},ImageId:492b81c586bf4fe31298733e7dd38ad35d03f5288a6810835d5d8c3c064d6837,}] 
CONTAINER           IMAGE                                CREATED             STATE               NAME                ATTEMPT             POD ID              POD
8b47cf9c0be23       quay.io/crio/fedora-crio-ci:latest   17 seconds ago      Running             podsandbox-sleep    0                   59d9db45b9a0a       unknown

hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Feb 12, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.1-1.spec
    cp ../cri-o*1.32.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.1/
    rm -rf ../cri-o*1.32.1*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Mar 3, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.2-1.spec
    cp ../cri-o*1.32.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.2/
    rm -rf ../cri-o*1.32.2*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Original CRI-O v1.32.0 release keep crashing when working with
Kubernetes v1.32.1, containers could create correctly.

Once backport following go mod from main branch, problem get solved:

  * github.com/containers/common@v0.61.1
  * github.com/containers/image/v5@v5.33.1
  * github.com/containers/storage@v1.56.1

Code updated with following commands:

    go get github.com/containers/common@v0.61.1
    go get github.com/containers/storage@v1.56.1
    go get github.com/containers/image/v5@v5.33.1
    go mod tidy
    go mod download
    go mod vendor
    git add --all --force vendor/

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
@hswong3i hswong3i force-pushed the release-1.32-patched branch from 1ce22e4 to 76a05ba Compare March 3, 2025 02:58
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Apr 2, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.3.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.3-1.spec
    cp ../cri-o*1.32.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.3/
    rm -rf ../cri-o*1.32.3*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Apr 2, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.3.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.3-1.spec
    cp ../cri-o*1.32.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.3/
    rm -rf ../cri-o*1.32.3*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Apr 2, 2025
    git clean -xdf
    go get github.com/containers/common@v0.62.2
    go get github.com/containers/storage@v1.57.3-0.20250310120440-ab85543c3c6a
    go get github.com/containers/image/v5@v5.34.3-0.20250314011931-36a971d8ff51
    go mod tidy
    go mod download
    go mod vendor
    git add --all --force vendor/
    tar zcvf ../cri-o_1.32.3.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.3-1.spec
    cp ../cri-o*1.32.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.3/
    rm -rf ../cri-o*1.32.3*.*

See cri-o#8974

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Copy link
github-actions bot commented Apr 7, 2025

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 7, 2025
Copy link
github-actions bot commented May 8, 2025

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 8, 2025
Copy link
github-actions bot commented Jun 8, 2025

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. kind/dependency-change Categorizes issue or PR as related to changing dependencies lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0