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

Static IP address (IPV6) is not being assigned to container. Keeps getting taken by another container #25175

Open
Ttfgggf opened this issue Jan 30, 2025 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. network Networking related issue or feature

Comments

@Ttfgggf
Copy link

Ttfgggf commented Jan 30, 2025

Issue Description

Describe your issue

It is simlar to two github issues raised in the past regarding Static IP addresses not be respected and their being an IPAM error.

(#15708)

(#21194)

Steps to reproduce the issue

Steps to reproduce the issue

  1. Set MAC Address for containers using PodmanArgs=--mac-address 12:34:56:78:9a:da in a Quadlet File.
  2. Set IP6 within quadlet file for container
  3. After a restart, a container errors and the message is "Error: IPAM error: requested ip address is already allocated to container ID

Describe the results you received

Describe the results you received

Containers for some reason aren't setting the IPv6 address statically.

Describe the results you expected

Describe the results you expected

To set IPv6 address statically for containers and not to deviate from what I have set it as.

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

host:
  arch: amd64
  buildahVersion: 1.38.1
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-1.2.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: unknown'
  cpuUtilization:
    idlePercent: 98.68
    systemPercent: 0.43
    userPercent: 0.9
  cpus: 12
  databaseBackend: sqlite
  distribution:
    distribution: opensuse-tumbleweed
    version: "20250128"
  eventLogger: journald
  freeLocks: 2028
  hostname: thehomesystemserver
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.13.0-1-default
  linkmode: dynamic
  logDriver: journald
  memFree: 330022912
  memTotal: 16518098944
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.2.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.1.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.1.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-20250121.4f2c8e7-1.1.x86_64
    version: |
      pasta 20250121.4f2c8e7-1.1
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: true
    capabilities: 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: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 17h 31m 40.00s (Approximately 0.71 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.opensuse.org
  - registry.suse.com
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 16
    paused: 0
    running: 16
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 343943413760
  graphRootUsed: 13907365888
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 40
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.3.2
  Built: 1737526969
  BuiltTime: Wed Jan 22 06:22:49 2025
  GitCommit: ""
  GoVersion: go1.23.4
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.2

Podman in a container

Yes

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@Ttfgggf Ttfgggf added the kind/bug Categorizes issue or PR as related to a bug. label Jan 30, 2025
@Luap99
Copy link
Member

Luap99 commented Jan 31, 2025

Please provide a proper reproducer, how is the network and the container created?

@Ttfgggf
Copy link
Author

Ttfgggf commented Jan 31, 2025

Please provide a proper reproducer, how is the network and the container created?

So the network that is created is a MacVLAN based using the macvlan driver
Running with the IPAM driver of host-local.
IP range is allocated from the private IPv4 addresses and GUA's for IPv6.
.network file specifies a parent interface which is linked to the NIC on the host system.

Each container is assigned an IPv4 and IPv6 address using IP and IP6 directives within each container quadlet file.
Some containers are assigned a MAC address using PodmanArgs (as mentioned above already).

@sbrivio-rh sbrivio-rh added the network Networking related issue or feature label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. network Networking related issue or feature
Projects
None yet
Development

No branches or pull requests

3 participants