From 2a16bba79305cc83b546e30e8047166af57bac35 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 22 Mar 2023 17:19:50 -0600 Subject: [PATCH 1/7] remove unneeded jobs Signed-off-by: Ed Santiago --- .cirrus.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 25201af5cb5c..c3aa8fc7658d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -228,6 +228,7 @@ alt_build_task: only_if: &no_rhel_release | $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' && $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel' + skip: $CI == $CI env: <<: *stdenvars TEST_FLAVOR: "altbuild" @@ -265,6 +266,7 @@ osx_alt_build_task: alias: osx_alt_build # Docs: ./contrib/cirrus/CIModes.md only_if: *no_rhel_release # RHEL never releases podman mac installer binary + skip: $CI == $CI persistent_worker: &mac_pw labels: os: darwin @@ -377,6 +379,7 @@ bindings_task: changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') || changesInclude('pkg/bindings/test/**') || (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) + skip: $CI == $CI depends_on: &build - build_success gce_instance: *standardvm @@ -412,6 +415,7 @@ bindings_task: swagger_task: name: "Test Swagger" alias: swagger + skip: $CI == $CI depends_on: *build gce_instance: *standardvm env: @@ -443,6 +447,7 @@ win_installer_task: $CIRRUS_TAG == '' && $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' && $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel' + skip: $CI == $CI depends_on: *build ec2_instance: &windows image: "${WINDOWS_AMI}" @@ -504,6 +509,7 @@ docker-py_test_task: changesInclude('test/python/**') || (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build + skip: $CI == $CI gce_instance: *standardvm env: <<: *stdenvars @@ -530,6 +536,7 @@ unit_test_task: changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') || changesInclude('**/*_test.go') || (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) + skip: $CI == $CI depends_on: *build matrix: - env: *stdenvars @@ -560,6 +567,7 @@ apiv2_test_task: changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') || changesInclude('test/apiv2/**', 'test/python/**') || (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) + skip: $CI == $CI depends_on: *build gce_instance: *standardvm # Test is normally pretty quick, about 10-minutes. If it hangs, @@ -592,6 +600,7 @@ compose_test_task: changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') || changesInclude('test/compose/**') || (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) + skip: $CI == $CI depends_on: *build gce_instance: *standardvm matrix: @@ -738,6 +747,7 @@ podman_machine_aarch64_task: name: *std_name_fmt alias: podman_machine_aarch64 only_if: *only_if_machine_test + skip: $CI == $CI depends_on: *build ec2_instance: <<: *standard_build_ec2_aarch64 @@ -762,6 +772,7 @@ podman_machine_windows_task: alias: podman_machine_windows # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_machine_test + skip: $CI == $CI depends_on: *build ec2_instance: <<: *windows @@ -786,6 +797,7 @@ podman_machine_mac_task: name: *std_name_fmt alias: podman_machine_mac only_if: *only_if_machine_test + skip: $CI == $CI depends_on: *build persistent_worker: *mac_pw env: @@ -846,6 +858,7 @@ local_system_test_task: &local_system_test_task gce_instance: *standardvm env: TEST_FLAVOR: sys + timeout_in: 45m clone_script: *get_gosrc setup_script: *setup main_script: *main @@ -864,6 +877,7 @@ local_system_test_aarch64_task: &local_system_test_task_aarch64 <<: *stdenvars_aarch64 TEST_FLAVOR: sys DISTRO_NV: ${FEDORA_AARCH64_NAME} + timeout_in: 45m clone_script: *get_gosrc_aarch64 setup_script: *setup main_script: *main @@ -914,6 +928,7 @@ rootless_system_test_task: env: TEST_FLAVOR: sys PRIV_NAME: rootless + timeout_in: 45m clone_script: *get_gosrc setup_script: *setup main_script: *main @@ -956,6 +971,7 @@ buildah_bud_test_task: $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') || changesInclude('**/*build*.go', 'test/buildah-bud/**') + skip: $CI == $CI depends_on: *build env: <<: *stdenvars From c7a23f73c8fed14e96723a4016491a470e3fc332 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Fri, 24 Mar 2023 14:13:05 -0600 Subject: [PATCH 2/7] ginkgo: no flakeAttempts Signed-off-by: Ed Santiago --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf61d5b6f85e..33d3f614259f 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ GINKGO ?= ./test/tools/build/ginkgo GINKGO_JSON ?= $(if $(CI),--json-report ginkgo-e2e.json,) # Allow control over some Ginkgo parameters -GINKGO_FLAKE_ATTEMPTS ?= 3 +GINKGO_FLAKE_ATTEMPTS ?= 0 GINKGO_NO_COLOR ?= y # Conditional required to produce empty-output if binary not built yet. From 55a02c4b7b0e82ff334827372fc7c9b923ade529 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 21 Jun 2023 08:27:48 -0600 Subject: [PATCH 3/7] instrument for 17957, the unlink-ENOTEMPTY flake Signed-off-by: Ed Santiago --- test/e2e/build_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 20462d457a8d..246be0a23c82 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -908,6 +908,10 @@ RUN ls /dev/test1`, CITEST_IMAGE) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) + // 2023-06-21 ESM FIXME + ls := SystemExec("bash", []string{"-c", fmt.Sprintf("find %s/events -type f | while read f;do echo;ls -l $f;cat $f;done", tempdir)}) + ls.WaitWithDefaultTimeout() + session = podmanTest.Podman([]string{"system", "reset", "-f"}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) From 05ef56bfa23e3cbeeef659fd037a0848d832f4a2 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 10 Aug 2023 09:58:41 -0600 Subject: [PATCH 4/7] debug stuff Signed-off-by: Ed Santiago --- libpod/logs/log.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libpod/logs/log.go b/libpod/logs/log.go index e6ad32f99b26..7246a3b1f0b3 100644 --- a/libpod/logs/log.go +++ b/libpod/logs/log.go @@ -83,6 +83,17 @@ func GetLogFile(path string, options *LogOptions) (*tail.Tail, []*LogLine, error return t, logTail, err } +func printFileToStderr(path string) { + f, err := os.Open(path) + if err != nil { + logrus.Errorf("failed to read file: %v", err) + } + _, err = io.Copy(os.Stderr, f) + if err != nil { + logrus.Errorf("failed to print file: %v", err) + } +} + func getTailLog(path string, tail int) ([]*LogLine, error) { var ( nllCounter int @@ -120,7 +131,8 @@ func getTailLog(path string, tail int) ([]*LogLine, error) { } nll, err := NewLogLine(lines[i]) if err != nil { - return nil, err + printFileToStderr(path) + return nil, fmt.Errorf("parse log line: %w", err) } if !nll.Partial() || first { nllCounter++ @@ -146,7 +158,8 @@ func getTailLog(path string, tail int) ([]*LogLine, error) { if leftover != "" && nllCounter < tail { nll, err := NewLogLine(leftover) if err != nil { - return nil, err + printFileToStderr(path) + return nil, fmt.Errorf("parse leftover log line: %w", err) } tailLog = append(tailLog, nll) } From 24235dfd4d9693bbe7ecffdb1bffe6be016fa5ae Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 25 Sep 2023 07:47:02 -0600 Subject: [PATCH 5/7] disable packit for this PR Signed-off-by: Ed Santiago --- .packit.yaml | 122 --------------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml deleted file mode 100644 index 77833712bb35..000000000000 --- a/.packit.yaml +++ /dev/null @@ -1,122 +0,0 @@ ---- -# See the documentation for more information: -# https://packit.dev/docs/configuration/ - -downstream_package_name: podman -upstream_tag_template: v{version} - -packages: - podman-fedora: - pkg_tool: fedpkg - specfile_path: rpm/podman.spec - podman-centos: - pkg_tool: centpkg - specfile_path: rpm/podman.spec - podman-rhel: - specfile_path: rpm/podman.spec - -srpm_build_deps: - - git-archive-all - - make - -actions: - fix-spec-file: - - "bash .packit.sh" - -jobs: - - job: copr_build - trigger: pull_request - packages: [podman-fedora] - notifications: &packit_build_failure_notification - failure_comment: - message: "Ephemeral COPR build failed. @containers/packit-build please check." - enable_net: true - targets: - fedora-all-x86_64: {} - fedora-all-aarch64: {} - fedora-eln-x86_64: - additional_repos: - - "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/" - fedora-eln-aarch64: - additional_repos: - - "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/" - - - job: copr_build - trigger: pull_request - packages: [podman-centos] - notifications: *packit_build_failure_notification - enable_net: true - targets: - - centos-stream-9-x86_64 - - centos-stream-9-aarch64 - - centos-stream-10-x86_64 - - centos-stream-10-aarch64 - - - job: copr_build - trigger: pull_request - packages: [podman-rhel] - notifications: *packit_build_failure_notification - enable_net: true - targets: - - epel-9-x86_64 - - epel-9-aarch64 - - # Run on commit to main branch - - job: copr_build - trigger: commit - packages: [podman-fedora] - notifications: - failure_comment: - message: "podman-next COPR build failed. @containers/packit-build please check." - branch: main - owner: rhcontainerbot - project: podman-next - enable_net: true - - - job: tests - identifier: cockpit-revdeps - trigger: pull_request - packages: [podman-fedora] - notifications: - failure_comment: - message: "Cockpit tests failed for commit {commit_sha}. @martinpitt, @jelly, @mvollmer please check." - targets: - - fedora-latest-stable - - fedora-development - tf_extra_params: - environments: - - artifacts: - - type: repository-file - id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo - - type: repository-file - id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo - tmt: - context: - revdeps: "yes" - - - job: propose_downstream - trigger: release - update_release: false - packages: [podman-fedora] - dist_git_branches: - - fedora-development - - fedora-latest - - - job: propose_downstream - trigger: release - update_release: false - packages: [podman-centos] - dist_git_branches: - - c10s - - - job: koji_build - trigger: commit - packages: [podman-fedora] - dist_git_branches: - - fedora-all - - - job: bodhi_update - trigger: commit - packages: [podman-fedora] - dist_git_branches: - - fedora-branched # rawhide updates are created automatically From 82e701a8ee67fb4a9e2954add4f5b32adde3bd62 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 5 Mar 2024 05:46:34 -0700 Subject: [PATCH 6/7] logformatter: strip "--url xxx" from bats podman-remote ...it's useless clutter. Signed-off-by: Ed Santiago --- contrib/cirrus/logformatter | 7 ++++--- contrib/cirrus/logformatter.t | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 78ac1850d719..901242f62cb1 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -426,9 +426,10 @@ END_HTML } # Readability: /long/path/to/podman -> podman (hover for full path) - # Also make it boldface, to make commands stand out - $line =~ s{^(#\s+(#|\$)\s+)(\S+/)(podman\S*)(\s.*)} - {$1$4$5}; + # Also make it boldface, to make commands stand out, and strip --url + # 1 2 2 13 345 56 6 47 7 + $line =~ s{^(#\s+(#|\$)\s+)(\S+/)((podman\S*)(\s+--url\s+\S+)?)(\s.*)} + {$1$5$7}; if ($line =~ /^ok\s.*\s# skip/) { $css = 'skipped' } elsif ($line =~ /^ok\s/) { $css = 'passed' } diff --git a/contrib/cirrus/logformatter.t b/contrib/cirrus/logformatter.t index 0387b8bf48be..ed6b96213757 100755 --- a/contrib/cirrus/logformatter.t +++ b/contrib/cirrus/logformatter.t @@ -96,6 +96,7 @@ not ok 3 fail # (from function `assert' in file ./helpers.bash, line 343, # from function `expect_output' in file ./helpers.bash, line 370, # in test file ./run.bats, line 786) +# $ /path/to/podman-remote --url /this/should/be-stripped blah blah # $ /path/to/podman foo -bar # time="2023-01-05T15:15:20Z" level=debug msg="this is debug" # time="2023-01-05T15:15:20Z" level=warning msg="this is warning" @@ -109,6 +110,7 @@ ok 4 blah # (from function `assert' in file ./helpers.bash, line 343, # from function `expect_output' in file ./helpers.bash, line 370, # in test file ./run.bats, line 786) +# $ podman-remote blah blah # $ podman foo -bar # time="2023-01-05T15:15:20Z" level=debug msg="this is debug" # time="2023-01-05T15:15:20Z" level=warning msg="this is warning" From 58bd5befd90137280cc2821f479867ed426095a9 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 19 Aug 2024 13:51:56 +0200 Subject: [PATCH 7/7] vendor: update go-criu to latest There is no new version yet but we like to use the new code[1] to debug a flake[2] in the podman CI. It will not fix it but the new error might give us a better idea what is going on. [1] https://github.com/checkpoint-restore/go-criu/pull/175 [2] https://github.com/containers/podman/issues/18856 Signed-off-by: Paul Holzinger --- go.mod | 2 +- go.sum | 4 ++-- .../checkpoint-restore/go-criu/v7/.gitignore | 1 + .../checkpoint-restore/go-criu/v7/Makefile | 5 +--- .../checkpoint-restore/go-criu/v7/main.go | 24 +++++++++++++------ vendor/modules.txt | 4 ++-- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 5949a8983fc2..8f5e06debe27 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/buger/goterm v1.0.4 github.com/checkpoint-restore/checkpointctl v1.2.1 - github.com/checkpoint-restore/go-criu/v7 v7.1.0 + github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c github.com/containernetworking/plugins v1.5.1 github.com/containers/buildah v1.37.0 github.com/containers/common v0.60.1-0.20240808214705-d93f74f43223 diff --git a/go.sum b/go.sum index 109d5409c85d..d436a7396cc1 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/checkpointctl v1.2.1 h1:aYFl2CEk95bPLDvNDgif4ZLx3pjCZMJm6td+A0X1+xs= github.com/checkpoint-restore/checkpointctl v1.2.1/go.mod h1:8oF+AtNUFJAI13ETcbB3clnjiwvviX0QzVBhYzQ8yBA= -github.com/checkpoint-restore/go-criu/v7 v7.1.0 h1:JbQyO4o+P8ycNTMLPiiDqXg49bAcy4WljWCzYQho35A= -github.com/checkpoint-restore/go-criu/v7 v7.1.0/go.mod h1:1svAtmbtvX4BKI45OFzgoTTLG7oYFKdColv/Vcsb2A8= +github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c h1:/LNWuEZICKO96wvlLRam53lp7inbzwR1zE/YuoUUV/k= +github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c/go.mod h1:FTB8VSlcpwignNNaAXXzNlKBIf+DcZw8urnXKCkpeB4= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= diff --git a/vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore b/vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore index d8b4f7401ab8..eb1b08bc4797 100644 --- a/vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore +++ b/vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore @@ -15,3 +15,4 @@ scripts/magic-gen/expected.go scripts/magic-gen/output.go crit/bin crit/test-imgs/ +__pycache__ diff --git a/vendor/github.com/checkpoint-restore/go-criu/v7/Makefile b/vendor/github.com/checkpoint-restore/go-criu/v7/Makefile index 6aacde06e1eb..12e064237a07 100644 --- a/vendor/github.com/checkpoint-restore/go-criu/v7/Makefile +++ b/vendor/github.com/checkpoint-restore/go-criu/v7/Makefile @@ -18,9 +18,6 @@ test: build coverage: $(MAKE) -C test coverage -codecov: - $(MAKE) -C test codecov - rpc/rpc.proto: curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@ @@ -42,4 +39,4 @@ clean: $(MAKE) -C crit/ clean $(MAKE) -C test/ clean -.PHONY: build test lint vendor coverage codecov clean +.PHONY: build test lint vendor coverage clean diff --git a/vendor/github.com/checkpoint-restore/go-criu/v7/main.go b/vendor/github.com/checkpoint-restore/go-criu/v7/main.go index 6906c9811a89..8f29d2ee2df1 100644 --- a/vendor/github.com/checkpoint-restore/go-criu/v7/main.go +++ b/vendor/github.com/checkpoint-restore/go-criu/v7/main.go @@ -61,13 +61,19 @@ func (c *Criu) Prepare() error { } // Cleanup cleans up -func (c *Criu) Cleanup() { +func (c *Criu) Cleanup() error { + var errs []error if c.swrkCmd != nil { - c.swrkSk.Close() + if err := c.swrkSk.Close(); err != nil { + errs = append(errs, err) + } c.swrkSk = nil - _ = c.swrkCmd.Wait() + if err := c.swrkCmd.Wait(); err != nil { + errs = append(errs, fmt.Errorf("criu swrk failed: %w", err)) + } c.swrkCmd = nil } + return errors.Join(errs...) } func (c *Criu) sendAndRecv(reqB []byte) ([]byte, int, error) { @@ -99,9 +105,7 @@ func (c *Criu) doSwrk(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) e return nil } -func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (*rpc.CriuResp, error) { - var resp *rpc.CriuResp - +func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (resp *rpc.CriuResp, retErr error) { req := rpc.CriuReq{ Type: &reqType, Opts: opts, @@ -121,7 +125,13 @@ func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy N return nil, err } - defer c.Cleanup() + defer func() { + // append any cleanup errors to the returned error + err := c.Cleanup() + if err != nil { + retErr = errors.Join(retErr, err) + } + }() } for { diff --git a/vendor/modules.txt b/vendor/modules.txt index 9836fb675564..410210a76c54 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -89,8 +89,8 @@ github.com/bytedance/sonic/utf8 # github.com/checkpoint-restore/checkpointctl v1.2.1 ## explicit; go 1.21 github.com/checkpoint-restore/checkpointctl/lib -# github.com/checkpoint-restore/go-criu/v7 v7.1.0 -## explicit; go 1.18 +# github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c +## explicit; go 1.20 github.com/checkpoint-restore/go-criu/v7 github.com/checkpoint-restore/go-criu/v7/rpc github.com/checkpoint-restore/go-criu/v7/stats