Creating a network with VlanManager fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Vish Ishaya |
Bug Description
1. Set the network manager as VlanManager
2. Create a network using nova-manage
$ nova-manage network create --label private --fixed_range_v4 10.0.0.0/24 --num_networks 1 --network_size 256 --vlan 100
Command fails with the following stack trace:
2012-09-06 03:52:40 CRITICAL nova [req-e65dfede-
2012-09-06 03:52:40 TRACE nova Traceback (most recent call last):
2012-09-06 03:52:40 TRACE nova File "/usr/local/
2012-09-06 03:52:40 TRACE nova execfile(__file__)
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova main()
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova fn(*fn_args, **fn_kwargs)
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova net_manager.
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova raise ValueError(_('The sum between the number of networks and'
2012-09-06 03:52:40 TRACE nova ValueError: The sum between the number of networks and the vlan start cannot be greater than 4094
2012-09-06 03:52:40 TRACE nova
The sum between the number of networks and the vlan start cannot be greater than 4094
2012-09-06 03:52:40 TRACE nova Traceback (most recent call last):
2012-09-06 03:52:40 TRACE nova File "/usr/local/
2012-09-06 03:52:40 TRACE nova execfile(__file__)
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova main()
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova fn(*fn_args, **fn_kwargs)
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova net_manager.
2012-09-06 03:52:40 TRACE nova File "/opt/stack/
2012-09-06 03:52:40 TRACE nova raise ValueError(_('The sum between the number of networks and'
2012-09-06 03:52:40 TRACE nova ValueError: The sum between the number of networks and the vlan start cannot be greater than 4094
2012-09-06 03:52:40 TRACE nova
Problem is that nova-manage does not convert the unicodes for network_size, num_networks and vlan_start to "integer", hence the conditions in VlanManage.
This should be handled properly by nova-manage.
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → In Progress |
assignee: | nobody → Vish Ishaya (vishvananda) |
milestone: | none → folsom-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
Below patch can fix the above issue.
diff --git a/bin/nova-manage b/bin/nova-manage (object) :
if v and k != "self"))
kwargs[ 'multi_ host'] = multi_host == 'T' 'num_networks' ] = int(num_networks) 'network_ size'] = int(network_size) 'vlan_start' ] = int(vlan_start)
net_manager = importutils. import_ object( FLAGS.network_ manager)
net_manager. create_ networks( context. get_admin_ context( ), **kwargs)
index c1426e2..f856d8b 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -475,6 +475,14 @@ class NetworkCommands
if multi_host is not None:
+ if num_networks is not None:
+ kwargs[
+ if network_size is not None:
+ kwargs[
+ if vlan_start is not None:
+ kwargs[
+ if vpn_start is not None:
+ kwargs['vpn_start'] = int(vpn_start)