mirror of
https://github.com/containers/podman.git
synced 2025-09-27 00:34:32 +08:00
Bump Buildah to v1.24.0
Bumps Buildah to v1.24.0 and adopts the new values for pull: true, false, never, and always. The pull-never and pull-always options for the build command are still usable, but they have been removed from the man page documentation with this change. Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
2
vendor/github.com/containers/common/libnetwork/cni/config.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/cni/config.go
generated
vendored
@ -60,7 +60,7 @@ func (n *cniNetwork) networkCreate(newNetwork *types.Network, defaultNet bool) (
|
||||
// Therefore the next podman command tries to create the default net again and it would
|
||||
// fail because it thinks the network is used on the host.
|
||||
var usedNetworks []*net.IPNet
|
||||
if !defaultNet {
|
||||
if !defaultNet && newNetwork.Driver == types.BridgeNetworkDriver {
|
||||
usedNetworks, err = internalutil.GetUsedSubnets(n)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
2
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
@ -74,7 +74,7 @@ func (n *netavarkNetwork) networkCreate(newNetwork *types.Network, defaultNet bo
|
||||
// Therefore the next podman command tries to create the default net again and it would
|
||||
// fail because it thinks the network is used on the host.
|
||||
var usedNetworks []*net.IPNet
|
||||
if !defaultNet {
|
||||
if !defaultNet && newNetwork.Driver == types.BridgeNetworkDriver {
|
||||
usedNetworks, err = internalutil.GetUsedSubnets(n)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
2
vendor/github.com/containers/common/libnetwork/netavark/exec.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/netavark/exec.go
generated
vendored
@ -107,7 +107,7 @@ func (n *netavarkNetwork) execNetavark(args []string, stdin, result interface{})
|
||||
logWriter = io.MultiWriter(logWriter, &logrusNetavarkWriter{})
|
||||
}
|
||||
|
||||
cmd := exec.Command(n.netavarkBinary, args...)
|
||||
cmd := exec.Command(n.netavarkBinary, append(n.getCommonNetavarkOptions(), args...)...)
|
||||
// connect the pipes to stdin and stdout
|
||||
cmd.Stdin = stdinR
|
||||
cmd.Stdout = stdoutW
|
||||
|
7
vendor/github.com/containers/common/libnetwork/netavark/network.go
generated
vendored
7
vendor/github.com/containers/common/libnetwork/netavark/network.go
generated
vendored
@ -25,11 +25,13 @@ type netavarkNetwork struct {
|
||||
// networkRunDir is where temporary files are stored, i.e.the ipam db, aardvark config etc
|
||||
networkRunDir string
|
||||
|
||||
// tells netavark wheather this is rootless mode or rootfull, "true" or "false"
|
||||
// tells netavark whether this is rootless mode or rootfull, "true" or "false"
|
||||
networkRootless bool
|
||||
|
||||
// netavarkBinary is the path to the netavark binary.
|
||||
netavarkBinary string
|
||||
// aardvarkBinary is the path to the aardvark binary.
|
||||
aardvarkBinary string
|
||||
|
||||
// defaultNetwork is the name for the default network.
|
||||
defaultNetwork string
|
||||
@ -59,6 +61,8 @@ type InitConfig struct {
|
||||
|
||||
// NetavarkBinary is the path to the netavark binary.
|
||||
NetavarkBinary string
|
||||
// AardvarkBinary is the path to the aardvark binary.
|
||||
AardvarkBinary string
|
||||
|
||||
// NetworkRunDir is where temporary files are stored, i.e.the ipam db, aardvark config
|
||||
NetworkRunDir string
|
||||
@ -108,6 +112,7 @@ func NewNetworkInterface(conf *InitConfig) (types.ContainerNetwork, error) {
|
||||
networkConfigDir: conf.NetworkConfigDir,
|
||||
networkRunDir: conf.NetworkRunDir,
|
||||
netavarkBinary: conf.NetavarkBinary,
|
||||
aardvarkBinary: conf.AardvarkBinary,
|
||||
networkRootless: unshare.IsRootless(),
|
||||
ipamDBPath: filepath.Join(conf.NetworkRunDir, "ipam.db"),
|
||||
defaultNetwork: defaultNetworkName,
|
||||
|
8
vendor/github.com/containers/common/libnetwork/netavark/run.go
generated
vendored
8
vendor/github.com/containers/common/libnetwork/netavark/run.go
generated
vendored
@ -55,7 +55,7 @@ func (n *netavarkNetwork) Setup(namespacePath string, options types.SetupOptions
|
||||
}
|
||||
|
||||
result := map[string]types.StatusBlock{}
|
||||
err = n.execNetavark([]string{"--config", n.networkRunDir, "--rootless=" + strconv.FormatBool(n.networkRootless), "setup", namespacePath}, netavarkOpts, &result)
|
||||
err = n.execNetavark([]string{"setup", namespacePath}, netavarkOpts, &result)
|
||||
if err != nil {
|
||||
// lets dealloc ips to prevent leaking
|
||||
if err := n.deallocIPs(&options.NetworkOptions); err != nil {
|
||||
@ -95,7 +95,7 @@ func (n *netavarkNetwork) Teardown(namespacePath string, options types.TeardownO
|
||||
return errors.Wrap(err, "failed to convert net opts")
|
||||
}
|
||||
|
||||
retErr := n.execNetavark([]string{"--config", n.networkRunDir, "--rootless=" + strconv.FormatBool(n.networkRootless), "teardown", namespacePath}, netavarkOpts, nil)
|
||||
retErr := n.execNetavark([]string{"teardown", namespacePath}, netavarkOpts, nil)
|
||||
|
||||
// when netavark returned an error we still free the used ips
|
||||
// otherwise we could end up in a state where block the ips forever
|
||||
@ -111,6 +111,10 @@ func (n *netavarkNetwork) Teardown(namespacePath string, options types.TeardownO
|
||||
return retErr
|
||||
}
|
||||
|
||||
func (n *netavarkNetwork) getCommonNetavarkOptions() []string {
|
||||
return []string{"--config", n.networkRunDir, "--rootless=" + strconv.FormatBool(n.networkRootless), "--aardvark-binary=" + n.aardvarkBinary}
|
||||
}
|
||||
|
||||
func (n *netavarkNetwork) convertNetOpts(opts types.NetworkOptions) (*netavarkOptions, error) {
|
||||
netavarkOptions := netavarkOptions{
|
||||
NetworkOptions: opts,
|
||||
|
14
vendor/github.com/containers/common/libnetwork/network/interface.go
generated
vendored
14
vendor/github.com/containers/common/libnetwork/network/interface.go
generated
vendored
@ -31,6 +31,11 @@ const (
|
||||
netavarkConfigDir = "/etc/containers/networks"
|
||||
// netavarkRunDir is the run directory for the rootful temporary network files such as the ipam db
|
||||
netavarkRunDir = "/run/containers/networks"
|
||||
|
||||
// netavarkBinary is the name of the netavark binary
|
||||
netavarkBinary = "netavark"
|
||||
// aardvarkBinary is the name of the aardvark binary
|
||||
aardvarkBinary = "aardvark-dns"
|
||||
)
|
||||
|
||||
// NetworkBackend returns the network backend name and interface
|
||||
@ -51,11 +56,17 @@ func NetworkBackend(store storage.Store, conf *config.Config, syslog bool) (type
|
||||
|
||||
switch backend {
|
||||
case types.Netavark:
|
||||
netavarkBin, err := conf.FindHelperBinary("netavark", false)
|
||||
netavarkBin, err := conf.FindHelperBinary(netavarkBinary, false)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
aardvarkBin, err := conf.FindHelperBinary(aardvarkBinary, false)
|
||||
if err != nil {
|
||||
// this is not a fatal error we can still use netavark without dns
|
||||
logrus.Warnf("%s binary not found, container dns will not be enabled", aardvarkBin)
|
||||
}
|
||||
|
||||
confDir := conf.Network.NetworkConfigDir
|
||||
if confDir == "" {
|
||||
confDir = getDefaultNetavarkConfigDir(store)
|
||||
@ -74,6 +85,7 @@ func NetworkBackend(store storage.Store, conf *config.Config, syslog bool) (type
|
||||
NetworkConfigDir: confDir,
|
||||
NetworkRunDir: runDir,
|
||||
NetavarkBinary: netavarkBin,
|
||||
AardvarkBinary: aardvarkBin,
|
||||
DefaultNetwork: conf.Network.DefaultNetwork,
|
||||
DefaultSubnet: conf.Network.DefaultSubnet,
|
||||
Syslog: syslog,
|
||||
|
Reference in New Issue
Block a user