Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Delete openstack OCP cluster doesn't full work #300

Open
oybed opened this issue Aug 27, 2018 · 8 comments
Open

Delete openstack OCP cluster doesn't full work #300

oybed opened this issue Aug 27, 2018 · 8 comments

Comments

@oybed
Copy link
Contributor

oybed commented Aug 27, 2018

After moving to use openshift-ansible as our source for the OCP on OSP deployments, the delete a cluster option doesn't work. A PR is needed to update the variables passed to the openshift_openstack role to make it happy.

@tylerauerbeck
Copy link
Contributor

@oybed So the initial culprit seems to be here: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_openstack/tasks/provision.yml#L1-L16

provision.yml skips running generate-templates.yml whenever we set state=absent. However that is where stack_template_path is set, which causes everything to fail out whenever when it runs the third step (Validating the heat template).

So the question now is whether we craft something to work around this for the time being. Or if we try to get this fixed in openshift-ansible. Wanted to get your thoughts before digging in any further.

@oybed
Copy link
Contributor Author

oybed commented Sep 15, 2018

@tylerauerbeck yeah, it's a bit of a challenge to utilize the "downstream" code for this, so we may just need to move it back into casl, but still keep it in sync (i.e.: submit updates to openshift-ansible) as we go. Let's discuss before we do anything further on this.

@jtudelag
Copy link
Contributor

What's the status of this? @tylerauerbeck @oybed

Im hitting the same issue in 3.11 with the latest casl-ansible container image:

TASK [../../../galaxy/openshift-ansible/roles/openshift_openstack : validate the Heat template] *******************************************************************************************************************
task path: /tmp/src/casl-ansible/galaxy/openshift-ansible/roles/openshift_openstack/tasks/provision.yml:42                                                                                                         
Tuesday 18 December 2018  11:35:08 +0000 (0:00:01.567)       0:00:43.679 ******                                                                                                                                    
fatal: [localhost]: FAILED! => {                                                                                                                                                                                   
    "msg": "The task includes an option with an undefined variable. The error was: 'stack_template_path' is undefined\n\nThe error appears to have been in '/tmp/src/casl-ansible/galaxy/openshift-ansible/roles/openshift_openstack/tasks/provision.yml': line 42, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: validate the Heat template\n  ^ here\n"
}

@oybed
Copy link
Contributor Author

oybed commented Dec 18, 2018

@jtudelag this is a low priority issue as you can just use the openstack stack delete command (or the OSP web console).

@oybed
Copy link
Contributor Author

oybed commented Dec 18, 2018

@jtudelag one additional piece of info - before you delete the cluster with the above mentioned command, make sure any PVs are deleted to avoid leaving Cinder volumes behind (+ double check the OSP tenant afterwards that all related volumes were deleted).

@jtudelag
Copy link
Contributor

@oybed ok. Btw, there a few non-attached volumes already.

Also, deleting the stack manually would leave some trash, such as DNS records and Host registered in Satellite.

@oybed
Copy link
Contributor Author

oybed commented Dec 19, 2018

@jtudelag the the DNS, host registration., etc. isn't handled by the delete playbook anyway. That's a different issue. The openshift-ansible delete functionality takes care of (some) of that.

@jtudelag
Copy link
Contributor

@oybed So how do you manage that today? Manually? I mean, removing DNS records & Sat Hosts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants