RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1736746 - podman: containers may get stopped by systemd instead of pacemaker on shutdown
Summary: podman: containers may get stopped by systemd instead of pacemaker on shutdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: resource-agents
Version: 8.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 8.1
Assignee: Oyvind Albrigtsen
QA Contact: pkomarov
URL:
Whiteboard:
Depends On:
Blocks: 1738303
TreeView+ depends on / blocked
 
Reported: 2019-08-01 20:46 UTC by Damien Ciabrini
Modified: 2020-11-14 09:45 UTC (History)
7 users (show)

Fixed In Version: resource-agents-4.1.1-31.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1738303 (view as bug list)
Environment:
Last Closed: 2019-11-05 20:35:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ClusterLabs resource-agents pull 1374 0 'None' 'closed' 'Generate addition drop-in dependencies for podman containers' 2019-11-27 14:32:52 UTC
Red Hat Product Errata RHBA-2019:3307 0 None None None 2019-11-05 20:36:11 UTC

Description Damien Ciabrini 2019-08-01 20:46:25 UTC
Description of problem:

When podman creates a container, it creates two additional systemd
scopes dynamically:

  - libpod-conmon-<CONTAINERID>.scope - runs a conmon process that
    tracks a container's pid1 into a dedicated pidfile.
  - libpod-<CONTAINERID>.scope - created dynamically by runc,
    for cgroups accounting.

The liveness of the scopes is directly tied to that of the podman
container.

On shutdown, systemd stops both services like pacemaker _and_ scopes,
in no particular order. Which means that it can happen that systemd
stops the container's scopes _before_ pacemaker itself. When that
it the case, the following :

  - the stopped scope sends a SIGTERM to the pid1 of the pacemaker
    container (i.e. pacemaker remote).
  - this makes the pacemaker container stops.
  - pacemaker notices that the pacemaker remote node stopped
    unexpectedly and pacemaker may try to restart it.

Ultimately the whole sequence of shutdown gets polluted and sometimes
yields an error that blocks the regular shutdown, or block the restart
once the node has rebooted.

There's no option in podman to configure the scope file to not stop
before pacemaker is stopped. The only workaround so far is to inject
an additional drop-in file for each scope, with extra dependencies
that prevents systemd from stopping the scopes file before pacemaker
is stopped (so effectively, giving back the entire control to
pacemaker).


Version-Release number of selected component (if applicable):
resource-agents-4.1.1-17.el8_0.3.x86_64

How reproducible:
Always

Steps to Reproduce:
1. create a bundle ocf resource in the cluster.
2. shutdown one cluster node
3. check in the journal whether the pacemaker-remote process received a SIGTERM before the pacemaker service was stopped by pacemaker

Actual results:
A pacemaker-managed podman container is stopped by systemd instead of pacemaker

Expected results:
pacemaker should be the only one to stop pacemaker-managed container.

Comment 4 Damien Ciabrini 2019-08-07 14:17:24 UTC
Instruction for testing this fix is available in the clone bz https://bugzilla.redhat.com/show_bug.cgi?id=1738303#c3

Comment 5 pkomarov 2019-09-03 19:11:39 UTC
Verified , 
https://bugzilla.redhat.com/show_bug.cgi?id=1738303#c4

Comment 7 errata-xmlrpc 2019-11-05 20:35:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3307


Note You need to log in before you can comment on or make changes to this bug.