Bug 1851901

Summary: Unable to delete cluster on RHEV if ovirt-config.yaml is missing
Product: OpenShift Container Platform Reporter: Abhijeet Sadawarte <asadawar>
Component: InstallerAssignee: Roy Golan <rgolan>
Installer sub component: OpenShift on RHV QA Contact: Lucie Leistnerova <lleistne>
Status: CLOSED NOTABUG Docs Contact:
Severity: unspecified    
Priority: unspecified CC: dougsland, rdlugyhe, rgolan
Version: 4.4   
Target Milestone: ---   
Target Release: ---   
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: 2020-06-30 07:30:37 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1838682, 1849398    

Description Abhijeet Sadawarte 2020-06-29 11:04:26 UTC
Description of problem:

We can not destroy the OCP 4.4 cluster installed on RHEV IPI if the ovirt-config.yaml is missing.  

The customer used a workaround of pretending to create a new cluster in the same RHEV cluster. After that the ovirt-config.yaml was generated, then he could switch to the directory that kept the terraform state for the older cluster and run openshift-install destroy cluster.

Is there any official way, we can recreate the ovirt-config.yaml?

Version-Release number of the following components:
OCP 4.4

Comment 1 Roy Golan 2020-06-30 07:30:37 UTC
No official way. I'm thinking that this ovirt-config.yaml should be similar to OpenStack's clouds.yaml. But we are not there.

Please not that cluster destroy is not invoking a terraform destroy because resources like workers are
created by the machine controller.

Comment 3 Rolfe Dlugy-Hegwer 2020-07-06 14:44:33 UTC
Sure. I can document this. But I have to ask: 
- Why was ~/.ovirt/ovirt-config.yaml missing?
- Did they change the username or bastion machine?
- If the user installs OCP on multiple environments (different Engines), does this overwrite the information in ~/.ovirt/ovirt-config.yaml so it only contains info for the most recent engine?

I'm not sure how OpenStack's clouds.yaml is set up. For ovirt-config.yaml, maybe we could get the name of the Engine from the ENGINE API URL and prepend it to the filename. This way, each environment will have its own unique ovirt-config.yaml file.

Should we tell users they must always use the same bastion host and username?

Comment 4 Roy Golan 2020-07-08 08:28:32 UTC
(In reply to Rolfe Dlugy-Hegwer from comment #3)
> Sure. I can document this. But I have to ask: 
> - Why was ~/.ovirt/ovirt-config.yaml missing?
> - Did they change the username or bastion machine?
> - If the user installs OCP on multiple environments (different Engines),
> does this overwrite the information in ~/.ovirt/ovirt-config.yaml so it only
> contains info for the most recent engine?
> 
> I'm not sure how OpenStack's clouds.yaml is set up. For ovirt-config.yaml,
> maybe we could get the name of the Engine from the ENGINE API URL and
> prepend it to the filename. This way, each environment will have its own
> unique ovirt-config.yaml file.
> 
> Should we tell users they must always use the same bastion host and username?
Probably we should but maybe we can help them with asking interactively again for the credentials or
at least give a nice error if its missing.

Abhijeet can you answer some of those questions?

Comment 6 Rolfe Dlugy-Hegwer 2020-07-10 13:21:01 UTC
*** Bug 1838685 has been marked as a duplicate of this bug. ***

Comment 7 Rolfe Dlugy-Hegwer 2020-07-10 13:28:49 UTC
*** Bug 1838682 has been marked as a duplicate of this bug. ***