Bug 1367673

Summary: rpm reinstall against an existing env(container installed) failed with etcd service can not be enabled
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: InstallerAssignee: Samuel Munilla <smunilla>
Status: CLOSED WONTFIX QA Contact: Johnny Liu <jialiu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, bleanhar, dmoessne, jdetiber, jokerman, mbarrett, mmccomas, wmeng
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: dmoessne: needinfo? (mbarrett)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-21 13:48:15 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 liujia 2016-08-17 08:22:53 UTC
Description of problem:
reinstall(rpm) ose with atomic-openshift-installer on an existing host(container installed) failed as etcd can not be enabled.

Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.3.11-1.git.4.eac15df.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. quick install an ose with container install on host openshift-197.lab.eng.nay.redhat.com.
containerized: true
roles:
    - master
    - etcd
    - node
    - storage
2. run "atomic-openshift-installer install"(with no install config file) and follow the guide

Enter hostname or IP address: openshift-197.lab.eng.nay.redhat.com(the existing host as above)
Will this host be an OpenShift Master? [y/N]: y
Will this host be RPM or Container based (rpm/container)? [rpm]: rpm


3. it comes to the step for "Gathering information from hosts"
Installed environment detected.
By default the installer only adds new nodes to an installed environment.
Do you want to (1) only add additional nodes or (2) reinstall the existing hosts potentially erasing any custom changes?: 

3. choose 2 to start reinstall.

4. it will start to install but failed

Actual results:
the reinstall fail for TASK [etcd : Enable etcd]
fatal: [openshift-197.lab.eng.nay.redhat.com]: FAILED! => {"changed": false, "failed": true, "msg": "Unable to enable service etcd: Failed to execute operation: Operation not supported\n"}

Expected results:
it should reinstall succesfully. the ideal result should be uninstall and then reinstall.

Additional info:
for the same steps,reinstall(container) successfully in an existing env(container installed).

Comment 1 Scott Dodson 2016-08-19 13:30:55 UTC
We need to decide what reinstall means. Should reinstall uninstall and then install? If not then we need to ensure that the etcd role, and likely many others, is capable of transition from RPM to Containerized and from Containerized to RPM.

This is hopefully not a very likely scenario and the workaround would be first run atomic-openshift-utils uninstall and then atomic-openshift-utils install.

Comment 2 Brenton Leanhardt 2016-09-07 20:38:11 UTC
I think this is an edge case we shouldn't allow.

Comment 3 Jason DeTiberus 2016-09-07 21:36:47 UTC
I agree, I'm not sure if it makes sense to do a test for the "reinstall" workflow that would detect the switch in values for containerized and let the user know that they need to follow the uninstall process before re-running.

As an aside, we should probably trigger a certificate regeneration for the "reinstall" workflow.

Comment 4 Scott Dodson 2016-10-11 15:35:25 UTC
Hosts need to be completely uninstalled or reprovisioned when moving between containerized and rpm installs.