podman: Unable to create pod with specific CNI network
/kind feature
Description
Hello, I have created multiple different CNI conflists. I don’t seem able to specify which conflist a pod’s infra container will use.
~> ls -1 /etc/cni/net.d
87-podman-bridge.conflist
89-demo-bridge.conflist
In this case conflist 87 is the default podman network, and 89 is a custom demo network (10.89.0.0/24) which I intend to use for certain pods. I am able to use --net=demo when creating containers but not when creating pods.
Steps to reproduce the issue:
-
Create a second CNI with different IP range.
-
podman create pod- a pod and infra container is created. Note that--netargument is NOT valid here. -
Lookup infra container:
podman pod inspect -l | grep infraContainerIDand check its IP address:podman inspect 97...93 | grep IPAddress
Describe the results you received: The infra container received an IP address from the first available CNI. In this case, 10.88.0.6 was selected.
Describe the results you expected:
I expected to be able to supply --net=demo at step 2 so that 10.89.0.0/24 would be used for the infra pod.
Additional information you deem important (e.g. issue happens only occasionally):
I attempted to supply --net=demo when adding containers to the pod, figuring maybe the infra container would be moved to that network. However it only resulted in the containers getting their own individual IP addresses from demo. This breaks the shared-localhost concept which is half of why pods are useful to begin with.
Output of podman version:
Version: 1.0.5
Go Version: go1.11.6
OS/Arch: linux/amd64
I know this is old!! CentOS Stream 8 doesn’t have any way to upgrade. I’ve checked the latest podman-pod-create.1.md to ensure --network is still not accepted in pod create.
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.11.6
podman version: 1.0.5
host:
BuildahVersion: 1.6-dev
Conmon:
package: podman-1.0.5-1.gitf604175.module_el8.0.0+194+ac560166.x86_64
path: /usr/libexec/podman/conmon
version: 'conmon version 1.14.0-dev, commit: db4132fdf7a7a29546679331f7119a745266f613-dirty'
Distribution:
distribution: '"centos"'
version: "8"
MemFree: 32315129856
MemTotal: 33440043008
OCIRuntime:
package: runc-1.0.0-55.rc5.dev.git2abd837.module_el8.0.0+58+91b614e7.x86_64
path: /usr/bin/runc
version: 'runc version spec: 1.0.0'
SwapFree: 0
SwapTotal: 0
arch: amd64
cpus: 4
hostname: ausbox
kernel: 4.18.0-147.6.el8.x86_64
os: linux
rootless: false
uptime: 1h 4m 25.23s (Approximately 0.04 days)
insecure registries:
registries: []
registries:
registries:
- registry.redhat.io
- quay.io
- docker.io
store:
ConfigFile: /etc/containers/storage.conf
ContainerStore:
number: 4
GraphDriverName: overlay
GraphOptions: null
GraphRoot: /var/lib/containers/storage
GraphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 2
RunRoot: /var/run/containers/storage
Package info (e.g. output of rpm -q podman or apt list podman):
podman-1.0.5-1.gitf604175.module_el8.0.0+194+ac560166.x86_64
Additional environment details (AWS, VirtualBox, physical, etc.): Physical machine, blah blah.
My intention is to create a CNI network inside of a WireGuard VPN space so that individual pods can be issued VPN-routable IP addresses.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to mheon/libpod by mheon 4 years ago
- Add network options to podman pod create Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported... — committed to snj33v/libpod by mheon 4 years ago
If someone were to open a PR on this, I am sure we would consider it.
We’d need the ability to set
pod.state.InfraContainerID(presently it’s not really accessible), but only once - I don’t expect that we’ll allow infra containers to be overwritten once set, at least at first.withInfraContainer()will need to be made public, and wired into the command line for container creation. It might also be necessary to make some changes to pod creation to allow the pod namespace bools (UsePodPID,UsePodIPCet al) to be set if an infra container was not created with the pod (so we still try and share namespaces when the infra container is eventually created).