nova-manage creates network with wrong vlanid

Bug #1288609 reported by Alexey Wasilyev on 2014-03-06
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Unassigned
Icehouse
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.

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) on 2014-03-12
tags: added: network
Jian Wen (wenjianhn) on 2014-04-21
Changed in nova:
status: New → Confirmed
Mike Scherbakov (mihgen) on 2014-04-29
tags: added: low-hanging-fruit
Jian Wen (wenjianhn) on 2014-04-30
Changed in nova:
assignee: nobody → Jian Wen (wenjianhn)
status: Confirmed → In Progress
Jian Wen (wenjianhn) on 2014-04-30
tags: removed: low-hanging-fruit
Matt Riedemann (mriedem) on 2014-06-09
tags: added: nova-manage
Changed in nova:
importance: Undecided → Medium

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) on 2014-06-10
Changed in nova:
assignee: Jian Wen (wenjianhn) → nobody

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

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
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) on 2014-10-16
Changed in nova:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers