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

Quadlets does not create systemd unit for pod and services with pod #24658

Open
lacosteque opened this issue Nov 23, 2024 · 0 comments
Open

Quadlets does not create systemd unit for pod and services with pod #24658

lacosteque opened this issue Nov 23, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@lacosteque
Copy link

lacosteque commented Nov 23, 2024

Issue Description

Quadlets does not create pod unit for systemd.
If you specify the Pod membership in the container, then it also skips and does not create systemd unit.

Steps to reproduce the issue

  1. According to the documentation, I am creating a pod and a service.
  2. If you remove the pod link from the container, then everything is ok.

Describe the results you received

  1. With pod

$ pwd
/home/podman/.config/containers/systemd

$ ls -l
centos.container
test.pod

$ cat centos.container
[Container]
Image=quay.io/centos/centos:latest
Exec=sh -c "sleep inf"
Pod=test.pod

$ systemctl --user daemon-reload

$ ls -la /run/user/1039/systemd/generator/
ls: unable to access '/run/user/1039/systemd/generator/': There is no such file or directory

  1. Without pod

$ cat centos.container
[Container]
Image=quay.io/centos/centos:latest
Exec=sh -c "sleep inf"

$ systemctl --user daemon-reload

$ ls -la /run/user/1039/systemd/generator/

-rw-r--r--. 1 podman podman 676 ноя 23 09:36 centos.service

Describe the results you expected

A systemd unit should have been created for the container and pod.

podman info output

host:
  arch: amd64
  buildahVersion: 1.33.10
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.10-1.module+el8.10.0+90429+ee702c5c.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: 7da50ca5d9ce2ffe767ca2bf48dd3d25d7ec7374'
  cpuUtilization:
    idlePercent: 95.82
    systemPercent: 1.29
    userPercent: 2.9
  cpus: 8
  databaseBackend: sqlite
  distribution:
    distribution: ol
    variant: server
    version: "8.10"
  eventLogger: file
  freeLocks: 2045
  hostname: production
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1002
      size: 1
    - container_id: 1
      host_id: 1148576
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1039
      size: 1
    - container_id: 1
      host_id: 1148576
      size: 65536
  kernel: 5.4.17-2136.335.4.el8uek.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 1831870464
  memTotal: 8319131648
  networkBackend: cni
  networkBackendInfo:
    backend: cni
    dns:
      package: podman-plugins-4.9.4-15.0.1.module+el8.10.0+90429+ee702c5c.x86_64
      path: /usr/libexec/cni/dnsname
      version: |-
        CNI dnsname plugin
        version: 1.4.0-dev
        commit: unknown
        CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0
    package: containernetworking-plugins-1.4.0-5.module+el8.10.0+90429+ee702c5c.x86_64
    path: /usr/libexec/cni
  ociRuntime:
    name: runc
    package: runc-1.1.12-5.module+el8.10.0+90429+ee702c5c.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.1.12
      spec: 1.0.2-dev
      go: go1.22.7 (Red Hat 1.22.7-1.module+el8.10.0+90426+810ab996)
      libseccomp: 2.5.2
  os: linux
  pasta:
    executable: ""
    package: ""
    version: ""
  remoteSocket:
    exists: true
    path: /run/user/1039/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: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.3-1.module+el8.10.0+90429+ee702c5c.x86_64
    version: |-
      slirp4netns version 1.2.3
      commit: c22fde291bb35b354e6ca44d13be181c76a0a432
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 1073733632
  swapTotal: 1073733632
  uptime: 41h 8m 13.00s (Approximately 1.71 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - container-registry.oracle.com
  - docker.io
store:
  configFile: /home/podman/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 1
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/podman/.local/share/containers/storage
  graphRootAllocated: 125663449088
  graphRootUsed: 87387820032
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 28
  runRoot: /tmp/containers-user-1039/containers
  transientStore: false
  volumePath: /home/podman/.local/share/containers/storage/volumes
version:
  APIVersion: 4.9.4-rhel
  Built: 1730809515
  BuiltTime: Tue Nov  5 15:25:15 2024
  GitCommit: ""
  GoVersion: go1.22.7 (Red Hat 1.22.7-1.module+el8.10.0+90426+810ab996)
  Os: linux
  OsArch: linux/amd64
  Version: 4.9.4-rhel

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

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

@lacosteque lacosteque added the kind/bug Categorizes issue or PR as related to a bug. label Nov 23, 2024
@lacosteque lacosteque changed the title Quadlets does not create pod and services with for systemd Quadlets does not create systemd unit for pod and services with pod Nov 23, 2024
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.
Projects
None yet
Development

No branches or pull requests

1 participant