Skip to content

Commit 38017c4

Browse files
authored
Merge pull request #27811 from ashley-cui/networkcmdpath
Remove network-cmd-path
2 parents ac3a9f8 + aa1d7b1 commit 38017c4

File tree

7 files changed

+1
-38
lines changed

7 files changed

+1
-38
lines changed

cmd/podman/root.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,6 @@ func rootFlags(cmd *cobra.Command, podmanConfig *entities.PodmanConfig) {
582582
pFlags.StringVar(&podmanConfig.ConmonPath, conmonFlagName, "", "Path of the conmon binary")
583583
_ = cmd.RegisterFlagCompletionFunc(conmonFlagName, completion.AutocompleteDefault)
584584

585-
// TODO (6.0): --network-cmd-path is deprecated, remove this option with the next major release
586-
// We need to find all the places that use r.config.Engine.NetworkCmdPath and remove it
587-
networkCmdPathFlagName := "network-cmd-path"
588-
pFlags.StringVar(&podmanConfig.ContainersConf.Engine.NetworkCmdPath, networkCmdPathFlagName, podmanConfig.ContainersConfDefaultsRO.Engine.NetworkCmdPath, "Path to the command for configuring the network")
589-
_ = cmd.RegisterFlagCompletionFunc(networkCmdPathFlagName, completion.AutocompleteDefault)
590-
591585
networkConfigDirFlagName := "network-config-dir"
592586
pFlags.StringVar(&podmanConfig.ContainersConf.Network.NetworkConfigDir, networkConfigDirFlagName, podmanConfig.ContainersConfDefaultsRO.Network.NetworkConfigDir, "Path of the configuration directory for networks")
593587
_ = cmd.RegisterFlagCompletionFunc(networkConfigDirFlagName, completion.AutocompleteDefault)

docs/source/locale/ja/LC_MESSAGES/markdown.po

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31333,10 +31333,6 @@ msgid ""
3133331333
"Windows (excluding WSL2) machines"
3133431334
msgstr ""
3133531335

31336-
#: ../../source/markdown/podman.1.md:98
31337-
msgid "**--network-cmd-path**=*path*"
31338-
msgstr ""
31339-
3134031336
#: ../../source/markdown/podman.1.md:99
3134131337
msgid ""
3134231338
"Path to the `slirp4netns(1)` command binary to use for setting up a "

docs/source/markdown/podman.1.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ Load the specified `containers.conf(5)` module. Can be an absolute or relative
104104
This flag is not supported on the remote client, including Mac and Windows (excluding WSL2) machines.
105105
Further note that the flag is a root-level flag and must be specified before any Podman sub-command.
106106

107-
#### **--network-cmd-path**=*path*
108-
Path to the `slirp4netns(1)` command binary to use for setting up a slirp4netns network.
109-
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.
110-
**Note:** This option is deprecated and will be removed with Podman 6.0. Use the `helper_binaries_dir` option in `containers.conf` instead.
111-
112107
#### **--network-config-dir**=*directory*
113108

114109
Path to the directory where network configuration files are located.

libpod/info_linux.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ func (r *Runtime) setPlatformHostInfo(info *define.HostInfo) error {
5050

5151
info.CgroupsVersion = "v2"
5252

53-
slirp4netnsPath := r.config.Engine.NetworkCmdPath
54-
if slirp4netnsPath == "" {
55-
slirp4netnsPath, _ = r.config.FindHelperBinary(slirp4netns.BinaryName, true)
56-
}
53+
slirp4netnsPath, _ := r.config.FindHelperBinary(slirp4netns.BinaryName, true)
5754
if slirp4netnsPath != "" {
5855
ver, err := version.Program(slirp4netnsPath)
5956
if err != nil {

libpod/options.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,6 @@ func WithConmonPath(path string) RuntimeOption {
180180
}
181181
}
182182

183-
// WithNetworkCmdPath specifies the path to the slirp4netns binary which manages the
184-
// runtime.
185-
func WithNetworkCmdPath(path string) RuntimeOption {
186-
return func(rt *Runtime) error {
187-
if rt.valid {
188-
return define.ErrRuntimeFinalized
189-
}
190-
191-
rt.config.Engine.NetworkCmdPath = path
192-
193-
return nil
194-
}
195-
}
196-
197183
// WithNetworkBackend specifies the name of the network backend.
198184
func WithNetworkBackend(name string) RuntimeOption {
199185
return func(rt *Runtime) error {

pkg/domain/infra/runtime_libpod.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
164164
if fs.Changed("tmpdir") {
165165
options = append(options, libpod.WithTmpDir(cfg.ContainersConf.Engine.TmpDir))
166166
}
167-
if fs.Changed("network-cmd-path") {
168-
options = append(options, libpod.WithNetworkCmdPath(cfg.ContainersConf.Engine.NetworkCmdPath))
169-
}
170167
if fs.Changed("network-backend") {
171168
options = append(options, libpod.WithNetworkBackend(cfg.ContainersConf.Network.NetworkBackend))
172169
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
## assert-podman-global-args "network" "--network-cmd-path=/usr/bin/network-cmd"
21
## assert-podman-global-args "network" "--network-config-dir=/etc/network-config"
32
## assert-podman-global-args "network" "--log-level=debug"
43

54
[Network]
6-
GlobalArgs=--network-cmd-path=/usr/bin/network-cmd
75
GlobalArgs=--network-config-dir=/etc/network-config --log-level=debug

0 commit comments

Comments
 (0)