Skip to content

Commit 57c62b9

Browse files
committed
common: remove slirp from docs, configs and tests
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 68d7263 commit 57c62b9

File tree

6 files changed

+13
-100
lines changed

6 files changed

+13
-100
lines changed

common/docs/containers.conf.5.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ Logging driver for the container. Currently available options are k8s-file, jour
298298

299299
**log_path**=""
300300

301-
Default path for container logs to be stored in. When empty, logs will be stored
301+
Default path for container logs to be stored in. When empty, logs will be stored
302302
in the container's default storage and removed when the container is removed.
303-
A subdirectory named with the container ID will be created under the specified
303+
A subdirectory named with the container ID will be created under the specified
304304
path, and the log file will have the default name `ctr.log` within that directory.
305305
This option can be overridden by the `--log-opt` flag.
306306

@@ -495,8 +495,8 @@ default_subnet_pools = [
495495

496496
**default_rootless_network_cmd**="pasta"
497497

498-
Configure which rootless network program to use by default. Valid options are
499-
`slirp4netns` and `pasta` (default).
498+
Configure which rootless network program to use by default. Valid option is
499+
`pasta` (default).
500500

501501
**network_config_dir**="/etc/cni/net.d/"
502502

@@ -675,7 +675,6 @@ The following binaries are searched in these directories:
675675
- catatonit
676676
- netavark
677677
- pasta
678-
- slirp4netns
679678

680679
Podman machine uses it for these binaries:
681680
- gvproxy
@@ -778,26 +777,6 @@ and pods are visible.
778777

779778
**network_cmd_path**=""
780779

781-
Path to the slirp4netns binary.
782-
783-
**network_cmd_options**=[]
784-
785-
Default options to pass to the slirp4netns binary.
786-
787-
Valid options values are:
788-
789-
- **allow_host_loopback=true|false**: Allow the slirp4netns to reach the host loopback IP (`10.0.2.2`). Default is false.
790-
- **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
791-
- **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
792-
- **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
793-
- **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
794-
- **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
795-
- **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
796-
- **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
797-
- **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
798-
Note: Rootlesskit changes the source IP address of incoming packets to a IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
799-
- **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
800-
801780
**no_pivot_root**=false
802781

803782
Whether to use chroot instead of pivot_root in the runtime.

common/pkg/config/config.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,6 @@ type EngineConfig struct {
403403
// containers and pods will be visible. The default namespace is "".
404404
Namespace string `toml:"namespace,omitempty"`
405405

406-
// NetworkCmdPath is the path to the slirp4netns binary.
407-
NetworkCmdPath string `toml:"network_cmd_path,omitempty"`
408-
409-
// NetworkCmdOptions is the default options to pass to the slirp4netns binary.
410-
// For example "allow_host_loopback=true"
411-
NetworkCmdOptions attributedstring.Slice `toml:"network_cmd_options,omitempty"`
412-
413406
// NoPivotRoot sets whether to set no-pivot-root in the OCI runtime.
414407
NoPivotRoot bool `toml:"no_pivot_root,omitempty"`
415408

@@ -620,7 +613,7 @@ type NetworkConfig struct {
620613
DefaultSubnetPools []SubnetPool `toml:"default_subnet_pools,omitempty"`
621614

622615
// DefaultRootlessNetworkCmd is used to set the default rootless network
623-
// program, either "slirp4nents" (default) or "pasta".
616+
// program, currently only "pasta".
624617
DefaultRootlessNetworkCmd string `toml:"default_rootless_network_cmd,omitempty"`
625618

626619
// NetworkConfigDir is where network configuration files are stored.

common/pkg/config/config_local_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ var _ = Describe("Config Local", func() {
147147
config, err := newLocked(&Options{}, &paths{})
148148
gomega.Expect(err).ToNot(gomega.HaveOccurred())
149149
gomega.Expect(config.Network.DefaultRootlessNetworkCmd).To(gomega.Equal("pasta"))
150-
// When
151-
config2, err := newLocked(&Options{}, &paths{etc: "testdata/containers_default.conf"})
152-
// Then
153-
gomega.Expect(err).ToNot(gomega.HaveOccurred())
154-
gomega.Expect(config2.Network.DefaultRootlessNetworkCmd).To(gomega.Equal("slirp4netns"))
155150
})
156151

157152
It("should fail on invalid device mode", func() {

common/pkg/config/containers.conf

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ default_sysctls = [
216216
#
217217
#log_driver = "k8s-file"
218218

219-
# Default path for container logs to be stored in. When empty, logs will be stored
219+
# Default path for container logs to be stored in. When empty, logs will be stored
220220
# in the container's default storage and removed when the container is removed.
221-
# A subdirectory named with the container ID will be created under the specified
221+
# A subdirectory named with the container ID will be created under the specified
222222
# path, and the log file will have the default name `ctr.log` within that directory.
223223
# This option can be overridden by the `--log-opt` flag.
224-
#
224+
#
225225
#log_path = ""
226226

227227
# Maximum size allowed for the container log file. Negative numbers indicate
@@ -420,8 +420,8 @@ default_sysctls = [
420420

421421

422422

423-
# Configure which rootless network program to use by default. Valid options are
424-
# `slirp4netns` and `pasta` (default).
423+
# Configure which rootless network program to use by default. Only valid option
424+
# is `pasta` (default).
425425
#
426426
#default_rootless_network_cmd = "pasta"
427427

@@ -666,32 +666,6 @@ default_sysctls = [
666666
#
667667
#namespace = ""
668668

669-
# Path to the slirp4netns binary
670-
#
671-
#network_cmd_path = ""
672-
673-
# Default options to pass to the slirp4netns binary.
674-
# Valid options values are:
675-
#
676-
# - allow_host_loopback=true|false: Allow the slirp4netns to reach the host loopback IP (`10.0.2.2`).
677-
# Default is false.
678-
# - mtu=MTU: Specify the MTU to use for this network. (Default is `65520`).
679-
# - cidr=CIDR: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
680-
# - enable_ipv6=true|false: Enable IPv6. Default is true. (Required for `outbound_addr6`).
681-
# - outbound_addr=INTERFACE: Specify the outbound interface slirp should bind to (ipv4 traffic only).
682-
# - outbound_addr=IPv4: Specify the outbound ipv4 address slirp should bind to.
683-
# - outbound_addr6=INTERFACE: Specify the outbound interface slirp should bind to (ipv6 traffic only).
684-
# - outbound_addr6=IPv6: Specify the outbound ipv6 address slirp should bind to.
685-
# - port_handler=rootlesskit: Use rootlesskit for port forwarding. Default.
686-
# Note: Rootlesskit changes the source IP address of incoming packets to a IP address in the container
687-
# network namespace, usually `10.0.2.100`. If your application requires the real source IP address,
688-
# e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for
689-
# rootless containers when connected to user-defined networks.
690-
# - port_handler=slirp4netns: Use the slirp4netns port forwarding, it is slower than rootlesskit but
691-
# preserves the correct source IP address. This port handler cannot be used for user-defined networks.
692-
#
693-
#network_cmd_options = []
694-
695669
# Whether to use chroot instead of pivot_root in the runtime
696670
#
697671
#no_pivot_root = false

common/pkg/config/containers.conf-freebsd

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ default_sysctls = [
169169
#
170170
#log_driver = "k8s-file"
171171

172-
# Default path for container logs to be stored in. When empty, logs will be stored
172+
# Default path for container logs to be stored in. When empty, logs will be stored
173173
# in the container's default storage and removed when the container is removed.
174-
# A subdirectory named with the container ID will be created under the specified
174+
# A subdirectory named with the container ID will be created under the specified
175175
# path, and the log file will have the default name `ctr.log` within that directory.
176176
# This option can be overridden by the `--log-opt` flag.
177-
#
177+
#
178178
#log_path = ""
179179

180180
# Maximum size allowed for the container log file. Negative numbers indicate
@@ -499,32 +499,6 @@ default_sysctls = [
499499
#
500500
#namespace = ""
501501

502-
# Path to the slirp4netns binary
503-
#
504-
#network_cmd_path = ""
505-
506-
# Default options to pass to the slirp4netns binary.
507-
# Valid options values are:
508-
#
509-
# - allow_host_loopback=true|false: Allow the slirp4netns to reach the host loopback IP (`10.0.2.2`).
510-
# Default is false.
511-
# - mtu=MTU: Specify the MTU to use for this network. (Default is `65520`).
512-
# - cidr=CIDR: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
513-
# - enable_ipv6=true|false: Enable IPv6. Default is true. (Required for `outbound_addr6`).
514-
# - outbound_addr=INTERFACE: Specify the outbound interface slirp should bind to (ipv4 traffic only).
515-
# - outbound_addr=IPv4: Specify the outbound ipv4 address slirp should bind to.
516-
# - outbound_addr6=INTERFACE: Specify the outbound interface slirp should bind to (ipv6 traffic only).
517-
# - outbound_addr6=IPv6: Specify the outbound ipv6 address slirp should bind to.
518-
# - port_handler=rootlesskit: Use rootlesskit for port forwarding. Default.
519-
# Note: Rootlesskit changes the source IP address of incoming packets to a IP address in the container
520-
# network namespace, usually `10.0.2.100`. If your application requires the real source IP address,
521-
# e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for
522-
# rootless containers when connected to user-defined networks.
523-
# - port_handler=slirp4netns: Use the slirp4netns port forwarding, it is slower than rootlesskit but
524-
# preserves the correct source IP address. This port handler cannot be used for user-defined networks.
525-
#
526-
#network_cmd_options = []
527-
528502
# Whether to use chroot instead of pivot_root in the runtime
529503
#
530504
#no_pivot_root = false

common/pkg/config/testdata/containers_default.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ network_config_dir = "/etc/cni/net.d/"
126126

127127
default_subnet_pools = [{"base" = "10.89.0.0/16", "size" = 24}, {"base" = "10.90.0.0/15", "size" = 24}]
128128

129-
default_rootless_network_cmd = "slirp4netns"
130-
131129
# firewall driver to be used by default
132130
firewall_driver = "none"
133131

0 commit comments

Comments
 (0)