heat stack-delete fails , when the stack event tries to delete the subnet

Bug #1579896 reported by Vinoth Kannan Ganapathy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
New
High
Praneet Bachheti
Trunk
New
High
Praneet Bachheti

Bug Description

created loadbalancer using heat template, and when deleting the same stack , it fails.
event-list shows that the delete fails while deleting the subnet with the error saying that IP in use..it seems that subnet delete started before the ports delete is completed.

As a workaround, do heat stack-delete again.

root@b4s342:~/heat_test# heat stack-list
+--------------------------------------+------------+-----------------+---------------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+-----------------+---------------------+--------------+
| e034aaa7-72c0-4e3a-9818-6ec6a4926c0b | SNAT | CREATE_COMPLETE | 2016-05-06T21:32:52 | None |
| dfcf652a-ddca-4d42-837a-e09f43e56c77 | LB_TEST | DELETE_FAILED | 2016-05-09T19:23:12 | None |
+--------------------------------------+------------+-----------------+---------------------+--------------+
root@b4s342:~/heat_test# heat stack-show dfcf652a-ddca-4d42-837a-e09f43e56c77
+-----------------------+------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------+------------------------------------------------------------------------------------------------------------------------+
| capabilities | [] |
| creation_time | 2016-05-09T19:23:12 |
| description | HOT template to create a Loadbalancer: |
| disable_rollback | True |
| id | dfcf652a-ddca-4d42-837a-e09f43e56c77 |
| links | http://10.84.24.32:8004/v1/3e591fe90a174c62b21951ae44e69801/stacks/LB_TEST/dfcf652a-ddca-4d42-837a-e09f43e56c77 (self) |
| notification_topics | [] |
| parameters | { |
| | "OS::project_id": "3e591fe90a174c62b21951ae44e69801", |
| | "loadbalancer_member_properties_admin_state": "True", |
| | "loadbalancer_listener_properties_protocol": "HTTP", |
| | "loadbalancer_refs": "default-domain:admin:adff8165-2f8c-42e1-ad0e-8d801a78d13e", |
| | "list_name": "HTTP_LIST", |
| | "loadbalancer_listener_properties_protocol_port": "1", |
| | "loadbalancer_properties_admin_state": "True", |
| | "loadbalancer_member_properties_protocol_port": "1", |
| | "vn_1_cidr": "3.3.3.0/24", |
| | "loadbalancer_listener_properties_connection_limit": "1", |
| | "pool_name": "HTTP_POOL", |
| | "OS::stack_name": "LB_TEST", |
| | "loadbalancer_pool_properties_admin_state": "True", |
| | "loadbalancer_pool_properties_loadbalancer_method": "ROUND_ROBIN", |
| | "loadbalancer_member_properties_weight": "1", |
| | "loadbalancer_listener_properties_admin_state": "True", |
| | "name": "lb_test", |
| | "vn_1_name": "vn1", |
| | "vn_1_fq_name": "default-domain:admin:vn1", |
| | "OS::stack_id": "dfcf652a-ddca-4d42-837a-e09f43e56c77", |
| | "mem1_name": "mem1", |
| | "loadbalancer_pool_properties_protocol": "HTTP" |
| | } |
| parent | None |
| stack_name | LB_TEST |
| stack_owner | None |
| stack_status | DELETE_FAILED |
| stack_status_reason | Resource DELETE failed: BadRequest: |
| | resources.net1-subnet1: Bad network request: Cannot |
| | Delete IP Block, Instance IP(s) in use |
| stack_user_project_id | 3e591fe90a174c62b21951ae44e69801 |
| tags | None |
| template_description | HOT template to create a Loadbalancer: |
| timeout_mins | None |
| updated_time | None |
+-----------------------+------------------------------------------------------------------------------------------------------------------------+
root@b4s342:~/heat_test# heat event-list dfcf652a-ddca-4d42-837a-e09f43e56c77
+-------------------------------+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------+
| resource_name | id | resource_status_reason | resource_status | event_time |
+-------------------------------+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------+
| LB_TEST | c1f026c0-8daf-437b-92ef-cca6c121da18 | Stack CREATE started | CREATE_IN_PROGRESS | 2016-05-09T19:23:12 |
| net1 | 8b577b1b-df63-44fc-bb9d-e015950e7244 | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:12 |
| net1 | e6da232e-b717-4726-b4d7-ae6f73d037fd | state changed | CREATE_COMPLETE | 2016-05-09T19:23:13 |
| net1-subnet1 | 01497239-ce06-45d8-a54e-ae6eab0d484c | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:13 |
| net1-subnet1 | 6f9f698e-bb05-4a0d-86b0-3fe8c7e4719d | state changed | CREATE_COMPLETE | 2016-05-09T19:23:15 |
| host1_port0 | 5e388492-5db3-4eb9-b2c8-0d145aeb5d66 | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:15 |
| vip_port0 | bf4c3e2a-eacd-4260-83dc-b85c11277295 | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:15 |
| host1_port0 | 0ad79a82-f556-4fb0-b052-79075093705a | state changed | CREATE_COMPLETE | 2016-05-09T19:23:17 |
| vip_port0 | 3550ffec-d961-4de9-a97f-b64c71af35e9 | state changed | CREATE_COMPLETE | 2016-05-09T19:23:17 |
| host1 | 78203794-1b27-4078-a987-1c80f598541c | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:17 |
| template_Loadbalancer | a2179289-bb39-4562-aa6f-15a94cdd4077 | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:20 |
| template_Loadbalancer | c32ecc4c-a26c-45b4-8f4d-e49ae6af3667 | state changed | CREATE_COMPLETE | 2016-05-09T19:23:21 |
| template_LoadbalancerListener | ba4d63a7-55e2-4eaa-8c4b-8fb4df1350e0 | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:22 |
| template_LoadbalancerListener | ceadde35-4395-470f-9f01-363a855269d0 | state changed | CREATE_COMPLETE | 2016-05-09T19:23:23 |
| template_LoadbalancerPool | 93dbbce6-36ee-42ba-a565-b98508ac63bd | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:23 |
| template_LoadbalancerPool | 0e874a60-faf2-4c59-a5ff-802300b2199d | state changed | CREATE_COMPLETE | 2016-05-09T19:23:25 |
| host1 | 5898410f-090b-46b7-bba5-81077c19e678 | state changed | CREATE_COMPLETE | 2016-05-09T19:23:26 |
| template_LoadbalancerMember | ac40089b-df7b-42ae-8bda-ad392ae34a5d | state changed | CREATE_IN_PROGRESS | 2016-05-09T19:23:27 |
| template_LoadbalancerMember | f379c166-6bdd-4043-8bed-2d4bfcff414a | state changed | CREATE_COMPLETE | 2016-05-09T19:23:29 |
| LB_TEST | 9af199f3-4f46-4165-bcdd-4fb22a7460b9 | Stack CREATE completed successfully | CREATE_COMPLETE | 2016-05-09T19:23:29 |
| LB_TEST | 4505a36c-b001-46ec-b542-05385f6ebb87 | Stack DELETE started | DELETE_IN_PROGRESS | 2016-05-09T19:27:43 |
| template_LoadbalancerMember | 39fe0163-25d3-4f59-868c-69ad4a4c962e | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:43 |
| template_LoadbalancerMember | e646e622-e52a-481c-8809-fd037b94f875 | state changed | DELETE_COMPLETE | 2016-05-09T19:27:44 |
| template_LoadbalancerPool | 6080d331-7d49-4201-b752-715bd0fbb25e | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:44 |
| host1 | 1581c5a2-6db3-4558-abd5-1feb8d28d58e | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:44 |
| template_LoadbalancerPool | cc92a2b4-d491-4dd5-9274-81d8e417b586 | state changed | DELETE_COMPLETE | 2016-05-09T19:27:46 |
| template_LoadbalancerListener | 15f13d34-94ff-42e9-a149-0c2db4abbea9 | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:46 |
| template_LoadbalancerListener | 04031557-03ed-4458-8038-4d5ff038f7bd | state changed | DELETE_COMPLETE | 2016-05-09T19:27:47 |
| host1 | e3421a0e-2e21-437c-8cf2-8417204fb24a | state changed | DELETE_COMPLETE | 2016-05-09T19:27:47 |
| host1_port0 | a357be8c-ec2b-48b0-884c-8b4fa9d62bf5 | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:47 |
| template_Loadbalancer | f2a73f1b-ea0f-4a2f-a8d8-97c86e9bba03 | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:48 |
| host1_port0 | 1fcf8589-cdd7-433d-b64e-6abebd3d9451 | state changed | DELETE_COMPLETE | 2016-05-09T19:27:49 |
| template_Loadbalancer | 47f52dc0-0442-407b-b4c1-3f72111b2dca | state changed | DELETE_COMPLETE | 2016-05-09T19:27:49 |
| vip_port0 | 9812b085-d68f-4c11-b153-931506fff87a | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:49 |
| vip_port0 | 269dccac-14d2-443a-8639-0c2f86624bb8 | state changed | DELETE_COMPLETE | 2016-05-09T19:27:50 |
| net1-subnet1 | 13d1a096-f239-4ec4-a110-5dd70f9b26c7 | state changed | DELETE_IN_PROGRESS | 2016-05-09T19:27:51 |
| net1-subnet1 | 962816f4-268b-492a-9087-2803851b3282 | BadRequest: resources.net1-subnet1: Bad network request: Cannot Delete IP Block, Instance IP(s) in use | DELETE_FAILED | 2016-05-09T19:27:51 |
| LB_TEST | 306725f0-27c9-462c-8560-486c38b17bb7 | Resource DELETE failed: BadRequest: resources.net1-subnet1: Bad network request: Cannot Delete IP Block, Instance IP(s) in use | DELETE_FAILED | 2016-05-09T19:27:51 |
+-------------------------------+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------+
root@b4s342:~/heat_test# heat stack-delete dfcf652a-ddca-4d42-837a-e09f43e56c77
+--------------------------------------+------------+-----------------+---------------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+-----------------+---------------------+--------------+
| e034aaa7-72c0-4e3a-9818-6ec6a4926c0b | SNAT | CREATE_COMPLETE | 2016-05-06T21:32:52 | None |
| dfcf652a-ddca-4d42-837a-e09f43e56c77 | LB_TEST | DELETE_FAILED | 2016-05-09T19:23:12 | None |
+--------------------------------------+------------+-----------------+---------------------+--------------+
root@b4s342:~/heat_test# heat stack-list
+--------------------------------------+------------+-----------------+---------------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+-----------------+---------------------+--------------+
| e034aaa7-72c0-4e3a-9818-6ec6a4926c0b | SNAT | CREATE_COMPLETE | 2016-05-06T21:32:52 | None |
+--------------------------------------+------------+-----------------+---------------------+--------------+
root@b4s342:~/heat_test# heat template-show dfcf652a-ddca-4d42-837a-e09f43e56c77
description: 'HOT template to create a Loadbalancer:

  '
heat_template_version: '2015-04-30'
outputs:
  subnet_details:
    description: Subnet resource
    value: {get_resource: net1-subnet1}
parameters:
  list_name: {description: name for the LoadbalancerListener, type: string}
  loadbalancer_listener_properties_admin_state: {description: admin_state for the
      LoadbalancerListener, type: boolean}
  loadbalancer_listener_properties_connection_limit: {description: connection_limit
      for the LoadbalancerListener, type: number}
  loadbalancer_listener_properties_protocol: {description: protocol for the LoadbalancerListener,
    type: string}
  loadbalancer_listener_properties_protocol_port: {description: protocol_port for
      the LoadbalancerListener, type: number}
  loadbalancer_member_properties_admin_state: {description: admin_state for the LoadbalancerMember,
    type: boolean}
  loadbalancer_member_properties_protocol_port: {description: protocol_port for the
      LoadbalancerMember, type: number}
  loadbalancer_member_properties_weight: {description: weight for the LoadbalancerMember,
    type: number}
  loadbalancer_pool_properties_admin_state: {description: admin_state for the LoadbalancerPool,
    type: boolean}
  loadbalancer_pool_properties_loadbalancer_method: {description: loadbalancer_method
      for the LoadbalancerPool, type: string}
  loadbalancer_pool_properties_protocol: {description: protocol for the LoadbalancerPool,
    type: string}
  loadbalancer_properties_admin_state: {description: admin_state for the Loadbalancer,
    type: boolean}
  loadbalancer_refs: {description: loadbalancer_refs for the LoadbalancerListener,
    type: string}
  mem1_name: {description: name for the LoadbalancerMember, type: string}
  name: {description: name for the Loadbalancer, type: string}
  pool_name: {description: name for the LoadbalancerPool, type: string}
  vn_1_cidr: {description: Web tier network block (CIDR notation), type: string}
  vn_1_fq_name: {description: Web tier network name, type: string}
  vn_1_name: {description: Web tier network name, type: string}
resources:
  host1:
    properties:
      flavor: m1.medium
      image: ubuntu
      name: host1
      networks:
      - port: {get_resource: host1_port0}
    type: OS::Nova::Server
  host1_port0:
    properties:
      network_id: {get_resource: net1}
    type: OS::Neutron::Port
  net1:
    properties:
      name: {get_param: vn_1_name}
      network_policy_refs_data:
      - network_policy_refs_data_sequence: {network_policy_refs_data_sequence_major: 0,
          network_policy_refs_data_sequence_minor: 0}
    type: OS::ContrailV2::VirtualNetwork
  net1-subnet1:
    properties:
      cidr: {get_param: vn_1_cidr}
      enable_dhcp: true
      name: {get_resource: net1}
      network_id: {get_resource: net1}
    type: OS::Neutron::Subnet
  template_Loadbalancer:
    properties:
      loadbalancer_properties:
        loadbalancer_properties_admin_state: {get_param: loadbalancer_properties_admin_state}
        loadbalancer_properties_vip_address:
          get_attr: [vip_port0, fixed_ips, 0, ip_address]
        loadbalancer_properties_vip_subnet_id: {get_resource: net1-subnet1}
      name: {get_param: name}
      virtual_machine_interface_refs:
      - {get_resource: vip_port0}
    type: OS::ContrailV2::Loadbalancer
  template_LoadbalancerListener:
    properties:
      loadbalancer_listener_properties:
        loadbalancer_listener_properties_admin_state: {get_param: loadbalancer_listener_properties_admin_state}
        loadbalancer_listener_properties_connection_limit: {get_param: loadbalancer_listener_properties_connection_limit}
        loadbalancer_listener_properties_protocol: {get_param: loadbalancer_listener_properties_protocol}
        loadbalancer_listener_properties_protocol_port: {get_param: loadbalancer_listener_properties_protocol_port}
      loadbalancer_refs:
      - {get_resource: template_Loadbalancer}
      name: {get_param: list_name}
    type: OS::ContrailV2::LoadbalancerListener
  template_LoadbalancerMember:
    properties:
      loadbalancer_member_properties:
        loadbalancer_member_properties_address:
          get_attr: [host1, first_address]
        loadbalancer_member_properties_admin_state: {get_param: loadbalancer_member_properties_admin_state}
        loadbalancer_member_properties_protocol_port: {get_param: loadbalancer_member_properties_protocol_port}
        loadbalancer_member_properties_weight: {get_param: loadbalancer_member_properties_weight}
      loadbalancer_pool: {get_resource: template_LoadbalancerPool}
      name: {get_param: mem1_name}
    type: OS::ContrailV2::LoadbalancerMember
  template_LoadbalancerPool:
    properties:
      loadbalancer_listener_refs:
      - {get_resource: template_LoadbalancerListener}
      loadbalancer_pool_properties:
        loadbalancer_pool_properties_admin_state: {get_param: loadbalancer_pool_properties_admin_state}
        loadbalancer_pool_properties_loadbalancer_method: {get_param: loadbalancer_pool_properties_loadbalancer_method}
        loadbalancer_pool_properties_protocol: {get_param: loadbalancer_pool_properties_protocol}
      loadbalancer_pool_provider: opencontrail
      name: {get_param: pool_name}
    type: OS::ContrailV2::LoadbalancerPool
  vip_port0:
    properties:
      network_id: {get_resource: net1}
    type: OS::Neutron::Port

Tags: heat lbaas
summary: heat stack-delete fails , when the stack event tries to delete the
- subnet before the ports delete complete
+ subnet
Changed in juniperopenstack:
assignee: nobody → Praneet Bachheti (praneetb)
tags: added: lbaas
Jeba Paulaiyan (jebap)
information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.