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 2132360 - [RFE] python-podman: Podman support to perform custom actions on unhealthy containers [rhel-8.7.0.z]
Summary: [RFE] python-podman: Podman support to perform custom actions on unhealthy co...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-podman
Version: 8.6
Hardware: Unspecified
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Alex Jia
URL:
Whiteboard:
Depends On: 2131741
Blocks: 2136283
TreeView+ depends on / blocked
 
Reported: 2022-10-05 12:02 UTC by RHEL Program Management Team
Modified: 2023-09-19 04:27 UTC (History)
21 users (show)

Fixed In Version: python-podman-4.2.0-2.el8_7
Doc Type: Enhancement
Doc Text:
Clone Of: 2131741
: 2136283 (view as bug list)
Environment:
Last Closed: 2022-11-08 11:30:48 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-135711 0 None None None 2022-10-05 12:21:04 UTC
Red Hat Product Errata RHSA-2022:7822 0 None None None 2022-11-08 11:31:12 UTC

Comment 2 Oneata Mircea Teodor 2022-10-18 07:40:23 UTC
Hello,
All 0Day errata must be submitted to QE by the 26th of October

Comment 4 Jindrich Novy 2022-10-18 14:41:16 UTC
Charlie, assuming the fix for this already landed in podman-py 4.2.0 or we need forwardport?

Comment 8 Charlie Doern 2022-10-21 20:10:10 UTC
v4.2.1 contains the new fix: https://github.com/containers/podman-py/releases/tag/v4.2.1

Comment 9 Alex Jia 2022-10-24 08:19:33 UTC
This bug has been verified on python3-podman-4.2.0-2.module+el8.7.0+16994+ed730e67.

[test@koza-4 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.7 (Ootpa)

[test@koza-4 ~]$ rpm -q python3-podman podman runc systemd kernel
python3-podman-4.2.0-2.module+el8.7.0+16994+ed730e67.noarch
podman-4.2.0-3.module+el8.7.0+16994+ed730e67.x86_64
runc-1.1.4-1.module+el8.7.0+16994+ed730e67.x86_64
systemd-239-68.el8.x86_64
kernel-4.18.0-425.3.1.el8.x86_64

[test@koza-4 ~]$ podman system service -t 0 &
[1] 20273

[test@koza-4 ~]$ netstat -lanp|grep podman.sock
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
unix  2      [ ACC ]     STREAM     LISTENING     73904    20287/podman         /run/user/1000/podman/podman.sock

[test@koza-4 ~]$ cat test.py 
"""Demonstrate PodmanClient."""
import json
from podman import PodmanClient

alpine_image = "quay.io/libpod/alpine:latest"
uri = "unix:///run/user/1000/podman/podman.sock"

def test_container_healtchecks():
    """Test passing various healthcheck options"""
    with PodmanClient(base_url=uri) as client:

        containers = []
        parameters = {}

        version = client.version()
        print("Release: ", version["Version"])
        print("Compatible API: ", version["ApiVersion"])
        print("Podman API: ", version["Components"][0]["Details"]["APIVersion"], "\n")

        parameters['healthcheck'] = {'Test': ['CMD-SHELL curl http://localhost || exit']}
        parameters['health_check_on_failure_action'] = 1
        container = client.containers.create(alpine_image, **parameters)
        print("current container:%s" % container)
        containers.append(container)


if __name__ == "__main__":
    test_container_healtchecks()

[test@koza-4 ~]$ podman ps -a
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
[test@koza-4 ~]$ podman pull quay.io/libpod/alpine:latest
Trying to pull quay.io/libpod/alpine:latest...
Getting image source signatures
Copying blob 9d16cba9fb96 done  
Copying config 9617696764 done  
Writing manifest to image destination
Storing signatures
961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[test@koza-4 ~]$ python3 test.py
Release:  4.2.0
Compatible API:  1.41
Podman API:  4.2.0 

current container:<Container: e08469330b>
[test@koza-4 ~]$ podman ps -a
CONTAINER ID  IMAGE                         COMMAND     CREATED        STATUS      PORTS       NAMES
e08469330b86  quay.io/libpod/alpine:latest  /bin/sh     4 seconds ago  Created                 gallant_mahavira

Comment 13 errata-xmlrpc 2022-11-08 11:30:48 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 (Low: container-tools:rhel8 security, bug fix, and enhancement update), 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/RHSA-2022:7822

Comment 14 Red Hat Bugzilla 2023-09-19 04:27:50 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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