Bug 1387633

Summary: Docker’s Restart Policy is not honored on cloudforms images
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: cfme-containerAssignee: Satoe Imaishi <simaishi>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: unspecified    
Version: 5.6.0CC: bazulay, jhardy, pmukhedk, simaishi
Target Milestone: GA   
Target Release: cfme-future   
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: 2016-10-26 14:22:48 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:

Comment 2 Satoe Imaishi 2016-10-21 13:53:11 UTC
I'm not able to reproduce, using the latest image.

Steps taken:

1. Start a docker image with '--restart always'
2. Log into a running cfme appliance, and shutdown the appliance.
3. Check status with 'docker ps'

The status of the container was "Up 1 seconds".

Running the exact same test without '--restart always' kept the status as "Exited".

As far as I know, the 'restart' support is provided by Docker and there is no configuration needed in the container image itself.

Are you able to reproduce or is this happening only in this particular environment where the container keeps crashing?

Comment 4 Satoe Imaishi 2016-10-21 14:35:41 UTC
I just used 'shutdown' command as 'always' shouldn't care how the container got shutdown.

The 'cmd' is what runs when the container is started. So once the appliance is up and running, what's in CMD shouldn't matter.

Not sure what's causing the restart not happening in the customer's environment.

In my test, 'docker events' show 'container die' followed by 'container start'.