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

Unable to assign multiple IP addresses from the same network #14490

Closed
stigger opened this issue Jun 5, 2022 · 2 comments
Closed

Unable to assign multiple IP addresses from the same network #14490

stigger opened this issue Jun 5, 2022 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@stigger
Copy link

stigger commented Jun 5, 2022

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

/kind feature

Description

I used to have the following cni network:

{
    "cniVersion": "0.3.0",
    "name": "eno2",
    "plugins": [
      {
        "type": "macvlan",
        "master": "eno2",
        "ipam": {
          "type": "static",
          "addresses": [
            {
              "address": "192.168.130.2/24",
              "gateway": "192.168.130.1"
            },
            {
              "address": "192.168.130.3/24",
              "gateway": "192.168.130.1"
            }
          ],
          "routes": [
            { "dst": "0.0.0.0/0" }
          ]
        }
      }
    ]
}

This network is not supported since 4.0 (unsupported ipam plugin static), and I don't think there is a way to match that behavior. I tried to replicate this with a host-local network and per-container arguments (--net eno2:ip=192.168.130.2 --net eno2:ip=192.168.130.3, --net eno2:ip=192.168.130.2 --net eno2_copy:ip=192.168.130.3), but looks like it's just not possible.

Output of podman version:

Client:       Podman Engine
Version:      4.0.2
API Version:  4.0.2
Go Version:   go1.17.7

Built:      Tue Apr 19 12:16:32 2022
OS/Arch:    linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.24.1
  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.1.0-1.module+el8.6.0+14877+f643d2d6.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: 87b7a9037cbd1d81288bdf2d6705dfda889f7cf9'
  cpus: 12
  distribution:
    distribution: '"rhel"'
    version: "8.6"
  eventLogger: file
  hostname: some.host
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.18.0-348.23.1.el8_5.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 2808901632
  memTotal: 16493907968
  networkBackend: cni
  ociRuntime:
    name: runc
    package: runc-1.0.3-2.module+el8.6.0+14877+f643d2d6.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.3
      spec: 1.0.2-dev
      go: go1.17.7
      libseccomp: 2.5.2
  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: /bin/slirp4netns
    package: slirp4netns-1.1.8-2.module+el8.6.0+14877+f643d2d6.x86_64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 0
  swapTotal: 0
  uptime: 231h 48m 18.5s (Approximately 9.62 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 15
    paused: 0
    running: 11
    stopped: 4
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /some/path
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 60
  runRoot: /var/run/containers/storage
  volumePath: /some/path
version:
  APIVersion: 4.0.2
  Built: 1650363392
  BuiltTime: Tue Apr 19 12:16:32 2022
  GitCommit: ""
  GoVersion: go1.17.7
  OsArch: linux/amd64
  Version: 4.0.2

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

podman-4.0.2-6.module+el8.6.0+14877+f643d2d6.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/main/troubleshooting.md)

No

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 5, 2022
@mheon
Copy link
Member

mheon commented Jun 6, 2022

@Luap99 This isn't supported at present, right? We should probably return an error on attempting it.

@Luap99
Copy link
Member

Luap99 commented Jun 7, 2022

This should be fixed with v.4.1 (containers/common#965), @stigger please test with that version.

Podman should be able to handle all cni configs to run containers. However it may not be able to properly display the network information in network inspect.

@Luap99 Luap99 closed this as completed Jun 7, 2022
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants