Bug 1296333

Summary: [SME] There's no need to delete /var/lib/docker/* content if docker was just installed
Product: OpenShift Container Platform Reporter: Peter Larsen <plarsen>
Component: DocumentationAssignee: Ashley Hardin <ahardin>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: low    
Version: 3.1.0CC: aos-bugs, jialiu, jokerman, mmccomas, plarsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-15 15:46:52 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 Peter Larsen 2016-01-06 22:19:25 UTC
Document URL: https://docs.openshift.com/enterprise/3.1/install_config/install/prerequisites.html#configuring-docker-storage

Section Number and Name: 3. Re-initialize Docker.

Describe the issue: 
The guide assumes the user have run yum install docker. There's no content in /var/lib/docker and there's no need to delete it. This is only necessary if this is not a new install, and docker has been used before installing openshift. 

Suggestions for improvement: 

Remove the "rm" command. Since the installer actually enables and starts the docker daemon, there's really no need for the section. Suggest replacing the section with

systemctl enable docker
systemctl start docker

if we need to ensure that docker is running/configured properly. 

Additional information:

Comment 2 Ashley Hardin 2016-01-21 21:43:15 UTC
Pull request created: https://github.com/openshift/openshift-docs/pull/1463

Please let me know if any edits are needed. Thanks!

Comment 3 Ashley Hardin 2016-01-29 16:53:37 UTC
The following is updated by some other work for OSE 3.1.1, which introduced Atomic Host as a supported OS, which would already have Docker installed and possibly running. It now differentiates from these scenarios. Please let us know if this satisfies the request.

https://docs.openshift.com/enterprise/3.1/install_config/install/prerequisites.html#configuring-docker-storage

PR with the change: https://github.com/adellape/openshift-docs/commit/8184fdffcb25d1511e73a9fd1be72f5e21a526f3#diff-97beb7cd722dc66f9e694edf1a64440dL712

Comment 4 Peter Larsen 2016-01-29 21:24:27 UTC
(In reply to Ashley Hardin from comment #3)
> The following is updated by some other work for OSE 3.1.1, which introduced
> Atomic Host as a supported OS, which would already have Docker installed and
> possibly running. It now differentiates from these scenarios. Please let us
> know if this satisfies the request.

If the guide is to explain exactly what commands a user has to use, we still have this statement: "However, if Docker is already running, re-initialize Docker:"

How does a user know that?  The two commands prior to this comment will not state if docker was/is already running. It's also imprecise. The files will be there if Docker HAS been running at any time since install. 

Suggest adding "systemctl is-active docker" as the command to see if Docker is already running. Or simply state that if there is any content in "/var/lib/docker/* it has to be deleted and explain that files will be present if Docker has been used prior to the install of OpenShift.

> 
> https://docs.openshift.com/enterprise/3.1/install_config/install/
> prerequisites.html#configuring-docker-storage
> 
> PR with the change:
> https://github.com/adellape/openshift-docs/commit/
> 8184fdffcb25d1511e73a9fd1be72f5e21a526f3#diff-
> 97beb7cd722dc66f9e694edf1a64440dL712

Comment 5 Ashley Hardin 2016-02-01 18:53:54 UTC
Thanks, Peter.
I made some edits per your comments. Please let me know if this satisfies your request: 

https://github.com/openshift/openshift-docs/pull/1513

Comment 6 Johnny Liu 2016-02-05 04:57:24 UTC
Verified the PR#1513, the state is precise now, so move this bug to verified,

If this does not satisfy peter's request, pls reopen it.

Comment 7 openshift-github-bot 2016-02-09 18:31:59 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/14468a7e71d6a9bdcd38fc095d9d373bcaab9980
Bug 1296333, added command to check if Docker is running

https://github.com/openshift/openshift-docs/commit/1d5d349b3417d92a04d888643f4b857bc6082035
Merge pull request #1513 from ahardin-rh/reinitialize-docker

Bug 1296333, added command to check if Docker is running

Comment 9 Peter Larsen 2016-02-22 15:45:29 UTC
Works for me.