Bug 1460924 - Cannot run existing container with atomic-1.18.1-2.fc26
Cannot run existing container with atomic-1.18.1-2.fc26
Product: Fedora
Classification: Fedora
Component: atomic (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brent Baude
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-06-13 03:35 EDT by Lukas Slebodnik
Modified: 2017-06-14 00:46 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Slebodnik 2017-06-13 03:35:08 EDT
Description of problem:
I have a quite old container which was created with older version of docker.
I know I should use containers based on new image and drop non-functional ones but it is not an excuse for breaking use cases with new release of atomic utility. And my use-case works well with atomic-1.17.2-2.fc26 

Version-Release number of selected component (if applicable):
sh$ rpm -q atomic docker

How reproducible:

Steps to Reproduce:
I will probably not provide exact steps to reproduce. But I hope we will manage to find an issue. Container was with similar command
   docker run -ti --name covscan --volume=/home/user:/home/user --volume=/dev/shm:/workdir lslebodn/beaker bash

It was created a year ago. So it was probably docker-1.10.1. I can find exact version in dnf history if it helps.

Actual results:
sh# atomic run covscan
'NoneType' object has no attribute 'id'

Expected results:
# shell is started the same as with atomic-1.17.2-2.fc26

Additional info:
        "Id": "5279c4f1a2eaf153cedaf4f037cc230fd363a9222bded17ecff8e8438a492f40",
        "Created": "2016-02-26T15:45:24.955957382Z",
        "Path": "bash",
        "Args": [],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2017-06-13T07:10:12.169018522Z",
            "FinishedAt": "2017-06-13T07:10:14.479431195Z"
        "Image": "sha256:cbebc878a8f322e110e6b923e0e9752866b805f6d09643d6d0fc0b56d875b813",
        "ResolvConfPath": "/var/lib/docker/containers/5279c4f1a2eaf153cedaf4f037cc230fd363a9222bded17ecff8e8438a492f40/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/5279c4f1a2eaf153cedaf4f037cc230fd363a9222bded17ecff8e8438a492f40/hostname",
        "HostsPath": "/var/lib/docker/containers/5279c4f1a2eaf153cedaf4f037cc230fd363a9222bded17ecff8e8438a492f40/hosts",
        "LogPath": "",
        "Name": "/covscan",
        "RestartCount": 0,
        "Driver": "btrfs",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "journald",
                "Config": {}
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": true,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 2147483648,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "0-4",
            "CpusetMems": "",
            "Devices": [],
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 4294967296,
            "MemorySwappiness": -1,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0
        "GraphDriver": {
            "Name": "btrfs",
            "Data": null
        "Mounts": [
                "Type": "bind",
                "Source": "/home/user",
                "Destination": "/home/user",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
                "Type": "bind",
                "Source": "/dev/shm",
                "Destination": "/workdir",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
        "Config": {
            "Hostname": "5279c4f1a2ea",
            "Domainname": "",
            "User": "user",
            "AttachStdin": true,
            "AttachStdout": true,
            "AttachStderr": true,
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": true,
            "Env": [
            "Cmd": [
            "Image": "lslebodn/covscan",
            "Volumes": null,
            "WorkingDir": "/home/user",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {},
            "StopSignal": "SIGTERM"
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "024d1f4f0487275a50a7794d2d030c1137200f09bb8983c15b1a510870a75dce",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": null,
            "SandboxKey": "/var/run/docker/netns/024d1f4f0487",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "d4ce788571fd958ab5c9e8a3f053e4e874a8b6bc72b27864ebbae66ec0abbd71",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": ""
Comment 1 Brent Baude 2017-06-13 12:22:24 EDT
Can you run with --debug and report the traceback ?
Comment 2 Lukas Slebodnik 2017-06-14 00:46:27 EDT
sh# atomic --debug run covscan
The 'covscan' container is using an older version of the installed
'lslebodn/covscan' container image. If you wish to use the newer image,
you must either create a new container with a new name or
uninstall the 'covscan' container. 

# atomic uninstall --name covscan lslebodn/covscan

and create new container on the lslebodn/covscan image.

# atomic update --force lslebodn/covscans

 removes all containers based on an image.
'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/usr/bin/atomic", line 203, in <module>
  File "/usr/lib/python3.6/site-packages/Atomic/run.py", line 90, in run
    return be.run(con_obj, atomic=self, args=self.args)
  File "/usr/lib/python3.6/site-packages/Atomic/backends/_docker.py", line 564, in run
    if requested_image.id != image_id:
AttributeError: 'NoneType' object has no attribute 'id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/atomic", line 231, in <module>
SystemExit: 1

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