containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.71k stars 2.41k forks source link

quadlet packaging: rootless `.container` generator not set up properly (kubic, ubuntu22.04) #17679

Closed Timost closed 1 year ago

Timost commented 1 year ago

Issue Description

I'm testing quadlet based container management on an Ubuntu 22.04 system with podman 4.4.2 installed using the kubic repositories.

I know that the kubic repositories are best efforts and not production ready. Nonetheless, I suspect the packaging of quadlet for ubuntu isn't working properly.

Here is what I have found out so far:

I'm using a non standard umask so it's probably causing issues with the workflow, but I still think the simlinks should be created at installation time

Steps to reproduce the issue

Steps to reproduce the issue

  1. follow https://podman.io/getting-started/installation.html#ubuntu
  2. apt install podman
  3. check the content of /usr/lib/systemd/user-generators/ and /usr/lib/systemd/system-generators/ for the missing podman/quadlet generators

Describe the results you received

Missing symlinks for the systemd generators

Describe the results you expected

Podman systemd generators are properly setup in /usr/lib/systemd/user-generators/ and /usr/lib/systemd/system-generators/

podman info output

host:
  arch: amd64
  buildahVersion: 1.29.0
  cgroupControllers:
  - memory
  - pids
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon_2:2.1.7-0ubuntu22.04+obs15.3_amd64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 99.16
    systemPercent: 0.32
    userPercent: 0.52
  cpus: 4
  distribution:
    codename: jammy
    distribution: ubuntu
    version: "22.04"
  eventLogger: journald
  hostname: xxxxxxxx
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 100
      size: 1
    - container_id: 1
      host_id: 296608
      size: 65536
    uidmap:
    - container_id: 0
      host_id: yyyy
      size: 1
    - container_id: 1
      host_id: 296608
      size: 65536
  kernel: 5.15.0-67-generic
  linkmode: dynamic
  logDriver: journald
  memFree: 6636576768
  memTotal: 7856308224
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun_1.8.1-0ubuntu22.04+obs49.3_amd64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.1
      commit: f8a096be060b22ccd3d5f3ebe44108517fbf6c30
      rundir: /run/user/yyyy/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/yyyy/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,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns_1.2.0-0ubuntu22.04+obs10.47_amd64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 4h 0m 13.00s (Approximately 0.17 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/xxxx/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/xxxx/.local/share/containers/storage
  graphRootAllocated: 75226456064
  graphRootUsed: 2935439360
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/user/yyyy/containers
  transientStore: false
  volumePath: /home/xxxx/.local/share/containers/storage/volumes
version:
  APIVersion: 4.4.2
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.18.1
  Os: linux
  OsArch: linux/amd64
  Version: 4.4.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Additional information

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

Luap99 commented 1 year ago

@lsm5 PTAL

rsommer commented 1 year ago

The user-generator-symlink must be named something like podman-user-generator to switch quadlet to user mode. See https://github.com/containers/podman/blob/f7ac9fd5d6b7eada42cc3bb9ec33f9ea07df3958/cmd/quadlet/main.go#L297

Timost commented 1 year ago

Ha nice catch ! Thank you, I'll give it a try.

lsm5 commented 1 year ago

latest build does create the symlinks. Let me know if that fixes the issue

lsm5 commented 1 year ago

Gonna close this. Please reopen if the issue persists with the latest build on kubic unstable.

rsommer commented 1 year ago

Does work now without manually creating the symlinks, thanks.