Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1589811

Summary: openstack overcloud update prepare failed - cannot delete subnet with port IP allocation
Product: Red Hat OpenStack Reporter: Noam Manos <nmanos>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED NOTABUG QA Contact: Gurenko Alex <agurenko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: aschultz, astafeye, augol, dalvarez, mburns, mcornea, nmanos, oblaut, rbartal, tfreger
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: 2018-06-17 09:58:02 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:
Attachments:
Description Flags
Console output
none
stack logs and generated yamls
none
stack logs input yamls and output yamls
none
subnet manual delete attempt failed none

Description Noam Manos 2018-06-11 12:33:54 UTC
Description of problem:
Running "openstack overcloud update prepare" failed on:

Resource DELETE failed: Conflict: resources.StorageNetwork.resources.StorageSubnet: Unable to complete operation on subnet f707196e-afaa-41c4-bf93-54314a563d7c: One or more ports have an IP allocation from this subnet.
    Neutron server returns request_idsHeat Stack update failed.


Version-Release number of selected component (if applicable):
13   -p 2018-05-24.2

How reproducible:
Not always, but happened when trying minor-update of OSP13 that includes Octavia.

Steps to Reproduce:

(undercloud) [stack@undercloud-0 ~]$ openstack overcloud update prepare \
   --templates \
   --container-registry-file ~/update-container-params.yaml \
   -e /home/stack/virt/docker-images.yaml \
   -e /home/stack/virt/config_lvm.yaml \
   -e /home/stack/virt/network/network-environment.yaml \
   -e /usr/share/openstack-tripleo-heat-templates/environments/services-docker/octavia.yaml \
   -e /home/stack/virt/hostnames.yml \
   -e /home/stack/virt/nodes_data.yaml



Actual results:

Stack overcloud UPDATE_FAILED

overcloud.Networks:
  resource_type: OS::TripleO::Network
  physical_resource_id: 4f45d028-93d1-4d6a-b171-771ae4e0f268
  status: UPDATE_FAILED
  status_reason: |
    resources.Networks: Resource DELETE failed: Conflict: resources.StorageNetwork.resources.StorageSubnet: Unable to complete operation on subnet f707196e-afaa-41c4-bf93-54314a563d7c: One or more ports have an IP allocation from this subnet.
    Neutron server returns request_idsHeat Stack update failed.
Heat Stack update failed.

Expected results:
OSP13 update to succeed.


Additional info:
Adding console output, yaml files and logs.

Comment 1 Noam Manos 2018-06-11 12:36:59 UTC
Created attachment 1450015 [details]
Console output

Comment 2 Noam Manos 2018-06-11 12:54:57 UTC
Created attachment 1450030 [details]
stack logs and generated yamls

Comment 3 Noam Manos 2018-06-11 13:30:17 UTC
Comment on attachment 1450030 [details]
stack logs and generated yamls

ignore - adding a new tar

Comment 4 Noam Manos 2018-06-11 13:31:39 UTC
Created attachment 1450034 [details]
stack logs input yamls and output yamls

Comment 5 Alexander Stafeyev 2018-06-12 09:25:41 UTC
Storage subnet issue: 

(undercloud) [stack@undercloud-0 ~]$ openstack subnet list 
+--------------------------------------+---------------------+--------------------------------------+-----------------+
| ID                                   | Name                | Network                              | Subnet          |
+--------------------------------------+---------------------+--------------------------------------+-----------------+
| a5402848-5098-4e82-9376-7d8525aa3521 | external_subnet     | 799544d7-fad3-4eaf-b166-263191606f0f | 10.0.0.0/24     |
| c46261e4-089d-4db2-953d-1973c83b2e5c | internal_api_subnet | cd871fee-7be8-4997-bb5c-49044b97f7b9 | 172.17.1.0/24   |
| d5b03ff4-c900-4dd8-8c05-69edd63d5865 | ctlplane-subnet     | b201278b-dc47-42bf-8a5c-e215695bbb1f | 192.168.24.0/24 |
| e16df453-0624-4e01-b30b-cf3fdaa04c45 | tenant_subnet       | f0cf8dc9-8900-4645-8d19-bdae5eff37d6 | 172.17.2.0/24   |
| f707196e-afaa-41c4-bf93-54314a563d7c | storage_subnet      | 51a29287-3c74-48bf-9d37-64e44ab515b5 | 172.17.3.0/24   |
| fed6d862-bfe4-4455-9310-4c6d92e00fd3 | storage_mgmt_subnet | 34e0cd1d-e381-4052-a280-d5ba407dbffa | 172.17.4.0/24   |
+--------------------------------------+---------------------+--------------------------------------+-----------------+

2018-06-11 10:31:02Z [overcloud-Networks-u4ywx7vadzhx-StorageNetwork-iby3dmmkyxv5.StorageSubnet]: DELETE_FAILED  Conflict: resources.StorageSubnet: Unable to complete operation on subnet f707196e-afaa-41c4-bf93-54314a563d7c: One or more ports have an IP allocation from this subnet.

Comment 7 Noam Manos 2018-06-12 12:37:38 UTC
Trying to manually delete the storage_mgmt_subnet fails with:

GET call to network for http://192.168.24.1:9696/v2.0/subnets/fed6d862-bfe4-4455-9310-4c6d92e00fd3 used request id req-0a10ab85-2f1a-4493-bf4e-993d5396da47

Manager unknown ran task network.GET.subnets in 1.28573608398s

Manager unknown running task network.DELETE.subnets

REQ: curl -g -i -X DELETE http://192.168.24.1:9696/v2.0/subnets/fed6d862-bfe4-4455-9310-4c6d92e00fd3 -H "User-Agent: osc-lib/1.9.0 keystoneauth1/3.4.0 python-requests/2.14.2 CPython/2.7.5" -H "Accept: " -H "X-Auth-Token: {SHA1}8545d6678baff9751f20335cf55bb238c90bc6bf"
http://192.168.24.1:9696 "DELETE /v2.0/subnets/fed6d862-bfe4-4455-9310-4c6d92e00fd3 HTTP/1.1" 409 204
RESP: [409] Content-Type: application/json Content-Length: 204 X-Openstack-Request-Id: req-d8760e3f-aa30-4d6c-9384-d7a0c68f9485 Date: Tue, 12 Jun 2018 12:06:55 GMT Connection: keep-alive
RESP BODY: {"NeutronError": {"message": "Unable to complete operation on subnet fed6d862-bfe4-4455-9310-4c6d92e00fd3: One or more ports have an IP allocation from this subnet.", "type": "SubnetInUse", "detail": ""}}


Attaching delete subnet log.

Comment 8 Noam Manos 2018-06-12 12:41:46 UTC
Created attachment 1450496 [details]
subnet manual delete attempt failed

Comment 11 Marius Cornea 2018-06-13 20:33:10 UTC
(In reply to Noam Manos from comment #0)
> 
> Steps to Reproduce:
> 
> (undercloud) [stack@undercloud-0 ~]$ openstack overcloud update prepare \
>    --templates \
>    --container-registry-file ~/update-container-params.yaml \
>    -e /home/stack/virt/docker-images.yaml \
>    -e /home/stack/virt/config_lvm.yaml \
>    -e /home/stack/virt/network/network-environment.yaml \
>    -e
> /usr/share/openstack-tripleo-heat-templates/environments/services-docker/
> octavia.yaml \
>    -e /home/stack/virt/hostnames.yml \
>    -e /home/stack/virt/nodes_data.yaml
> 
> 

By visual inspection of the update prepare command it looks to me that you missed the following environment file:

-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \

Can you confirm that this was used during the initial deployment? Please note that all environment files used for initial deployment are require for the subsequent deploy/update/upgrade commands.

Comment 12 Noam Manos 2018-06-17 09:58:02 UTC
(In reply to Marius Cornea from comment #11)
> 
> By visual inspection of the update prepare command it looks to me that you
> missed the following environment file:
> 
> -e
> /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.
> yaml \
> 
> Can you confirm that this was used during the initial deployment? Please
> note that all environment files used for initial deployment are require for
> the subsequent deploy/update/upgrade commands.


Indeed.

Updating overcloud with all environment files as listed in ~/overcloud_deploy.sh (from existing deployment), has passed:

$ openstack overcloud update prepare \
  --templates \
  --container-registry-file ~/update-container-params.yaml \
  -e /home/stack/virt/config_lvm.yaml \
  -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
  -e /home/stack/virt/network/network-environment.yaml \
  -e /usr/share/openstack-tripleo-heat-templates/environments/services-docker/octavia.yaml \
  -e /home/stack/virt/hostnames.yml \
  -e /home/stack/virt/nodes_data.yaml \
  -e /home/stack/virt/extra_templates.yaml \
  -e /home/stack/virt/docker-images.yaml


...

2018-06-17 09:42:49Z [overcloud-AllNodesDeploySteps-svgtgygyysoa]: UPDATE_COMPLETE  Stack UPDATE completed successfully
2018-06-17 09:42:50Z [AllNodesDeploySteps]: UPDATE_COMPLETE  state changed
2018-06-17 09:43:00Z [overcloud]: UPDATE_COMPLETE  Stack UPDATE completed successfully

 Stack overcloud UPDATE_COMPLETE 

Started Mistral Workflow tripleo.package_update.v1.get_config. Execution ID: 9421ed88-1574-4d84-bd0d-b5af9a6602b4
Success
Update init on stack overcloud complete.