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 1772537 - Features incompatibility between docker cli docker API for python
Summary: Features incompatibility between docker cli docker API for python
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-docker-py
Version: 7.7
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: 7.7
Assignee: Tomas Tomecek
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1186913 1762743
TreeView+ depends on / blocked
 
Reported: 2019-11-14 15:01 UTC by Dariusz Wojewódzki
Modified: 2023-03-24 16:02 UTC (History)
3 users (show)

Fixed In Version: python-docker-py-1.10.6-11.el7_7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-04 19:27:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0405 0 None None None 2020-02-04 19:27:13 UTC

Description Dariusz Wojewódzki 2019-11-14 15:01:11 UTC
Description of problem:
Version-Release number of selected component (if applicable):


We are using RHEL7.7 with docker and docker API:
# rpm -qa | grep docker
python-docker-pycreds-0.3.0-9.el7_6.noarch
docker-client-1.13.1-104.git4ef4b30.el7.x86_64
python-docker-py-1.10.6-9.el7_6.noarch
docker-common-1.13.1-104.git4ef4b30.el7.x86_64
docker-1.13.1-104.git4ef4b30.el7.x86_64
docker-rhel-push-plugin-1.13.1-104.git4ef4b30.el7.x86_64

# docker version | grep Version
Version: 1.13.1

# docker API Version 
1.26



We are using healhcheck.
Because dockerfile HEALTHCHECK keyword is not OCI compliant, we do not wish to put in Dockerfile or buildah script. If we do that, our container images may have trouble after running them under podman. We plan migration to podman in the future.
As a result we wish to use parameter used for creating container. Thank to that our images may stay OCI compliant.
 In docker CLI this parameter is:
 '--health-cmd string Command to run to check health' 

We do not use CLI. We use python API. So in our case we wished to use API counterpart of 'health-cmd' option.
Unfortunately RHEL provided python API does not support this such option.
So we have here features incompatibility between RHEL provided CLI and API.


We need a feature in python api for docker, provided by python-docker-py rpm.
Can we expect a fix for that?

Comment 4 Tomas Tomecek 2019-11-15 10:49:39 UTC
Started working on this, the backport seems to be doable.

Comment 12 Alex Jia 2020-01-21 09:59:21 UTC
Thank you Tomas, it works well for me now.

[root@hpe-dl380pgen8-02-vm-7 rpmbuild]# cd BUILD/docker-py-997e583ea9a7b33113edd91d5bee73d25d720448/
[root@hpe-dl380pgen8-02-vm-7 docker-py-997e583ea9a7b33113edd91d5bee73d25d720448]# py.test -vv tests/integration/api_healthcheck_test.py
================================================= test session starts ==================================================
platform linux2 -- Python 2.7.5 -- py-1.4.32 -- pytest-2.7.0 -- /usr/bin/python
rootdir: /root/rpmbuild/BUILD/docker-py-997e583ea9a7b33113edd91d5bee73d25d720448, inifile: pytest.ini
collected 4 items

tests/integration/api_healthcheck_test.py::HealthcheckTest::test_healthcheck_fails PASSED
tests/integration/api_healthcheck_test.py::HealthcheckTest::test_healthcheck_passes PASSED
tests/integration/api_healthcheck_test.py::HealthcheckTest::test_healthcheck_shell_command PASSED
tests/integration/api_healthcheck_test.py::HealthcheckTest::test_healthcheck_start_period PASSED

============================================== 4 passed in 18.11 seconds ===============================================

[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)

[root@hpe-dl380pgen8-02-vm-7 ~]# rpm -q docker kernel python-docker-py
docker-1.13.1-103.git7f2769b.el7.x86_64
kernel-3.10.0-1123.el7.x86_64
python-docker-py-1.10.6-11.el7.noarch

Comment 15 errata-xmlrpc 2020-02-04 19:27:09 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-2020:0405


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