Skip to content

PodName= default value mismatch between documentation and actual behavior #26062

@eriksjolund

Description

@eriksjolund

Issue Description

The default value for PodName= is systemd-%N according to the documentation:

of `systemd-%N` is used, which is the same as the service name but with a `systemd-`

but that does not match the actual behavior of Podman.

Steps to reproduce the issue

  1. Log in to Fedora 42 system as a non-root user
  2. Run command
    mkdir -p ~/.config/containers/systemd
    
  3. Run command
    cat << EOF > .config/containers/systemd/test1.pod
    [Pod]
    PodName=systemd-%N
    EOF
    
  4. Run command
    cat << EOF > .config/containers/systemd/test2.pod
    [Pod]
    EOF
    
  5. Run command
    systemctl --user daemon-reload
    
  6. Run command
    systemctl --user start test1-pod.service
    
  7. Run command
    systemctl --user start test2-pod.service
    
  8. Run command
    podman pod ls
    
    The following output is shown
    POD ID        NAME                STATUS      CREATED         INFRA ID      # OF CONTAINERS
    0df7d2c9296d  systemd-test2      Running     3 seconds ago   1f6db97e5560  1
    5f5ebe41c494  systemd-test1-pod  Running     6 seconds ago   6599edea31d5  1
    

Describe the results you received

In step 8 the generated pod names are systemd-test1-pod and systemd-test2

Describe the results you expected

I expected the pod names to follow the same naming scheme.

podman info output

host:
  arch: amd64
  buildahVersion: 1.39.4
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.13-1.fc42.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.13, commit: '
  cpuUtilization:
    idlePercent: 99.93
    systemPercent: 0.05
    userPercent: 0.01
  cpus: 16
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    version: "42"
  eventLogger: journald
  freeLocks: 2038
  hostname: asus
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1008
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1008
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.14.4-300.fc42.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 6866239488
  memTotal: 7677460480
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.14.0-1.fc42.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.14.0
    package: netavark-1.14.1-1.fc42.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.14.1
  ociRuntime:
    name: crun
    package: crun-1.21-1.fc42.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.21
      commit: 10269840aa07fb7e6b7e1acff6198692d8ff5c88
      rundir: /run/user/1008/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-0^20250415.g2340bbf-1.fc42.x86_64
    version: ""
  remoteSocket:
    exists: true
    path: /run/user/1008/podman/podman.sock
  rootlessNetworkCmd: pasta
  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,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 7676620800
  swapTotal: 7676620800
  uptime: 0h 36m 13.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  configFile: /home/test9/.config/containers/storage.conf
  containerStore:
    number: 5
    paused: 0
    running: 5
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/test9/.local/share/containers/storage
  graphRootAllocated: 16001064960
  graphRootUsed: 9857519616
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/user/1008/containers
  transientStore: false
  volumePath: /home/test9/.local/share/containers/storage/volumes
version:
  APIVersion: 5.4.2
  BuildOrigin: Fedora Project
  Built: 1743552000
  BuiltTime: Wed Apr  2 02:00:00 2025
  GitCommit: be85287fcf4590961614ee37be65eeb315e5d9ff
  GoVersion: go1.24.1
  Os: linux
  OsArch: linux/amd64
  Version: 5.4.2

Podman in a container

No

Privileged Or Rootless

Rootless

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.quadlettriagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions