deallocate_fixed_ip attempts to update an already deleted fixed_ip
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
John Tran | ||
Essex |
Fix Released
|
Medium
|
Vish Ishaya | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
When deleting a vm , the nova network manager attempts to deallocate the fixed ip but the context has read_deleted set to 'yes' therefore attempts to update an already deleted fixed_ip (if exists).
Use case to replicate the problem, via devstack environment:
1. create a network , delete it, recreate it ; So that you'll have a set of deleted fixed_ips in the db.
$ nova-manage network create --fixed_range_v4 192.168.100.0/24 --label mynet
$ nova-manage network delete 192.168.100.0/24
$ nova-manage network create --fixed_range_v4 192.168.100.0/24 --label mynet
2. Verify that the network id is no longer '1', and that there are fixed_ips w/ 'deleted' column set to '1':
$ mysql -u root -p nova -e 'select id from networks;'
Enter password:
+----+
| id |
+----+
| 2 |
+----+
$ mysql -u root -p nova -e 'select id, address, deleted from fixed_ips limit 10;'
Enter password:
+----+-
| id | address | deleted |
+----+-
| 1 | 192.168.100.0 | 1 |
| 2 | 192.168.100.1 | 1 |
| 3 | 192.168.100.2 | 1 |
| 4 | 192.168.100.3 | 1 |
| 5 | 192.168.100.4 | 1 |
| 6 | 192.168.100.5 | 1 |
| 7 | 192.168.100.6 | 1 |
| 8 | 192.168.100.7 | 1 |
| 9 | 192.168.100.8 | 1 |
| 10 | 192.168.100.9 | 1 |
+----+-
3. Create a new instance:
$ nova boot --flavor m1.tiny --image cirros-
4. Delete the instance and verify the trace in network log/console
$ nova delete test1
from network log, trace shows it is looking at the wrong network_id "1" instead of the new network_id "2":
2012-06-25 11:40:24 DEBUG nova.network.
2012-06-25 11:40:24 ERROR nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
2012-06-25 11:40:24 TRACE nova.openstack.
Changed in nova: | |
assignee: | nobody → John Tran (jtran) |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → folsom-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-2 → 2012.2 |
Changed in nova (Ubuntu): | |
status: | New → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Fix proposed to branch: master /review. openstack. org/8971
Review: https:/