Bug 1400153

Summary: Docker container name conflict
Product: OpenShift Container Platform Reporter: Sten Turpin <sten>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED INSUFFICIENT_DATA QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.1CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-03 22:50: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:

Description Sten Turpin 2016-11-30 14:49:54 UTC
Description of problem: A container running in docker but outside of OpenShift/k8s fails to restart due to a name conflict


Version-Release number of selected component (if applicable): 
atomic-openshift-node-3.3.1.3-1.git.0.86dc49a.el7.x86_64
docker-1.10.3-57.el7.x86_64


How reproducible:
Sometimes


Steps to Reproduce:
1. Run a docker container on a node
2. Stop and rm the docker container
3. Immediately attempt to pull and start the container 

Actual results:
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal docker[21851]: Status: Image is up to date for registry.ops.openshift.com/ops/oso-rhel7-host-monitoring:prod
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal systemd[1]: Started Openshift Host Monitoring Container.
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal docker[22041]: docker: Error response from daemon: Conflict. The name "/oso-rhel7-host-monitoring" is already in use by container 5dc634d45a6926651cba068da375e23841c4f4419bb9ba4154b3ea0414842764. You have to remove (or rename) that container to be able to reuse that name..
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal docker[22041]: See '/usr/bin/docker-current run --help'.
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal systemd[1]: oso-rhel7-host-monitoring.service: main process exited, code=exited, status=125/n/a
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal docker[22086]: oso-rhel7-host-monitoring
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal systemd[1]: Unit oso-rhel7-host-monitoring.service entered failed state.
Nov 29 13:36:33 ip-172-31-8-217.ec2.internal systemd[1]: oso-rhel7-host-monitoring.service failed.

The image ID causing the conflict cannot be removed because it does not exist.

Expected results:
No conflict should occur


Additional info: