Project

General

Profile

Bug #46654

Unsupported podman container configuration via systemd

Added by Juan Miguel Olmo Martínez 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cephadm (binary)
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

Description of problem:
As per https://bugzilla.redhat.com/show_bug.cgi?id=1834974#c4 running podman containers via systemd without PIDfile and Type=forking attributes isn't a supported configuration.

If this is not fixed, this will have several collateral effects, one of the most important is that we are wasting disk space not cleaning properly deleted containers.

Version-Release number of selected component (if applicable):

# ceph --version
ceph version 15.2.4-9.el8cp (fd4d62d568194c0dbb787e1845e65ed5c1de1b1f) octopus (stable)
# rpm -qa cephadm
cephadm-15.2.4-9.el8cp.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Deploy ceph with cephadm

Actual results:

# systemctl show ceph-b2692c62-c535-11ea-a48b-fa163e07380d@mon.ofgnapinv-1.service|egrep '(Type|PIDFile)'
Type=simple

# systemctl cat ceph-b2692c62-c535-11ea-a48b-fa163e07380d@mon.ofgnapinv-1.service
# /etc/systemd/system/ceph-b2692c62-c535-11ea-a48b-fa163e07380d@.service
# generated by cephadm
[Unit]
Description=Ceph %i for b2692c62-c535-11ea-a48b-fa163e07380d

# According to:
#   http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
# these can be removed once ceph-mon will dynamically change network
# configuration.
After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target

PartOf=ceph-b2692c62-c535-11ea-a48b-fa163e07380d.target
Before=ceph-b2692c62-c535-11ea-a48b-fa163e07380d.target

[Service]
LimitNOFILE=1048576
LimitNPROC=1048576
EnvironmentFile=-/etc/environment
ExecStartPre=-/bin/podman rm ceph-b2692c62-c535-11ea-a48b-fa163e07380d-%i
ExecStart=/bin/bash /var/lib/ceph/b2692c62-c535-11ea-a48b-fa163e07380d/%i/unit.run
ExecStop=-/bin/podman stop ceph-b2692c62-c535-11ea-a48b-fa163e07380d-%i
ExecStopPost=-/bin/bash /var/lib/ceph/b2692c62-c535-11ea-a48b-fa163e07380d/%i/unit.poststop
KillMode=none
Restart=on-failure
RestartSec=10s
TimeoutStartSec=120
TimeoutStopSec=120
StartLimitInterval=30min
StartLimitBurst=5

[Install]
WantedBy=ceph-b2692c62-c535-11ea-a48b-fa163e07380d.target

Expected results:

# systemctl show ceph-b2692c62-c535-11ea-a48b-fa163e07380d@mon.ofgnapinv-1.service|egrep '(Type|PIDFile)'
PIDFile=/path/to/container/pidfile.pid
Type=forking

Related issues

Related to Orchestrator - Bug #46036: cephadm: killmode=none: systemd units failed, but containers still running Resolved

History

#1 Updated by Sebastian Wagner 5 months ago

  • Description updated (diff)

#2 Updated by Sebastian Wagner 5 months ago

  • Related to Bug #46036: cephadm: killmode=none: systemd units failed, but containers still running added

#4 Updated by Sebastian Wagner 5 months ago

interestingly, Red Hat recommends killmode=none for this setup: https://www.redhat.com/sysadmin/podman-shareable-systemd-services

#5 Updated by Sebastian Wagner 4 months ago

  • Assignee set to Adam King

#7 Updated by Adam King 3 months ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 36800

#8 Updated by Adam King 3 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF