Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podman Network Allows Name/Mode Collisions #11448

Closed
k1rb opened this issue Sep 4, 2021 · 0 comments · Fixed by #11602
Closed

Podman Network Allows Name/Mode Collisions #11448

k1rb opened this issue Sep 4, 2021 · 0 comments · Fixed by #11602
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. network Networking related issue or feature

Comments

@k1rb
Copy link

k1rb commented Sep 4, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman-network names can collide with network modes.

Steps to reproduce the issue:

  1. podman network create private

  2. podman run -d --net="private" example:latest

  3. podman inspect example | jq '.[].NetworkSettings.Networks' has only default podman after specifying a network name that is also a mode.

Describe the results you received:

You can podman network create private without error. When you podman run --network private the network mode is used but not the network with the name private.

Describe the results you expected:

The network should not be created if the name of the network is reserved for modes.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      3.2.3
API Version:  3.2.3
Go Version:   go1.15.14
Built:        Wed Aug 11 03:11:14 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.3
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.29-1.module+el8.4.0+643+525e162a.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: ce0221c919d8326c218a7d4d355d11848e8dd21f'
  cpus: 2
  distribution:
    distribution: '"rocky"'
    version: "8.4"
  eventLogger: file
  hostname: pm1.redacted.net
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.18.0-305.12.1.el8_4.x86_64
  linkmode: dynamic
  memFree: 480059392
  memTotal: 1905295360
  ociRuntime:
    name: runc
    package: runc-1.0.0-74.rc95.module+el8.4.0+643+525e162a.x86_64
    path: /usr/bin/runc
    version: |-
      runc version spec: 1.0.2-dev
      go: go1.15.14
      libseccomp: 2.5.1
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 2160787456
  swapTotal: 2210394112
  uptime: 12h 14m 57.27s (Approximately 0.50 days)
registries:
  search:
  - registry.access.redhat.com
  - registry.redhat.io
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 2
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 3
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 3.2.3
  Built: 1628676674
  BuiltTime: Wed Aug 11 03:11:14 2021
  GitCommit: ""
  GoVersion: go1.15.14
  OsArch: linux/amd64
  Version: 3.2.3

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.2.3-0.10.module+el8.4.0+643+525e162a.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

No

Additional environment details (AWS, VirtualBox, physical, etc.):

Rocky Linux 8.4 in KVM\QEMU VM

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 4, 2021
@Luap99 Luap99 self-assigned this Sep 4, 2021
@Luap99 Luap99 added network Networking related issue or feature 4.0 labels Sep 12, 2021
Luap99 added a commit to Luap99/libpod that referenced this issue Sep 16, 2021
`podman network create` should not allow users to create networks with a
name which is already used for a network mode in `podman run --network`.

Fixes containers#11448

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. network Networking related issue or feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants