Bug 1316868

Summary: openshift-anislbe should install docker registry when no nfs is specified.
Product: OpenShift Container Platform Reporter: Gan Huang <ghuang>
Component: InstallerAssignee: Andrew Butcher <abutcher>
Status: CLOSED ERRATA QA Contact: Gan Huang <ghuang>
Severity: low Docs Contact:
Priority: medium    
Version: 3.2.0CC: aos-bugs, bleanhar, jdetiber, jokerman, mmccomas
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-07-20 19:40:53 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 Gan Huang 2016-03-11 10:40:59 UTC
Description of problem:
Now openshift-ansible won't install docker registry when no nfs is specified, this is not reasonable. ansible could set the replication of docker registry is 1 and using local storage when no nfs is specified.

Version-Release number of selected component (if applicable):
https://github.com/openshift/openshift-ansible.git master

How reproducible:
100%

Steps to Reproduce:
1.Install a basic ose env that no nfs is specified.
2.Check router and docker registry after installation

Actual results:
Router is running, docker registry isn't created.

Expected results:
1.If no nfs storage is specified, openshift-ansible should install docker registry using local storage and it's replication is set to 1.
2.If nfs is specified, working as inventory hosts normally.

Additional info:

Comment 1 Jason DeTiberus 2016-03-16 03:02:02 UTC
I'm hesitant to say that we want to support this use case. The one condition I can see is if the user has to specify a flag in their inventory to force a registry deployment without persistent storage.

If we allow this by default, I worry that we'll have users that will be in for quite a shock when their registry data goes poof.

Comment 3 Andrew Butcher 2016-07-19 15:58:44 UTC
Proposed fix added in https://github.com/openshift/openshift-ansible/pull/2023.

Comment 5 Gan Huang 2016-07-20 07:54:32 UTC
# cat hosts
[OSEv3:children]
masters
nodes

[OSEv3:vars]
<--snip-->
openshift_hosted_registry_selector="role=node,registry=enabled"
openshift_hosted_router_selector="role=node,router=enabled"

<--snip-->
[nodes]
openshift-125.xxx.redhat.com ansible_user=root  openshift_public_hostname=openshift-125.xxx.redhat.com openshift_hostname=openshift-125.xxx.redhat.com openshift_node_labels="{'role': 'node'}"

openshift-138.xxx.redhat.com ansible_user=root  openshift_public_hostname=openshift-138.xxx.redhat.com openshift_hostname=openshift-138.xxx.redhat.com openshift_node_labels="{'role': 'node','registry': 'enabled','router': 'enabled'}"

After install, check if docker-registy is created:
[root@openshift-125 ~]# oc get po
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-rnlj3   1/1       Running   0          13m
router-1-9vjrk            1/1       Running   0          13m
[root@openshift-125 ~]# oc get dc
NAME              REVISION   REPLICAS   TRIGGERED BY
docker-registry   1          1          config
router            1          1          config

Verified with openshift-ansible-3.2.13-1.git.0.0afa976.el7.noarch

Comment 7 errata-xmlrpc 2016-07-20 19:40:53 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:1467