nova-manage creates network with wrong vlanid

Bug #1288609 reported by Alexey Wasilyev
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned
Icehouse
Fix Released
Medium
Unassigned

Bug Description

I faced a bug in latest nova network:

[root@host awasilyev]# /usr/bin/nova-manage network create novanetwork 172.26.0.0/24 --vlan 500
[root@host awasilyev]# /usr/bin/nova-manage network create novanetwork 172.26.1.0/24 --vlan 501
[root@host awasilyev]# /usr/bin/nova-manage network create novanetwork 172.26.2.0/24 --vlan 502
[root@host awasilyev]# nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
64 172.26.0.0/24 None 172.26.0.3 8.8.4.4 None 500 None 225c8cbf-89bb-4171-b405-0047012a7803
65 172.26.1.0/24 None 172.26.1.3 8.8.4.4 None 502 None d461b285-d9c6-4a8c-ae39-5a657bb5926a
66 172.26.2.0/24 None 172.26.2.3 8.8.4.4 None 504 None 4c5a5d5b-24c8-4833-8bd0-6dcca11acb68

I try to create 3 networks, specifying exact vlan number for each network. But nova-manage creates networks using wrong vlan id's.

My previous openstack install (it was 3-4 monthes ago) does not have this bug.

Revision history for this message
Alexey Wasilyev (awasilyev) wrote :

There is a bug in the /usr/lib/python2.6/site-packages/nova/network/manager.py
on line 1066 'vlan_start' used as hash key:
kwargs["vlan_start"] = kwargs.get("vlan_start") or CONF.vlan_start

than passing kwargs as argument:
return self._do_create_networks(context, **kwargs)

But in the _do_create_networks (line 1188):
vlan = kwargs.get('vlan', None)

'vlan' used instead of 'vlan_start'!

As we can see on line 498 in /usr/lib/python2.6/site-packages/nova/cmd/manage.py, '--vlan' argument going to the 'vlan_start' variable, not 'vlan'.

Tracy Jones (tjones-i)
tags: added: network
Jian Wen (wenjianhn)
Changed in nova:
status: New → Confirmed
Mike Scherbakov (mihgen)
tags: added: low-hanging-fruit
Jian Wen (wenjianhn)
Changed in nova:
assignee: nobody → Jian Wen (wenjianhn)
status: Confirmed → In Progress
Jian Wen (wenjianhn)
tags: removed: low-hanging-fruit
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/92037

Matt Riedemann (mriedem)
tags: added: nova-manage
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Jian Wen (<email address hidden>) on branch: master
Review: https://review.openstack.org/92037
Reason: Abandon as per Change-Id: I8dd858e4cf17d8f689613554d1fbc3e56f220886

Jian Wen (wenjianhn)
Changed in nova:
assignee: Jian Wen (wenjianhn) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/99692

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/96679
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e251535eaa7c6a564eddb9218de177c9bea656bb
Submitter: Jenkins
Branch: master

commit e251535eaa7c6a564eddb9218de177c9bea656bb
Author: gengjh <email address hidden>
Date: Fri May 30 15:32:33 2014 +0800

    Fix the wrong dest of 'vlan' option and add new 'vlan_start' option

    * Allow to specify vlan tag when create nova network, the dest of vlan
    option should be 'vlan' instead of 'vlan_start'
    * Provide new option 'vlan_start' when create nova network
    * test case is updated.

    DocImpact
    Closes-Bug: #1288609
    Change-Id: I8dd858e4cf17d8f689613554d1fbc3e56f220886

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/99692
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=120ecf32b9e6b2badfa097a52c6239d684900373
Submitter: Jenkins
Branch: stable/icehouse

commit 120ecf32b9e6b2badfa097a52c6239d684900373
Author: gengjh <email address hidden>
Date: Fri May 30 15:32:33 2014 +0800

    Fix the wrong dest of 'vlan' option and add new 'vlan_start' option

    * Allow to specify vlan tag when create nova network, the dest of vlan
    option should be 'vlan' instead of 'vlan_start'
    * Provide new option 'vlan_start' when create nova network
    * test case is updated.

    DocImpact
    Closes-Bug: #1288609
    Change-Id: I8dd858e4cf17d8f689613554d1fbc3e56f220886
    (cherry picked from commit e251535eaa7c6a564eddb9218de177c9bea656bb)

tags: added: in-stable-icehouse
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Revision history for this message
Alan Pevec (apevec) wrote :

Icehouse backport introduced non-backward compatible parameter change, see http://lists.openstack.org/pipermail/openstack-stable-maint/2014-October/002796.html

tags: removed: in-stable-icehouse
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.