Update vendor containers/(common,storage,buildah,image)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-10-27 16:26:57 -04:00
parent 26e5661c27
commit 6fe64591d6
283 changed files with 32861 additions and 4204 deletions

View File

@@ -46,6 +46,8 @@ type Image struct {
ociv1Image *ociv1.Image
// Names() parsed into references.
namesReferences []reference.Reference
// Calculating the Size() is expensive, so cache it.
size *int64
}
}
@@ -62,6 +64,7 @@ func (i *Image) reload() error {
i.cached.completeInspectData = nil
i.cached.ociv1Image = nil
i.cached.namesReferences = nil
i.cached.size = nil
return nil
}
@@ -775,8 +778,13 @@ func (i *Image) Unmount(force bool) error {
// Size computes the size of the image layers and associated data.
func (i *Image) Size() (int64, error) {
// TODO: cache the result to optimize performance of subsequent calls
return i.runtime.store.ImageSize(i.ID())
if i.cached.size != nil {
return *i.cached.size, nil
}
size, err := i.runtime.store.ImageSize(i.ID())
i.cached.size = &size
return size, err
}
// HasDifferentDigestOptions allows for customizing the check if another

View File

@@ -170,6 +170,11 @@ func createMacvlan(network *types.Network) error {
}
}
// always turn dns off with macvlan, it is not implemented in netavark
// and makes little sense to support with macvlan
// see https://github.com/containers/netavark/pull/467
network.DNSEnabled = false
// we already validated the drivers before so we just have to set the default here
switch network.IPAMOptions[types.Driver] {
case "":

View File

@@ -54,7 +54,7 @@ type Network struct {
// to public or other Networks.
Internal bool `json:"internal"`
// DNSEnabled is whether name resolution is active for container on
// this Network.
// this Network. Only supported with the bridge driver.
DNSEnabled bool `json:"dns_enabled"`
// Labels is a set of key-value labels that have been applied to the
// Network.

View File

@@ -843,7 +843,7 @@ func (m *MachineConfig) URI() string {
func (c *EngineConfig) findRuntime() string {
// Search for crun first followed by runc, kata, runsc
for _, name := range []string{"crun", "runc", "runj", "kata", "runsc"} {
for _, name := range []string{"crun", "runc", "runj", "kata", "runsc", "ocijail"} {
for _, v := range c.OCIRuntimes[name] {
if _, err := os.Stat(v); err == nil {
return name

View File

@@ -543,7 +543,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", "runsc", "krun"]
#runtime_supports_json = ["crun", "runc", "kata", "runsc", "youki", "krun"]
# List of the OCI runtimes that supports running containers with KVM Separation.
#
@@ -654,6 +654,13 @@ default_sysctls = [
# "/run/current-system/sw/bin/runsc",
#]
#youki = [
# "/usr/local/bin/youki",
# "/usr/bin/youki",
# "/bin/youki",
# "/run/current-system/sw/bin/youki",
#]
#krun = [
# "/usr/bin/krun",
# "/usr/local/bin/krun",

View File

@@ -485,7 +485,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", "runsc", "krun"]
#runtime_supports_json = ["crun", "runc", "kata", "runsc", "youki", "krun"]
# List of the OCI runtimes that supports running containers with KVM Separation.
#
@@ -590,6 +590,13 @@ default_sysctls = [
# "/run/current-system/sw/bin/runsc",
#]
#youki = [
# "/usr/local/bin/youki",
# "/usr/bin/youki",
# "/bin/youki",
# "/run/current-system/sw/bin/youki",
#]
#krun = [
# "/usr/bin/krun",
# "/usr/local/bin/krun",

View File

@@ -364,10 +364,19 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
"/sbin/runsc",
"/run/current-system/sw/bin/runsc",
},
"youki": {
"/usr/local/bin/youki",
"/usr/bin/youki",
"/bin/youki",
"/run/current-system/sw/bin/youki",
},
"krun": {
"/usr/bin/krun",
"/usr/local/bin/krun",
},
"ocijail": {
"/usr/local/bin/ocijail",
},
}
// Needs to be called after populating c.OCIRuntimes.
c.OCIRuntime = c.findRuntime()
@@ -401,6 +410,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
"runc",
"kata",
"runsc",
"youki",
"krun",
}
c.RuntimeSupportsNoCgroups = []string{"crun", "krun"}