yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #28918
[Bug 1427022] [NEW] not releasing IP address when deleting VM, port, LB VIP
Public bug reported:
I am testing with Juno 2014.2.1 release.
When I delete neutron port, VM, or LB VIP, neutron.ipavailabilityranges table was not updated as expected.
(I mean subnet IPs are not released to be used again.)
##case 1. deleting neutron port
1-1 create network/subnet
# neutron net-create twroh_22net
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| name | twroh_22net |
| provider:network_type | vxlan |
| provider:physical_network | |
| provider:segmentation_id | 22 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+---------------------------+--------------------------------------+
# neutron subnet-create --name twroh_22subnet twroh_22net 22.22.22.0/24
Created a new subnet:
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| allocation_pools | {"start": "22.22.22.2", "end": "22.22.22.254"} |
| cidr | 22.22.22.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 22.22.22.1 |
| host_routes | |
| id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | twroh_22subnet |
| network_id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+-------------------+------------------------------------------------+
1-2 select neutron.ipavailabilityranges table
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.254 |
+--------------------------------------+------------+--------------+
1-3 create a port with IP 22.22.22.100
# NETID=1e4e010a-3984-4058-88c8-59ceff79cf3d
# SUBNETID=34f7be13-c34c-45fb-b2bc-fa1b64da1d25
# neutron port-create --fixed-ip subnet_id=$SUBNETID,ip_address=22.22.22.100 $NETID
Created a new port:
+-----------------------+-------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "34f7be13-c34c-45fb-b2bc-fa1b64da1d25", "ip_address": "22.22.22.100"} |
| id | 5ec5b197-d730-4e1b-8c99-057d43c0aa64 |
| mac_address | fa:16:3e:f4:b8:a7 |
| name | |
| network_id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| security_groups | c20b355a-3af1-475c-a226-a0b6c7799d2c |
| status | DOWN |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+-----------------------+-------------------------------------------------------------------------------------+
1-4 select neutron.ipavailabilityranges table (IP 22.22.22.100 used, 101
and 102 were used by DHCP)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.103 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2 rows in set (0.00 sec)
1-5 delete neutron port
# neutron port-delete 5ec5b197-d730-4e1b-8c99-057d43c0aa64
Deleted port: 5ec5b197-d730-4e1b-8c99-057d43c0aa64
1-6 select neutron.ipavailabilityranges table (IP 22.22.22.100 was not released)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.103 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
##case 2. deleting VM
2-1 create a test VM
# nova boot --flavor lin_c1m1 --image Ubuntu_12.04 --nic net-id=$NETID twroh_22net_vm01
2-2 select neutron.ipavailabilityranges table (IP 22.22.22.103 was
used)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.104 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-3 create second VM
# nova boot --flavor lin_c1m1 --image Ubuntu_12.04 --nic net-id=$NETID twroh_22net_vm02
2-4 select neutron.ipavailabilityranges table (IP 22.22.22.104 was used)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-5 delete first VM
# nova delete twroh_22net_vm01
Request to delete server twroh_22net_vm01 has been accepted.
# nova list |grep twroh_22net_vm01
#
2-6 select neutron.ipavailabilityranges table (IP 22.22.22.103 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-7 delete second VM
# nova delete twroh_22net_vm02
Request to delete server twroh_22net_vm02 has been accepted.
# nova list |grep twroh_22net_vm02
#
2-8 select neutron.ipavailabilityranges table (IP 22.22.22.104 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
##case 3. deleting LB VIP
3-1 create LB POOL
# neutron lb-pool-create --lb-method SOURCE_IP --name twroh_lb_pool1 --protocol HTTP --subnet-id $SUBNETID
Created a new pool:
+------------------------+--------------------------------------+
| Field | Value |
+------------------------+--------------------------------------+
| admin_state_up | True |
| description | |
| health_monitors | |
| health_monitors_status | |
| id | ef6194a3-6f71-4f2f-94d7-af5af4f27a1d |
| lb_method | SOURCE_IP |
| members | |
| name | twroh_lb_pool1 |
| protocol | HTTP |
| provider | haproxy |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
| vip_id | |
+------------------------+--------------------------------------+
3-2 create LB VIP with IP 22.22.22.250
# neutron lb-vip-create --address 22.22.22.250 --name twroh_lb_pool1_vip --protocol-port 80 --protocol HTTP --subnet-id $SUBNETID twroh_lb_pool1
Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 22.22.22.250 |
| admin_state_up | True |
| connection_limit | -1 |
| description | |
| id | b94b3e2f-c642-45d8-83c9-63694ecd8a5c |
| name | twroh_lb_pool1_vip |
| pool_id | ef6194a3-6f71-4f2f-94d7-af5af4f27a1d |
| port_id | fef67c07-3527-40f9-ad1c-126e6c5602ba |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+---------------------+--------------------------------------+
3-3 select neutron.ipavailabilityranges table (IP 22.22.22.250 was used
)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.249 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.251 | 22.22.22.254 |
+--------------------------------------+--------------+--------------+
3-4 delete LB VIP
# neutron lb-vip-delete b94b3e2f-c642-45d8-83c9-63694ecd8a5c
Deleted vip: b94b3e2f-c642-45d8-83c9-63694ecd8a5c
t# neutron lb-vip-list |grep 22.22.22
#
3-5 select neutron.ipavailabilityranges table (IP 22.22.22.250 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.249 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.251 | 22.22.22.254 |
+--------------------------------------+--------------+--------------+
== END ==
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1427022
Title:
not releasing IP address when deleting VM, port, LB VIP
Status in OpenStack Neutron (virtual network service):
New
Bug description:
I am testing with Juno 2014.2.1 release.
When I delete neutron port, VM, or LB VIP, neutron.ipavailabilityranges table was not updated as expected.
(I mean subnet IPs are not released to be used again.)
##case 1. deleting neutron port
1-1 create network/subnet
# neutron net-create twroh_22net
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| name | twroh_22net |
| provider:network_type | vxlan |
| provider:physical_network | |
| provider:segmentation_id | 22 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+---------------------------+--------------------------------------+
# neutron subnet-create --name twroh_22subnet twroh_22net 22.22.22.0/24
Created a new subnet:
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| allocation_pools | {"start": "22.22.22.2", "end": "22.22.22.254"} |
| cidr | 22.22.22.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 22.22.22.1 |
| host_routes | |
| id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | twroh_22subnet |
| network_id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+-------------------+------------------------------------------------+
1-2 select neutron.ipavailabilityranges table
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.254 |
+--------------------------------------+------------+--------------+
1-3 create a port with IP 22.22.22.100
# NETID=1e4e010a-3984-4058-88c8-59ceff79cf3d
# SUBNETID=34f7be13-c34c-45fb-b2bc-fa1b64da1d25
# neutron port-create --fixed-ip subnet_id=$SUBNETID,ip_address=22.22.22.100 $NETID
Created a new port:
+-----------------------+-------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "34f7be13-c34c-45fb-b2bc-fa1b64da1d25", "ip_address": "22.22.22.100"} |
| id | 5ec5b197-d730-4e1b-8c99-057d43c0aa64 |
| mac_address | fa:16:3e:f4:b8:a7 |
| name | |
| network_id | 1e4e010a-3984-4058-88c8-59ceff79cf3d |
| security_groups | c20b355a-3af1-475c-a226-a0b6c7799d2c |
| status | DOWN |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+-----------------------+-------------------------------------------------------------------------------------+
1-4 select neutron.ipavailabilityranges table (IP 22.22.22.100 used,
101 and 102 were used by DHCP)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.103 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2 rows in set (0.00 sec)
1-5 delete neutron port
# neutron port-delete 5ec5b197-d730-4e1b-8c99-057d43c0aa64
Deleted port: 5ec5b197-d730-4e1b-8c99-057d43c0aa64
1-6 select neutron.ipavailabilityranges table (IP 22.22.22.100 was not released)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.103 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
##case 2. deleting VM
2-1 create a test VM
# nova boot --flavor lin_c1m1 --image Ubuntu_12.04 --nic net-id=$NETID twroh_22net_vm01
2-2 select neutron.ipavailabilityranges table (IP 22.22.22.103 was
used)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.104 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-3 create second VM
# nova boot --flavor lin_c1m1 --image Ubuntu_12.04 --nic net-id=$NETID twroh_22net_vm02
2-4 select neutron.ipavailabilityranges table (IP 22.22.22.104 was used)
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-5 delete first VM
# nova delete twroh_22net_vm01
Request to delete server twroh_22net_vm01 has been accepted.
# nova list |grep twroh_22net_vm01
#
2-6 select neutron.ipavailabilityranges table (IP 22.22.22.103 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
2-7 delete second VM
# nova delete twroh_22net_vm02
Request to delete server twroh_22net_vm02 has been accepted.
# nova list |grep twroh_22net_vm02
#
2-8 select neutron.ipavailabilityranges table (IP 22.22.22.104 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.254 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
+--------------------------------------+--------------+--------------+
##case 3. deleting LB VIP
3-1 create LB POOL
# neutron lb-pool-create --lb-method SOURCE_IP --name twroh_lb_pool1 --protocol HTTP --subnet-id $SUBNETID
Created a new pool:
+------------------------+--------------------------------------+
| Field | Value |
+------------------------+--------------------------------------+
| admin_state_up | True |
| description | |
| health_monitors | |
| health_monitors_status | |
| id | ef6194a3-6f71-4f2f-94d7-af5af4f27a1d |
| lb_method | SOURCE_IP |
| members | |
| name | twroh_lb_pool1 |
| protocol | HTTP |
| provider | haproxy |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
| vip_id | |
+------------------------+--------------------------------------+
3-2 create LB VIP with IP 22.22.22.250
# neutron lb-vip-create --address 22.22.22.250 --name twroh_lb_pool1_vip --protocol-port 80 --protocol HTTP --subnet-id $SUBNETID twroh_lb_pool1
Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 22.22.22.250 |
| admin_state_up | True |
| connection_limit | -1 |
| description | |
| id | b94b3e2f-c642-45d8-83c9-63694ecd8a5c |
| name | twroh_lb_pool1_vip |
| pool_id | ef6194a3-6f71-4f2f-94d7-af5af4f27a1d |
| port_id | fef67c07-3527-40f9-ad1c-126e6c5602ba |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | 34f7be13-c34c-45fb-b2bc-fa1b64da1d25 |
| tenant_id | 13aae994774947298d231cfd361c1ca2 |
+---------------------+--------------------------------------+
3-3 select neutron.ipavailabilityranges table (IP 22.22.22.250 was
used )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.249 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.251 | 22.22.22.254 |
+--------------------------------------+--------------+--------------+
3-4 delete LB VIP
# neutron lb-vip-delete b94b3e2f-c642-45d8-83c9-63694ecd8a5c
Deleted vip: b94b3e2f-c642-45d8-83c9-63694ecd8a5c
t# neutron lb-vip-list |grep 22.22.22
#
3-5 select neutron.ipavailabilityranges table (IP 22.22.22.250 was not released )
MariaDB [(none)]> select * from neutron.ipavailabilityranges where allocation_pool_id like '1e5d%';
+--------------------------------------+--------------+--------------+
| allocation_pool_id | first_ip | last_ip |
+--------------------------------------+--------------+--------------+
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.105 | 22.22.22.249 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.2 | 22.22.22.99 |
| 1e5d0bec-11aa-422e-955c-6b96000e334d | 22.22.22.251 | 22.22.22.254 |
+--------------------------------------+--------------+--------------+
== END ==
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1427022/+subscriptions
Follow ups
References