Skip to content

Commit

Permalink
Change default image volume mode to "anonymous"
Browse files Browse the repository at this point in the history
We have not supported type=bind image volumes since pre-1.0
Podman - we phased them out when we added support for actual
volumes. Also, our image volume valid modes checker did not even
allow the actual default (anonymous). This is technically a
breaking change, so it will go into Podman 5.0 - but I strongly
doubt anyone is actually using this field if no one has noticed
this issue before now.

Signed-off-by: Matt Heon <mheon@redhat.com>
  • Loading branch information
mheon committed Jan 24, 2024
1 parent 167512e commit 2001192
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
bindirPrefix = "$BINDIR"
)

var validImageVolumeModes = []string{_typeBind, "tmpfs", "ignore"}
var validImageVolumeModes = []string{"anonymous", "tmpfs", "ignore"}

// ProxyEnv is a list of Proxy Environment variables
var ProxyEnv = []string{
Expand Down
3 changes: 0 additions & 3 deletions pkg/config/config_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "bind"
)

// podman remote clients on darwin cannot use unshare.isRootless() to determine the configuration file locations.
Expand Down
3 changes: 0 additions & 3 deletions pkg/config/config_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/usr/local/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "nullfs"
)

// podman remote clients on freebsd cannot use unshare.isRootless() to determine the configuration file locations.
Expand Down
3 changes: 0 additions & 3 deletions pkg/config/config_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "bind"
)

func selinuxEnabled() bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
_defaultTransport = "docker://"

// _defaultImageVolumeMode is a mode to handle built-in image volumes.
_defaultImageVolumeMode = _typeBind
_defaultImageVolumeMode = "anonymous"

// defaultInitName is the default name of the init binary
defaultInitName = "catatonit"
Expand Down

0 comments on commit 2001192

Please sign in to comment.