nova-manage lets you create broken networks (was: trying to add VLAN #100 to IF -:None:- error: No such device)

Bug #810563 reported by Chuck Short
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Trey Morris

Bug Description

When starting nova-network on the oneiric package from the ubuntu archive, it refuses to start:

2011-07-14 15:32:05,841 DEBUG nova.utils [-] Running cmd (subprocess): sudo vconfig set_name_type VLAN_PLUS_VID_NO_PAD from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:143
2011-07-14 15:32:05,880 DEBUG nova.utils [-] Running cmd (subprocess): sudo vconfig add None 100 from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:143
2011-07-14 15:32:05,981 DEBUG nova.utils [-] Result was 3 from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:161
2011-07-14 15:32:05,983 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/exception.py", line 87, in _wrap
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/compute/manager.py", line 334, in run_instance
(nova.exception): TRACE: self._run_instance(context, instance_id, **kwargs)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/compute/manager.py", line 297, in _run_instance
(nova.exception): TRACE: instance_id)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/manager.py", line 827, in setup_compute_network
(nova.exception): TRACE: network['bridge_interface'])
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 456, in ensure_vlan_bridge
(nova.exception): TRACE: interface = ensure_vlan(vlan_num, bridge_interface)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/utils.py", line 613, in inner
(nova.exception): TRACE: retval = f(*args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 467, in ensure_vlan
(nova.exception): TRACE: _execute('sudo', 'vconfig', 'add', bridge_interface, vlan_num)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 689, in _execute
(nova.exception): TRACE: return utils.execute(*cmd, **kwargs)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/utils.py", line 169, in execute
(nova.exception): TRACE: cmd=' '.join(cmd))
(nova.exception): TRACE: ProcessExecutionError: Unexpected error while running command.
(nova.exception): TRACE: Command: sudo vconfig add None 100
(nova.exception): TRACE: Exit code: 3
(nova.exception): TRACE: Stdout: ''
(nova.exception): TRACE: Stderr: 'ERROR: trying to add VLAN #100 to IF -:None:- error: No such device\n'
(nova.exception): TRACE:
2011-07-14 15:32:05,985 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.7/nova/rpc.py", line 232, in _process_data
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.7/nova/exception.py", line 93, in _wrap
(nova): TRACE: raise Error(str(e))
(nova): TRACE: Error: Unexpected error while running command.
(nova): TRACE: Command: sudo vconfig add None 100
(nova): TRACE: Exit code: 3
(nova): TRACE: Stdout: ''
(nova): TRACE: Stderr: 'ERROR: trying to add VLAN #100 to IF -:None:- error: No such device\n'
(nova): TRACE:

Related branches

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I believe I also see this issue in Natty:
nova-compute 2011.3~d3~20110716.1281-0ubuntu0ppa1~natty1

Revision history for this message
Thierry Carrez (ttx) wrote :

I wonder if this is an upgrade issue. Does this also affect new installs (i.e. if you start from a clean DB) ?

Changed in nova:
status: New → Incomplete
summary: - Unable to start networking.
+ Unable to start networking (trying to add VLAN #100 to IF -:None:-
+ error: No such device)
Revision history for this message
Thierry Carrez (ttx) wrote : Re: Unable to start networking (trying to add VLAN #100 to IF -:None:- error: No such device)

Workaround: run "sudo vconfig add br100 100"

Revision history for this message
Chuck Short (zulcss) wrote :

This happens on new installs as well.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → High
milestone: none → diablo-3
status: Incomplete → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

You have to start an instance on a fresh setup to hit ensure_vlan and the issue. Then, on subsequent startups, it will hit the issue. Investigating a bit more.

Revision history for this message
Thierry Carrez (ttx) wrote :

The issue is that bridge_interface is None by default ({vlan,flat}_interface flag is None by default and nova-manage uses flag if you don't specify a bridge interface when creating network).

Then ensure_vlan_bridge (and ensure_vlan) happily try to use "None" as the bridge interface name.

Revision history for this message
Trey Morris (tr3buchet) wrote :

This looks to me like a configuration issue. When networks are created, the physical interface for the created bridges (bridge_interface) needs to be specified. The problem is that without being able to create the bridge to connect to, the network host would be useless, so I don't think catching this error and moving on is a good solution.

I also don't think updating flags is a solution to this. After multi-nic we shouldn't be using that flag anymore. I left it there as a sortof deprecated feature to be backwards compatible.

Take a look at the arguments to nova-manage create network. "bridge_interface" must be specified if using FlatDHCP or Vlan network managers.

Revision history for this message
Thierry Carrez (ttx) wrote :

<ttx> tr3buchet: currently nova-manage lets you create broken networks, maybe that's the issue
<ttx> tr3buchet: and our docs also advise to just run "sudo nova-manage network create novanetwork 10.0.0.0/8 1 64"
<ttx> If there is no sane default now, we should make it mandatory in nova-manage, and update doc ?

Changed in nova:
importance: High → Medium
summary: - Unable to start networking (trying to add VLAN #100 to IF -:None:-
- error: No such device)
+ nova-manage lets you create broken networks (was: trying to add VLAN
+ #100 to IF -:None:- error: No such device)
Changed in nova:
assignee: nobody → Trey Morris (tr3buchet)
Changed in nova:
status: Confirmed → Fix Committed
Revision history for this message
bnight (bnight) wrote :

Vish I have the same Issue after upgrading to D4 from ppa on ubuntu 11.04 my nova-network pack is version:

 dpkg -l | grep nova-network
ii nova-network 2011.3~d4-0ubuntu0~ppa1~natty1 OpenStack Compute - Network manager

Can you please advice what I can do in order to fix this issue ?

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 810563] nova-manage lets you create broken networks (was: trying to add VLAN #100 to IF -:None:- error: No such device)
Download full text (4.4 KiB)

it should default to br100 with a warning when you create networks. It won't automatically fix existing networks for you though. You will need to recreate them or manually add a bridge in the db.

Vish

On Sep 16, 2011, at 4:00 PM, bnight wrote:

> Vish I have the same Issue after upgrading to D4 from ppa on ubuntu
> 11.04 my nova-network pack is version:
>
>
> dpkg -l | grep nova-network
> ii nova-network 2011.3~d4-0ubuntu0~ppa1~natty1 OpenStack Compute - Network manager
>
> Can you please advice what I can do in order to fix this issue ?
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/810563
>
> Title:
> nova-manage lets you create broken networks (was: trying to add VLAN
> #100 to IF -:None:- error: No such device)
>
> Status in OpenStack Compute (Nova):
> Fix Committed
>
> Bug description:
> When starting nova-network on the oneiric package from the ubuntu
> archive, it refuses to start:
>
> 2011-07-14 15:32:05,841 DEBUG nova.utils [-] Running cmd (subprocess): sudo vconfig set_name_type VLAN_PLUS_VID_NO_PAD from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:143
> 2011-07-14 15:32:05,880 DEBUG nova.utils [-] Running cmd (subprocess): sudo vconfig add None 100 from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:143
> 2011-07-14 15:32:05,981 DEBUG nova.utils [-] Result was 3 from (pid=22131) execute /usr/lib/pymodules/python2.7/nova/utils.py:161
> 2011-07-14 15:32:05,983 ERROR nova.exception [-] Uncaught exception
> (nova.exception): TRACE: Traceback (most recent call last):
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/exception.py", line 87, in _wrap
> (nova.exception): TRACE: return f(*args, **kw)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/compute/manager.py", line 334, in run_instance
> (nova.exception): TRACE: self._run_instance(context, instance_id, **kwargs)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/compute/manager.py", line 297, in _run_instance
> (nova.exception): TRACE: instance_id)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/manager.py", line 827, in setup_compute_network
> (nova.exception): TRACE: network['bridge_interface'])
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 456, in ensure_vlan_bridge
> (nova.exception): TRACE: interface = ensure_vlan(vlan_num, bridge_interface)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/utils.py", line 613, in inner
> (nova.exception): TRACE: retval = f(*args, **kwargs)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 467, in ensure_vlan
> (nova.exception): TRACE: _execute('sudo', 'vconfig', 'add', bridge_interface, vlan_num)
> (nova.exception): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/linux_net.py", line 689, in _execute
> (nova.exception): TRACE: return utils.execute(*cmd, **kwargs)
> (nova.excep...

Read more...

Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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