Skip to content

Commit

Permalink
Merge pull request #16336 from rhatdan/VENDOR
Browse files Browse the repository at this point in the history
Do not report that /usr/share/containers/storage.conf has been edited.
  • Loading branch information
openshift-merge-robot committed Oct 31, 2022
2 parents be51150 + 9003cdb commit aca9807
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -11,7 +11,7 @@ require (
github.com/container-orchestrated-devices/container-device-interface v0.5.2
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.1.1
github.com/containers/buildah v1.28.1-0.20221028091010-9f7a94f34a74
github.com/containers/buildah v1.28.1-0.20221029151733-c2cf9fa47ab6
github.com/containers/common v0.50.2-0.20221027091852-54845c3325e3
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.23.1-0.20221027111947-5f02f763c564
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -260,8 +260,8 @@ github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHV
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE=
github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8=
github.com/containers/buildah v1.28.1-0.20221028091010-9f7a94f34a74 h1:LxNRZ4M/gEnDT4Guu4KqlTNWSlKyVHRQ4glzlIJUV1U=
github.com/containers/buildah v1.28.1-0.20221028091010-9f7a94f34a74/go.mod h1:skMuWv4FIebpsAFT7fBv2Ll0e0w2j71IUWCIrw9iTV0=
github.com/containers/buildah v1.28.1-0.20221029151733-c2cf9fa47ab6 h1:6bFoF3QIUzza8NWAsHS1ZGDDEr+r5do46dXEbzkZb3Y=
github.com/containers/buildah v1.28.1-0.20221029151733-c2cf9fa47ab6/go.mod h1:skMuWv4FIebpsAFT7fBv2Ll0e0w2j71IUWCIrw9iTV0=
github.com/containers/common v0.50.2-0.20221027091852-54845c3325e3 h1:BxeJsrqor6A6ze52vqCruQLjtklKYbpQgizxjA6D/qY=
github.com/containers/common v0.50.2-0.20221027091852-54845c3325e3/go.mod h1:pc6mEke4ejIOQxHD8ag6myKkhIvhcfJ6RV+0UVosuBk=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
Expand Down
12 changes: 9 additions & 3 deletions libpod/reset.go
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/containers/podman/v4/pkg/rootless"
"github.com/containers/podman/v4/pkg/util"
"github.com/containers/storage"
stypes "github.com/containers/storage/types"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -215,9 +216,14 @@ func (r *Runtime) reset(ctx context.Context) error {
}
}
if storageConfPath, err := storage.DefaultConfigFile(rootless.IsRootless()); err == nil {
if _, err = os.Stat(storageConfPath); err == nil {
fmt.Printf("A storage.conf file exists at %s\n", storageConfPath)
fmt.Println("You should remove this file if you did not modify the configuration.")
switch storageConfPath {
case stypes.SystemConfigFile:
break
default:
if _, err = os.Stat(storageConfPath); err == nil {
fmt.Printf(" A %q config file exists.\n", storageConfPath)
fmt.Println("Remove this file if you did not modify the configuration.")
}
}
} else {
if prevError != nil {
Expand Down
5 changes: 0 additions & 5 deletions test/buildah-bud/apply-podman-deltas
Expand Up @@ -254,11 +254,6 @@ skip_if_remote "FIXME FIXME FIXME: find a way to clean up their podman calls" \
"bud with run should not leave mounts behind cleanup test" \
"bud with custom files in /run/ should persist cleanup test"

# Under podman-remote, the "Ignoring <stdin>:5:2: error: #error" message
# is never seen. (Not even as stdout/stderr on the server; Ed checked).
skip_if_remote "FIXME FIXME FIXME: 'Ignoring' warning is never seen" \
"bud with preprocessor error"

# END tests which are skipped due to actual podman or podman-remote bugs.
###############################################################################

Expand Down
1 change: 1 addition & 0 deletions test/e2e/system_reset_test.go
Expand Up @@ -69,6 +69,7 @@ var _ = Describe("podman system reset", func() {
Expect(session).Should(Exit(0))

Expect(session.ErrorToString()).To(Not(ContainSubstring("Failed to add pause process")))
Expect(session.ErrorToString()).To(Not(ContainSubstring("/usr/share/containers/storage.conf")))

session = podmanTest.Podman([]string{"images", "-n"})
session.WaitWithDefaultTimeout()
Expand Down
9 changes: 9 additions & 0 deletions vendor/github.com/containers/buildah/copier/copier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions vendor/github.com/containers/buildah/run_freebsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Expand Up @@ -95,7 +95,7 @@ github.com/containernetworking/cni/pkg/version
# github.com/containernetworking/plugins v1.1.1
## explicit; go 1.17
github.com/containernetworking/plugins/pkg/ns
# github.com/containers/buildah v1.28.1-0.20221028091010-9f7a94f34a74
# github.com/containers/buildah v1.28.1-0.20221029151733-c2cf9fa47ab6
## explicit; go 1.17
github.com/containers/buildah
github.com/containers/buildah/bind
Expand Down

0 comments on commit aca9807

Please sign in to comment.