`nova-manage fixed list` fails if network has been deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Tong Li | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Bug 754900 fixes a long standing issue of not deleting from fixed_ips when a network is deleted. However, the manner in which it "deletes" a fixed_ip (by setting the deleted column to true) is inconsistent with how the network is deleted (by actually deleting the record). Running `nova-manage fixed list` does not seem to honor the deleted column of fixed_ips, and proceeds to complain about the non-existent network.
The networks table has a deleted column, but it doesn't seem to be used. For the sake of audit-ability (hence the deleted column), shouldn't deleting a network just mark it as deleted, and all tools modified to honor the deleted state? If audit-ability is handled in another manner, shouldn't the fixed_ips records be deleted, as the associated network is?
Step to reproduce:
$ sudo nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
1 10.0.19.0/24 None 10.0.19.3 None None 100 tenant1 99658bf1-
2 10.1.19.0/24 None 10.1.19.3 None None 101 tenant2 dd660168-
$ sudo nova-manage network modify 10.0.19.0/24 --disassociate-
$ sudo nova-manage network delete 10.0.19.0/24
$ sudo nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
2 10.1.19.0/24 None 10.1.19.3 None None 101 tenant2 dd660168-
$ sudo nova-manage fixed list
network IP address hostname host
Command failed, please check log for more info
2012-07-06 11:04:31 CRITICAL nova [req-1de63acb-
2012-07-06 11:04:31 TRACE nova Traceback (most recent call last):
2012-07-06 11:04:31 TRACE nova File "/usr/bin/
2012-07-06 11:04:31 TRACE nova main()
2012-07-06 11:04:31 TRACE nova File "/usr/bin/
2012-07-06 11:04:31 TRACE nova fn(*fn_args, **fn_kwargs)
2012-07-06 11:04:31 TRACE nova File "/usr/bin/
2012-07-06 11:04:31 TRACE nova fixed_ip[
2012-07-06 11:04:31 TRACE nova File "/usr/lib/
2012-07-06 11:04:31 TRACE nova return IMPL.network_
2012-07-06 11:04:31 TRACE nova File "/usr/lib/
2012-07-06 11:04:31 TRACE nova return f(*args, **kwargs)
2012-07-06 11:04:31 TRACE nova File "/usr/lib/
2012-07-06 11:04:31 TRACE nova raise exception.
2012-07-06 11:04:31 TRACE nova NetworkNotFound: Network 1 could not be found.
2012-07-06 11:04:31 TRACE nova
Versions:
Ubuntu - 12.04 LTS
Nova - 2012.1+
description: | updated |
description: | updated |
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in nova: | |
milestone: | none → folsom-3 |
status: | Fix Committed → Fix Released |
Changed in nova (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in nova: | |
milestone: | folsom-3 → 2012.2 |
The problem is that in nova-manage, the code catches exception. NetworkNotFound and blindly say "Command failed, please check log for more info" regardless what the exception might be.
With latest code as July 17, 2012, in the scenario you described, the following command will both produce that error.
with latest code, July 17, 2012,
$nova-manage fixed list
network IP address hostname host
10.0.0.0/24 10.0.0.0 None None
10.0.0.0/24 10.0.0.1 None None
10.0.0.0/24 10.0.0.2 None None
10.0.0.0/24 10.0.0.3 None None
10.0.0.0/24 10.0.0.4 None None
$nova-manage network list 9407-4aeb- a9db-05c38211ee 0a
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
1 10.0.0.0/24 None 10.0.0.2 8.8.4.4 None None None 0440a6eb-
$nova-manage network delete 10.0.0.0/24
$nova-manage fixed list
network IP address hostname host
Command failed, please check log for more info
$ nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
Command failed, please check log for more info
The fixes should be in file nova/bin/ nova-manage