nova-manage network create does not properly register gateway_v6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I tested rev1218.
nova-manage network create cannot register gateway_v6 when using FlatManager and use_ipv6 flag is true.
* Default value of gateway_v6 causes error
# ./nova/
Command failed, please check log for more info
2011-06-28 16:17:50,455 CRITICAL nova [-] range contains more than 9223372036854775807 (sys.maxint) IP addresses! Use the .size property instead.
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "./nova/
(nova): TRACE: main()
(nova): TRACE: File "./nova/
(nova): TRACE: fn(*argv)
(nova): TRACE: File "./nova/
(nova): TRACE: label=label)
(nova): TRACE: File "/opt2/
(nova): TRACE: net['gateway_v6'] = str(list(
(nova): TRACE: File "/usr/lib/
(nova): TRACE: "IP addresses! Use the .size property instead." % _sys.maxint)
(nova): TRACE: IndexError: range contains more than 9223372036854775807 (sys.maxint) IP addresses! Use the .size property instead.
(nova): TRACE:
* Specifying value of gateway_v6 registser incorrect gateway_v6 value.
# ./nova/
2011-06-28 16:25:27,321 DEBUG nova.utils [-] backend <module 'nova.db.
root@usv601:/opt2# mysql -u root --password=nova nova --execute "select id,cidr,
+----+-
| id | cidr | cidr_v6 | gateway_v6 |
+----+-
| 17 | 10.1.9.0/28 | fd00:1::/64 | d |
+----+-
gateway_v6 value 'd' is incorrect.
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in nova: | |
milestone: | none → diablo-4 |
Changed in nova: | |
milestone: | diablo-4 → 2011.3 |
status: | Fix Committed → Fix Released |
Following patch works for me.
=== modified file 'nova/network/ manager. py' manager. py 2011-06-23 13:57:22 +0000 manager. py 2011-06-28 07:35:00 +0000
--- nova/network/
+++ nova/network/
@@ -328,9 +328,9 @@
if gateway_v6:
# use a pre-defined gateway if one is provided gateway_ v6)[1])
else: project_ net_v6) [1]) net_v6[ 1])
- net['gateway_v6'] = str(list(
+ net['gateway_v6'] = str(gateway_v6)
- net['gateway_v6'] = str(list(
+ net['gateway_v6'] = str(project_