Bug 1328917

Summary: Problem upgrading from Docker 1.8.2 to 1.9.1: "Could not find container for entity id"
Product: Red Hat Enterprise Linux 7 Reporter: Brenton Leanhardt <bleanhar>
Component: dockerAssignee: Antonio Murdaca <amurdaca>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: dwalsh, jhonce, lsm5, lsu
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-23 16:18:16 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:

Description Brenton Leanhardt 2016-04-20 14:52:58 UTC
Description of problem:
As best I can tell this is the exact problem mentioned here:

https://github.com/docker/docker/issues/17691

Editing the sqlite db as mentioned in the issue worked around the problem for me:

sudo sqlite3 /var/lib/docker/linkgraph.db
delete from edge where entity_id = '<conflicting-entity-id-sha-1>';
delete from entity where id = '<conflicting-entity-id-sha-1>';

Version-Release number of selected component (if applicable):

docker-1.9.1-25.el7.x86_64

How reproducible:

I've hit this randomly.  Our openvswitch container is launched by systemd and effectively runs this command:

/usr/bin/docker run --name openvswitch --rm --privileged --net=host --pid=host -v /lib/modules:/lib/modules -v /run:/run -v /sys:/sys:ro -v /etc/origin/openvswitch:/etc/openvswitch openshift3/openvswitch:v3.2.0.12

Actual results:

Error response from daemon: Could not find container for entity id a1ad40523b86be16092de9384175b23bc6c8b92a1744c7783b7315c375a9a877


Expected results:


Additional info:

Comment 2 Daniel Walsh 2016-04-21 04:46:05 UTC
Not sure how we would fix this, other then to release onte it.

Would rm -f /var/lib/docker/linkgraph.db  Have worked?

Comment 3 Brenton Leanhardt 2016-04-21 11:52:10 UTC
I'm happy to try that the next time I hit this.  How safe it is to do that when upgrading from docker 1.8.2 to 1.9.1?  How is the linkgraph rebuilt?

Comment 4 Daniel Walsh 2016-04-22 18:21:16 UTC
I believe it is rebuilt from the existing graph driver.

Comment 5 Daniel Walsh 2016-06-03 18:24:35 UTC
Fixed in docker-1.9

Comment 7 Luwen Su 2016-06-12 15:00:00 UTC
I tried serveral times to start and stop the container, it works fine docker-1.10.3-40.el7.x86_64:
# docker run --name openvswitch --rm --privileged --net=host --pid=host -v /lib/modules:/lib/modules -v /run:/run -v /sys:/sys:ro -v /etc/origin/openvswitch:/etc/openvswitch openshift3/openvswitch
Starting ovsdb-server.
Configuring Open vSwitch system IDs.
Starting ovs-vswitchd.
Enabling remote OVSDB managers.

#docker ps
 IMAGE                    COMMAND                  CREATED             STATUS              PORTS               NAMES
9687cb843d31        openshift3/openvswitch   "/usr/local/bin/ovs-r"   36 seconds ago      Up 34 seconds                           openvswitch


I used to met this issue long time ago and use removing linkgraph.db to workaround as same, but i've been a while not seen this.
If anyone meet this with latest docker version, feel free reopen this bug.

Comment 9 errata-xmlrpc 2016-06-23 16:18:16 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-2016:1274