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

Creating a network bridge fails with '/' (forward slash) character in name #17806

Closed
chiting opened this issue Mar 15, 2023 · 1 comment
Closed
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

@chiting
Copy link

chiting commented Mar 15, 2023

Issue Description

I ran circleci-cli against podman and the container created tries to add a new network bridge in the following format: ZZZ_localbuild-1111111111/FFFFFFFF which is not accepted by podman because it must match a specific regex that doesn't contain the character /.

Docker allows the character / in network names while podman doesn't. If podman is aiming for full compatibility with docker, I think it should also allow it.

It's similar to #17746

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create a network bridge with a / in the name:
podman network create --driver bridge ZZZ_localbuild-1111111111/FFFFFFFF

Describe the results you received

Error: network name ZZZ_localbuild-1111111111/FFFFFFFF invalid: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument

Describe the results you expected

It should be able to create the network and show it in the network list

$ podman network ls
NETWORK ID    NAME        DRIVER
000000000000  podman      bridge
ffffffffffff  ZZZ_localbuild-1111111111/FFFFFFFF bridge

podman info output

$ podman version
client:       Podman Engine
Version:      4.4.2
API Version:  4.4.2
Go Version:   go1.20.1
Git Commit:   74afe26887f814d1c39925a1624851ef3590e79c-dirty
Built:        Fri Feb 24 16:12:57 2023
OS/Arch:      linux/amd64
host:                                                                                                                                                                         
  arch: amd64
  buildahVersion: 1.29.0
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.1.7-1
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: f633919178f6c8ee4fb41b848a056ec33f8d707d'
  cpuUtilization:
    idlePercent: 99.14
    systemPercent: 0.19
    userPercent: 0.68
  cpus: 32
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: hostname
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.2.5-arch1-1
  linkmode: dynamic
  logDriver: journald
  memFree: 41834131456
  memTotal: 67331153920
  networkBackend: cni
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.8.1-1
    path: /usr/bin/crun
    version: |-
      crun version 1.8.1
      commit: f8a096be060b22ccd3d5f3ebe44108517fbf6c30
      rundir: /run/user/1001/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1001/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.2.0-1
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.4
  swapFree: 32211202048
  swapTotal: 32211202048
  uptime: 23h 40m 33.00s (Approximately 0.96 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 506141040640
  graphRootUsed: 156137345024
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 15
  runRoot: /run/user/1001/containers
  transientStore: false
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 4.4.2
  Built: 1677255177
  BuiltTime: Fri Feb 24 16:12:57 2023
  GitCommit: 74afe26887f814d1c39925a1624851ef3590e79c-dirty
  GoVersion: go1.20.1
  Os: linux
  OsArch: linux/amd64
  Version: 4.4.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

No response

@chiting chiting added the kind/bug Categorizes issue or PR as related to a bug. label Mar 15, 2023
@Luap99 Luap99 added the network Networking related issue or feature label Mar 16, 2023
@Luap99
Copy link
Member

Luap99 commented Mar 17, 2023

Oh good, this is much worse then expected. Docker allows basically everything as name.
I close this one and copy this info to #17746, better to only have one issue because this is basically the same problem.

@Luap99 Luap99 closed this as completed Mar 17, 2023
@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 Aug 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 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

No branches or pull requests

2 participants