mirror of
https://github.com/containers/podman.git
synced 2025-09-25 15:55:32 +08:00
Detect if in podman machine virtual vm
When in podman machine virtual machines, podman needs to be able to detect as such. One implementation for this is when creating networks, the podman-machine cni plugin needs to be added to the configuration. This PR also includes the latest containers-common. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -263,6 +263,9 @@ type EngineConfig struct {
|
||||
// LockType is the type of locking to use.
|
||||
LockType string `toml:"lock_type,omitempty"`
|
||||
|
||||
// MachineEnabled indicates if Podman is running in a podman-machine VM
|
||||
MachineEnabled bool `toml:"machine_enabled,omitempty"`
|
||||
|
||||
// MultiImageArchive - if true, the container engine allows for storing
|
||||
// archives (e.g., of the docker-archive transport) with multiple
|
||||
// images. By default, Podman creates single-image archives.
|
||||
|
19
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
19
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -336,6 +336,11 @@ default_sysctls = [
|
||||
#
|
||||
# lock_type** = "shm"
|
||||
|
||||
# Indicates if Podman is running inside a VM via Podman Machine.
|
||||
# Podman uses this value to do extra setup around networking from the
|
||||
# container inside the VM to to host.
|
||||
# machine_enabled=false
|
||||
|
||||
# MultiImageArchive - if true, the container engine allows for storing archives
|
||||
# (e.g., of the docker-archive transport) with multiple images. By default,
|
||||
# Podman creates single-image archives.
|
||||
@ -403,7 +408,7 @@ default_sysctls = [
|
||||
# List of the OCI runtimes that support --format=json. When json is supported
|
||||
# engine will use it for reporting nicer errors.
|
||||
#
|
||||
# runtime_supports_json = ["crun", "runc", "kata"]
|
||||
# runtime_supports_json = ["crun", "runc", "kata", "runsc"]
|
||||
|
||||
# List of the OCI runtimes that supports running containers without cgroups.
|
||||
#
|
||||
@ -432,7 +437,7 @@ default_sysctls = [
|
||||
# Path to file containing ssh identity key
|
||||
# identity = "~/.ssh/id_rsa"
|
||||
|
||||
# Paths to look for a valid OCI runtime (crun, runc, kata, etc)
|
||||
# Paths to look for a valid OCI runtime (crun, runc, kata, runsc, etc)
|
||||
[engine.runtimes]
|
||||
# crun = [
|
||||
# "/usr/bin/crun",
|
||||
@ -465,6 +470,16 @@ default_sysctls = [
|
||||
# "/usr/bin/kata-fc",
|
||||
# ]
|
||||
|
||||
# runsc = [
|
||||
# "/usr/bin/runsc",
|
||||
# "/usr/sbin/runsc",
|
||||
# "/usr/local/bin/runsc",
|
||||
# "/usr/local/sbin/runsc",
|
||||
# "/bin/runsc",
|
||||
# "/sbin/runsc",
|
||||
# "/run/current-system/sw/bin/runsc",
|
||||
# ]
|
||||
|
||||
[engine.volume_plugins]
|
||||
# testplugin = "/run/podman/plugins/test.sock"
|
||||
|
||||
|
16
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
16
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -278,6 +278,15 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
"/usr/bin/kata-qemu",
|
||||
"/usr/bin/kata-fc",
|
||||
},
|
||||
"runsc": {
|
||||
"/usr/bin/runsc",
|
||||
"/usr/sbin/runsc",
|
||||
"/usr/local/bin/runsc",
|
||||
"/usr/local/sbin/runsc",
|
||||
"/bin/runsc",
|
||||
"/sbin/runsc",
|
||||
"/run/current-system/sw/bin/runsc",
|
||||
},
|
||||
}
|
||||
// Needs to be called after populating c.OCIRuntimes
|
||||
c.OCIRuntime = c.findRuntime()
|
||||
@ -299,6 +308,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
c.RuntimeSupportsJSON = []string{
|
||||
"crun",
|
||||
"runc",
|
||||
"kata",
|
||||
"runsc",
|
||||
}
|
||||
c.RuntimeSupportsNoCgroups = []string{"crun"}
|
||||
c.RuntimeSupportsKVM = []string{"kata", "kata-runtime", "kata-qemu", "kata-fc"}
|
||||
@ -314,6 +325,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
// TODO - ideally we should expose a `type LockType string` along with
|
||||
// constants.
|
||||
c.LockType = "shm"
|
||||
c.MachineEnabled = false
|
||||
|
||||
return c, nil
|
||||
}
|
||||
@ -524,3 +536,7 @@ func (c *Config) Umask() string {
|
||||
func (c *Config) LogDriver() string {
|
||||
return c.Containers.LogDriver
|
||||
}
|
||||
|
||||
func (c *Config) MachineEnabled() bool {
|
||||
return c.Engine.MachineEnabled
|
||||
}
|
||||
|
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.37.0"
|
||||
const Version = "0.37.1"
|
||||
|
Reference in New Issue
Block a user