mirror of
https://github.com/containers/podman.git
synced 2025-12-23 22:28:30 -05:00
Remove network-cmd-path
As part of slirp removal. RUN-3569 Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@@ -582,12 +582,6 @@ func rootFlags(cmd *cobra.Command, podmanConfig *entities.PodmanConfig) {
|
|||||||
pFlags.StringVar(&podmanConfig.ConmonPath, conmonFlagName, "", "Path of the conmon binary")
|
pFlags.StringVar(&podmanConfig.ConmonPath, conmonFlagName, "", "Path of the conmon binary")
|
||||||
_ = cmd.RegisterFlagCompletionFunc(conmonFlagName, completion.AutocompleteDefault)
|
_ = cmd.RegisterFlagCompletionFunc(conmonFlagName, completion.AutocompleteDefault)
|
||||||
|
|
||||||
// TODO (6.0): --network-cmd-path is deprecated, remove this option with the next major release
|
|
||||||
// We need to find all the places that use r.config.Engine.NetworkCmdPath and remove it
|
|
||||||
networkCmdPathFlagName := "network-cmd-path"
|
|
||||||
pFlags.StringVar(&podmanConfig.ContainersConf.Engine.NetworkCmdPath, networkCmdPathFlagName, podmanConfig.ContainersConfDefaultsRO.Engine.NetworkCmdPath, "Path to the command for configuring the network")
|
|
||||||
_ = cmd.RegisterFlagCompletionFunc(networkCmdPathFlagName, completion.AutocompleteDefault)
|
|
||||||
|
|
||||||
networkConfigDirFlagName := "network-config-dir"
|
networkConfigDirFlagName := "network-config-dir"
|
||||||
pFlags.StringVar(&podmanConfig.ContainersConf.Network.NetworkConfigDir, networkConfigDirFlagName, podmanConfig.ContainersConfDefaultsRO.Network.NetworkConfigDir, "Path of the configuration directory for networks")
|
pFlags.StringVar(&podmanConfig.ContainersConf.Network.NetworkConfigDir, networkConfigDirFlagName, podmanConfig.ContainersConfDefaultsRO.Network.NetworkConfigDir, "Path of the configuration directory for networks")
|
||||||
_ = cmd.RegisterFlagCompletionFunc(networkConfigDirFlagName, completion.AutocompleteDefault)
|
_ = cmd.RegisterFlagCompletionFunc(networkConfigDirFlagName, completion.AutocompleteDefault)
|
||||||
|
|||||||
@@ -31333,10 +31333,6 @@ msgid ""
|
|||||||
"Windows (excluding WSL2) machines"
|
"Windows (excluding WSL2) machines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../../source/markdown/podman.1.md:98
|
|
||||||
msgid "**--network-cmd-path**=*path*"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../../source/markdown/podman.1.md:99
|
#: ../../source/markdown/podman.1.md:99
|
||||||
msgid ""
|
msgid ""
|
||||||
"Path to the `slirp4netns(1)` command binary to use for setting up a "
|
"Path to the `slirp4netns(1)` command binary to use for setting up a "
|
||||||
|
|||||||
@@ -104,11 +104,6 @@ Load the specified `containers.conf(5)` module. Can be an absolute or relative
|
|||||||
This flag is not supported on the remote client, including Mac and Windows (excluding WSL2) machines.
|
This flag is not supported on the remote client, including Mac and Windows (excluding WSL2) machines.
|
||||||
Further note that the flag is a root-level flag and must be specified before any Podman sub-command.
|
Further note that the flag is a root-level flag and must be specified before any Podman sub-command.
|
||||||
|
|
||||||
#### **--network-cmd-path**=*path*
|
|
||||||
Path to the `slirp4netns(1)` command binary to use for setting up a slirp4netns network.
|
|
||||||
If "" is used, then the binary will first be searched using the `helper_binaries_dir` option in `containers.conf`, and second using the `$PATH` environment variable.
|
|
||||||
**Note:** This option is deprecated and will be removed with Podman 6.0. Use the `helper_binaries_dir` option in `containers.conf` instead.
|
|
||||||
|
|
||||||
#### **--network-config-dir**=*directory*
|
#### **--network-config-dir**=*directory*
|
||||||
|
|
||||||
Path to the directory where network configuration files are located.
|
Path to the directory where network configuration files are located.
|
||||||
|
|||||||
@@ -50,10 +50,7 @@ func (r *Runtime) setPlatformHostInfo(info *define.HostInfo) error {
|
|||||||
|
|
||||||
info.CgroupsVersion = "v2"
|
info.CgroupsVersion = "v2"
|
||||||
|
|
||||||
slirp4netnsPath := r.config.Engine.NetworkCmdPath
|
slirp4netnsPath, _ := r.config.FindHelperBinary(slirp4netns.BinaryName, true)
|
||||||
if slirp4netnsPath == "" {
|
|
||||||
slirp4netnsPath, _ = r.config.FindHelperBinary(slirp4netns.BinaryName, true)
|
|
||||||
}
|
|
||||||
if slirp4netnsPath != "" {
|
if slirp4netnsPath != "" {
|
||||||
ver, err := version.Program(slirp4netnsPath)
|
ver, err := version.Program(slirp4netnsPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -180,20 +180,6 @@ func WithConmonPath(path string) RuntimeOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithNetworkCmdPath specifies the path to the slirp4netns binary which manages the
|
|
||||||
// runtime.
|
|
||||||
func WithNetworkCmdPath(path string) RuntimeOption {
|
|
||||||
return func(rt *Runtime) error {
|
|
||||||
if rt.valid {
|
|
||||||
return define.ErrRuntimeFinalized
|
|
||||||
}
|
|
||||||
|
|
||||||
rt.config.Engine.NetworkCmdPath = path
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNetworkBackend specifies the name of the network backend.
|
// WithNetworkBackend specifies the name of the network backend.
|
||||||
func WithNetworkBackend(name string) RuntimeOption {
|
func WithNetworkBackend(name string) RuntimeOption {
|
||||||
return func(rt *Runtime) error {
|
return func(rt *Runtime) error {
|
||||||
|
|||||||
@@ -164,9 +164,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
|
|||||||
if fs.Changed("tmpdir") {
|
if fs.Changed("tmpdir") {
|
||||||
options = append(options, libpod.WithTmpDir(cfg.ContainersConf.Engine.TmpDir))
|
options = append(options, libpod.WithTmpDir(cfg.ContainersConf.Engine.TmpDir))
|
||||||
}
|
}
|
||||||
if fs.Changed("network-cmd-path") {
|
|
||||||
options = append(options, libpod.WithNetworkCmdPath(cfg.ContainersConf.Engine.NetworkCmdPath))
|
|
||||||
}
|
|
||||||
if fs.Changed("network-backend") {
|
if fs.Changed("network-backend") {
|
||||||
options = append(options, libpod.WithNetworkBackend(cfg.ContainersConf.Network.NetworkBackend))
|
options = append(options, libpod.WithNetworkBackend(cfg.ContainersConf.Network.NetworkBackend))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
## assert-podman-global-args "network" "--network-cmd-path=/usr/bin/network-cmd"
|
|
||||||
## assert-podman-global-args "network" "--network-config-dir=/etc/network-config"
|
## assert-podman-global-args "network" "--network-config-dir=/etc/network-config"
|
||||||
## assert-podman-global-args "network" "--log-level=debug"
|
## assert-podman-global-args "network" "--log-level=debug"
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
GlobalArgs=--network-cmd-path=/usr/bin/network-cmd
|
|
||||||
GlobalArgs=--network-config-dir=/etc/network-config --log-level=debug
|
GlobalArgs=--network-config-dir=/etc/network-config --log-level=debug
|
||||||
|
|||||||
Reference in New Issue
Block a user