Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenStack] bootstrap port not deleted after bootstrap deletion #1047

Closed
e-minguez opened this issue Jan 11, 2019 · 1 comment · Fixed by #2128
Closed

[OpenStack] bootstrap port not deleted after bootstrap deletion #1047

e-minguez opened this issue Jan 11, 2019 · 1 comment · Fixed by #2128
Labels
kind/bug Categorizes issue or PR as related to a bug. platform/openstack

Comments

@e-minguez
Copy link
Contributor

Using 0.9.1 installer, the bootstrap instance is deleted but the bootstrap neutron port is not.

Version

$ openshift-install version
openshift-install v0.9.1

Platform (aws|libvirt|openstack):

OpenStack

What happened?

The bootstrap deletion doesn't delete the bootstrap neutron port:

DEBUG Initializing provider plugins...             
DEBUG                                              
DEBUG Terraform has been successfully initialized! 
DEBUG                                              
DEBUG You may now begin working with Terraform. Try running "terraform plan" to see 
DEBUG any changes that are required for your infrastructure. All Terraform commands 
DEBUG should now work.                             
DEBUG                                              
DEBUG If you ever set or change modules or backend configuration for Terraform, 
DEBUG rerun this command to reinitialize your working directory. If you forget, other 
DEBUG commands will detect it and remind you to do so if necessary. 
DEBUG openstack_objectstorage_container_v1.container: Refreshing state... (ID: shiftstack.seocposp.lan) 
DEBUG openstack_networking_secgroup_v2.api: Refreshing state... (ID: 37abb81a-bf77-4490-ba25-85b54cff959a) 
DEBUG openstack_networking_secgroup_v2.master: Refreshing state... (ID: b67043d8-ceec-4a6f-a36d-e84d97a529dc) 
DEBUG openstack_networking_network_v2.openshift-private: Refreshing state... (ID: a44337c4-b7d0-422f-9c03-0dbc8b821365) 
DEBUG data.openstack_compute_flavor_v2.bootstrap_flavor: Refreshing state... 
DEBUG data.openstack_images_image_v2.bootstrap_image: Refreshing state... 
DEBUG openstack_networking_subnet_v2.masters: Refreshing state... (ID: c20d7301-4162-43a9-a959-398a5db62654) 
DEBUG openstack_objectstorage_object_v1.ignition: Refreshing state... (ID: shiftstack.seocposp.lan/bootstrap.ign) 
DEBUG openstack_objectstorage_tempurl_v1.ignition_tmpurl: Refreshing state... (ID: 4e71642e35490610a57943fe2d3f0b7b) 
DEBUG openstack_networking_port_v2.bootstrap_port: Refreshing state... (ID: 2edf38f4-442a-4cfa-b001-509cd1286b2d) 
DEBUG openstack_networking_port_v2.lb_port: Refreshing state... (ID: 1bff6260-ce87-434b-8538-80e2d4f3a18b) 
DEBUG data.ignition_file.bootstrap_ifcfg: Refreshing state... 
DEBUG data.ignition_config.redirect: Refreshing state... 
DEBUG openstack_compute_instance_v2.bootstrap: Refreshing state... (ID: 2b530570-f73a-4383-8d51-4228ac16015d) 
DEBUG module.bootstrap.openstack_compute_instance_v2.bootstrap: Destroying... (ID: 2b530570-f73a-4383-8d51-4228ac16015d) 
DEBUG module.bootstrap.openstack_compute_instance_v2.bootstrap: Still destroying... (ID: 2b530570-f73a-4383-8d51-4228ac16015d, 10s elapsed) 
DEBUG module.bootstrap.openstack_compute_instance_v2.bootstrap: Destruction complete after 11s 
DEBUG module.bootstrap.openstack_objectstorage_tempurl_v1.ignition_tmpurl: Destroying... (ID: 4e71642e35490610a57943fe2d3f0b7b) 
DEBUG module.bootstrap.openstack_objectstorage_tempurl_v1.ignition_tmpurl: Destruction complete after 0s 
DEBUG module.bootstrap.openstack_objectstorage_object_v1.ignition: Destroying... (ID: shiftstack.seocposp.lan/bootstrap.ign) 
DEBUG module.bootstrap.openstack_objectstorage_object_v1.ignition: Destruction complete after 1s 
DEBUG                                              
DEBUG Destroy complete! Resources: 3 destroyed.    
$ openstack port list
+--------------------------------------+----------------+-------------------+---------------------------------------------------------------------------+--------+
| ID                                   | Name           | MAC Address       | Fixed IP Addresses                                                        | Status |
+--------------------------------------+----------------+-------------------+---------------------------------------------------------------------------+--------+
| 1bff6260-ce87-434b-8538-80e2d4f3a18b | lb-port        | fa:16:3e:e3:d6:fe | ip_address='10.0.0.14', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'  | ACTIVE |
| 2edf38f4-442a-4cfa-b001-509cd1286b2d | bootstrap-port | fa:16:3e:ca:ee:9e | ip_address='10.0.0.6', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | DOWN   |
| 3e4868f4-8c2c-4321-947a-4735bcfde481 |                | fa:16:3e:6f:d5:26 | ip_address='10.0.0.4', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | ACTIVE |
|                                      |                |                   | ip_address='10.0.128.4', subnet_id='ab448c13-e753-4887-9560-2680fc4b1f1f' |        |
| 3e6ef328-8b23-4dbc-974c-72ea40061f3c |                | fa:16:3e:7b:6a:88 | ip_address='10.0.128.1', subnet_id='ab448c13-e753-4887-9560-2680fc4b1f1f' | ACTIVE |
| 66428981-6b47-4804-a3c9-5a52aa4ac332 | master-port-1  | fa:16:3e:37:cd:4d | ip_address='10.0.0.10', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'  | ACTIVE |
| 6811e5f7-a248-4f51-a933-4d432563598f | master-port-0  | fa:16:3e:06:e5:90 | ip_address='10.0.0.11', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'  | ACTIVE |
| 8322868a-ab6f-4f4b-a3e0-d6b80efe1029 |                | fa:16:3e:3d:b8:6a | ip_address='10.0.0.2', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | ACTIVE |
|                                      |                |                   | ip_address='10.0.128.2', subnet_id='ab448c13-e753-4887-9560-2680fc4b1f1f' |        |
| 8e55b5b3-042f-4a92-a6f0-0582e0624257 |                | fa:16:3e:55:4f:6c | ip_address='10.0.0.1', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | ACTIVE |
| c062b10f-0d99-461a-80bc-bf77544d61a3 |                | fa:16:3e:ee:3a:19 | ip_address='10.0.0.3', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | ACTIVE |
|                                      |                |                   | ip_address='10.0.128.3', subnet_id='ab448c13-e753-4887-9560-2680fc4b1f1f' |        |
| daab43bd-39ee-4e53-b70e-a39691787bb5 | master-port-2  | fa:16:3e:c2:c2:18 | ip_address='10.0.0.5', subnet_id='c20d7301-4162-43a9-a959-398a5db62654'   | ACTIVE |
+--------------------------------------+----------------+-------------------+---------------------------------------------------------------------------+--------+

What you expected to happen?

Remove everything related to bootstrap (including the port)

How to reproduce it (as minimally and precisely as possible)?

Deploy OCP4 on OSP

Anything else we need to know?

Nope

References

@wking
Copy link
Member

wking commented Jan 12, 2019

Deletion removes resources defined in the bootstrap module, so the easy fix would be to consolidate all of:

$ git grep '^resource ' data/data/openstack/ | grep bootstrap
data/data/openstack/bootstrap/main.tf:resource "openstack_objectstorage_object_v1" "ignition" {
data/data/openstack/bootstrap/main.tf:resource "openstack_objectstorage_tempurl_v1" "ignition_tmpurl" {
data/data/openstack/bootstrap/main.tf:resource "openstack_compute_instance_v2" "bootstrap" {
data/data/openstack/topology/private-network.tf:resource "openstack_networking_port_v2" "bootstrap_port" {
data/data/openstack/topology/sg-master.tf:resource "openstack_networking_secgroup_rule_v2" "master_ingress_bootstrap_etcd" {

in the openstack/bootstrap module. If that's not possible, you can do something like #614 (updated by #900) to set count zero for the resources that you can't get into the bootstrap module.

/assign @flaper87
/kind bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. platform/openstack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants