Bug 1687227
| Summary: | [RFE] python-docker-py does not contain init parameter | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Suhaas Bhat <subhat> |
| Component: | python-docker-py | Assignee: | Tomas Tomecek <ttomecek> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.6 | CC: | dconsoli, dornelas, lsu, toneata, ttomecek |
| Target Milestone: | rc | Keywords: | Extras, FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-docker-py-1.10.6-9.el7_6 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-04-23 17:39:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1186913, 1668273 | ||
|
Description
Suhaas Bhat
2019-03-11 01:14:13 UTC
Adding relevant upstream docs: https://docker-py.readthedocs.io/en/stable/api.html?highlight=init#docker.api.container.ContainerApiMixin.create_host_config Your customer specifically asks to update docker-py to a newer version: we can't do that because there was a major backwards incompat change between docker-py version 1 and 2. I will backport the init parameter. # rpm -q docker python-docker-py
docker-1.13.1-96.gitb2f74b2.el7.x86_64
python-docker-py-1.10.6-9.el7_6.noarch
#docker pull busybox
#updatedb
#locate docker-init
/usr/libexec/docker/docker-init-current
/usr/libexec/docker/docker-init-latest
# cat init.py
import docker
c = docker.Client()
x = c.create_container('busybox', 'ls', host_config=c.create_host_config(init=True, init_path="/usr/libexec/docker/docker-init-current"))
print x
print c.inspect_container(x)
{u'Id': u'8a1d651329de6f49f6668006ba15d8163a467864f093c774a9422303e1c1097b', u'Warnings': None}
{u'ExecIDs': None, u'State': {u'Status': u'created', u'Pid': 0, u'OOMKilled': False, u'Dead': False, u'Paused': False, u'Running': False, u'FinishedAt': u'0001-01-01T00:00:00Z', u'Restarting': False, u'Error': u'', u'StartedAt': u'0001-01-01T00:00:00Z', u'ExitCode': 0}, u'Config': {u'Tty': False, u'Cmd': [u'ls'], u'Volumes': None, u'Domainname': u'', u'WorkingDir': u'', u'Image': u'busybox', u'Hostname': u'8a1d651329de', u'StdinOnce': False, u'Labels': {}, u'AttachStdin': False, u'User': u'', u'Env': [u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'], u'Entrypoint': None, u'OnBuild': None, u'AttachStderr': True, u'AttachStdout': True, u'OpenStdin': False}, u'ResolvConfPath': u'', u'HostsPath': u'', u'Args': [], u'Driver': u'devicemapper', u'Path': u'ls', u'HostnamePath': u'', u'RestartCount': 0, u'Name': u'/goofy_bhabha', u'Created': u'2019-04-12T09:48:52.488641222Z', u'GraphDriver': {u'Data': {u'DeviceName': u'docker-253:0-17691080-f066af7f51483707a06afa6ea6c2c853cc68a64522fb1be471dd426d058c0def', u'DeviceSize': u'10737418240', u'DeviceId': u'88'}, u'Name': u'devicemapper'}, u'Mounts': [], u'ProcessLabel': u'system_u:system_r:svirt_lxc_net_t:s0:c115,c773', u'NetworkSettings': {u'Bridge': u'', u'Networks': {u'bridge': {u'NetworkID': u'', u'MacAddress': u'', u'GlobalIPv6PrefixLen': 0, u'Links': None, u'GlobalIPv6Address': u'', u'IPv6Gateway': u'', u'IPAMConfig': None, u'EndpointID': u'', u'IPPrefixLen': 0, u'IPAddress': u'', u'Gateway': u'', u'Aliases': None}}, u'SecondaryIPv6Addresses': None, u'LinkLocalIPv6Address': u'', u'HairpinMode': False, u'IPv6Gateway': u'', u'SecondaryIPAddresses': None, u'SandboxID': u'', u'MacAddress': u'', u'GlobalIPv6Address': u'', u'Gateway': u'', u'LinkLocalIPv6PrefixLen': 0, u'EndpointID': u'', u'SandboxKey': u'', u'GlobalIPv6PrefixLen': 0, u'IPPrefixLen': 0, u'IPAddress': u'', u'Ports': None}, u'AppArmorProfile': u'', u'Image': u'sha256:af2f74c517aac1d26793a6ed05ff45b299a037e1a9eefeae5eacda133e70a825', u'LogPath': u'', u'HostConfig': {u'CpuPeriod': 0, u'MemorySwappiness': -1, u'ContainerIDFile': u'', u'KernelMemory': 0, u'Memory': 0, u'CpuQuota': 0, u'UsernsMode': u'', u'Init': True, u'AutoRemove': False, u'BlkioDeviceReadIOps': None, u'Dns': None, u'ExtraHosts': None, u'PidsLimit': 0, u'DnsSearch': None, u'Privileged': False, u'IOMaximumIOps': 0, u'CpuPercent': 0, u'NanoCpus': 0, u'Ulimits': None, u'CpusetCpus': u'', u'DiskQuota': 0, u'CgroupParent': u'', u'BlkioWeight': 0, u'RestartPolicy': {u'MaximumRetryCount': 0, u'Name': u''}, u'InitPath': u'/usr/libexec/docker/docker-init-current', u'OomScoreAdj': 0, u'BlkioDeviceReadBps': None, u'VolumeDriver': u'', u'ReadonlyRootfs': False, u'CpuShares': 0, u'PublishAllPorts': False, u'MemoryReservation': 0, u'BlkioWeightDevice': None, u'ConsoleSize': [0, 0], u'NetworkMode': u'default', u'BlkioDeviceWriteBps': None, u'Isolation': u'', u'GroupAdd': None, u'CpuRealtimeRuntime': 0, u'Devices': None, u'BlkioDeviceWriteIOps': None, u'Binds': None, u'CpusetMems': u'', u'Cgroup': u'', u'UTSMode': u'', u'PidMode': u'', u'Runtime': u'docker-runc', u'VolumesFrom': None, u'CapDrop': None, u'DnsOptions': None, u'ShmSize': 67108864, u'Links': None, u'CpuRealtimePeriod': 0, u'IpcMode': u'', u'PortBindings': None, u'SecurityOpt': None, u'CapAdd': None, u'CpuCount': 0, u'MemorySwap': 0, u'OomKillDisable': False, u'LogConfig': {u'Config': {}, u'Type': u'journald'}, u'IOMaximumBandwidth': 0}, u'Id': u'8a1d651329de6f49f6668006ba15d8163a467864f093c774a9422303e1c1097b', u'MountLabel': u'system_u:object_r:svirt_sandbox_file_t:s0:c115,c773'}
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:0859 |