OpenStack Compute (Nova)

LibvirtOpenVswitchDriver failed to create tap device on Scientific linux 6.1

Reported by Koji Iida on 2011-10-27
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Brad Hall
Diablo
Undecided
Unassigned

Bug Description

I'm using Diablo release and QuantumManager with quantum ovs plugin on Scientific Linux 6.1.

It seems that LibvirtOpenVswitchDriver can't create tuntap device correctly.
It may that ip command can't create tuntap.

Following is log output of nova-compute.

2011-10-27 21:15:28,359 DEBUG nova.utils [-] Running cmd (subprocess):
sudo ip tuntap add tapaba5418e-3e mode tap from (pid=18385) execute
/opt/stack/nova/nova/utils.py:165
2011-10-27 21:15:28,381 DEBUG nova.utils [-] Result was 255 from
(pid=18385) execute /opt/stack/nova/nova/utils.py:180
2011-10-27 21:15:28,382 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/opt/stack/nova/nova/exception.py",
line 98, in wrapped
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File
"/opt/stack/nova/nova/virt/libvirt/connection.py", line 597, in spawn
(nova.exception): TRACE: block_device_info=block_device_info)
(nova.exception): TRACE: File
"/opt/stack/nova/nova/virt/libvirt/connection.py", line 1164, in to_xml
(nova.exception): TRACE: block_device_info)
(nova.exception): TRACE: File
"/opt/stack/nova/nova/virt/libvirt/connection.py", line 1062, in _prepare_xml_info
(nova.exception): TRACE: nics.append(self.vif_driver.plug(instance,
network, mapping))
(nova.exception): TRACE: File
"/opt/stack/nova/nova/virt/libvirt/vif.py", line 111, in plug
(nova.exception): TRACE: run_as_root=True)
(nova.exception): TRACE: File "/opt/stack/nova/nova/utils.py", line
188, in execute
(nova.exception): TRACE: cmd=' '.join(cmd))
(nova.exception): TRACE: ProcessExecutionError: Unexpected error while
running command.
(nova.exception): TRACE: Command: sudo ip tuntap add tapaba5418e-3e mode tap
(nova.exception): TRACE: Exit code: 255
(nova.exception): TRACE: Stdout: ''
(nova.exception): TRACE: Stderr: 'Object "tuntap" is unknown, try "ip help".\n'
(nova.exception): TRACE:
2011-10-27 21:15:28,383 ERROR nova.compute.manager [-] Instance '18'
failed to spawn. Is virtualization enabled in the BIOS? Details: Unexp
ected error while running command.
Command: sudo ip tuntap add tapaba5418e-3e mode tap
Exit code: 255
Stdout: ''
Stderr: 'Object "tuntap" is unknown, try "ip help".\n'
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File
"/opt/stack/nova/nova/compute/manager.py", line 424, in _run_instance
(nova.compute.manager): TRACE: network_info, block_device_info)
(nova.compute.manager): TRACE: File
"/opt/stack/nova/nova/exception.py", line 129, in wrapped
(nova.compute.manager): TRACE: raise Error(str(e))
(nova.compute.manager): TRACE: Error: Unexpected error while running
command.
(nova.compute.manager): TRACE: Command: sudo ip tuntap add
tapaba5418e-3e mode tap
(nova.compute.manager): TRACE: Exit code: 255
(nova.compute.manager): TRACE: Stdout: ''
(nova.compute.manager): TRACE: Stderr: 'Object "tuntap" is unknown, try
"ip help".\n'
(nova.compute.manager): TRACE:

dan wendlandt (danwent) on 2011-10-28
Changed in nova:
assignee: nobody → dan wendlandt (danwent)
Brad Hall (bgh) wrote :

The issue is that scientific linux has an older "ip" command which doesn't support tuntap. As a workaround it is possible to use tunctl to create the tap device.

Changed in nova:
assignee: dan wendlandt (danwent) → Brad Hall (bgh)
status: New → Confirmed
Brad Hall (bgh) on 2011-10-31
Changed in nova:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/1247
Committed: http://github.com/openstack/nova/commit/e4c74596bfaf1cee1a6f8cbb0d97aa067d9a4317
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit e4c74596bfaf1cee1a6f8cbb0d97aa067d9a4317
Author: Brad Hall <email address hidden>
Date: Thu Oct 27 17:45:23 2011 -0700

    Fix for launchpad bug #882568

    Use tunctl to create the tap device if we are on a system where the ip command
    is too old (and doesn't have support for tuntap).

    Change-Id: I9e22010e4c7dd2671267de6d0e7a7bc9ae76a854

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-11-09
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx) on 2011-11-17
Changed in nova:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/1675
Committed: http://github.com/openstack/nova/commit/95b56105b2fc66de2c1cbaad773955a65ed30fa0
Submitter: Jenkins
Branch: stable/diablo

 tag in-stable-diablo
 done

commit 95b56105b2fc66de2c1cbaad773955a65ed30fa0
Author: Brad Hall <email address hidden>
Date: Thu Oct 27 17:45:23 2011 -0700

    Fix for launchpad bug #882568

    Use tunctl to create the tap device if we are on a system where the ip command
    is too old (and doesn't have support for tuntap).

    (cherry picked from commit e4c74596bfaf1cee1a6f8cbb0d97aa067d9a4317)

    Change-Id: I9e22010e4c7dd2671267de6d0e7a7bc9ae76a854

qirui (amy-qi) wrote :

modify /nova/virt/libvirt/vif.py

    try:
       utils.execute('ip', 'tuntap', 'add', dev, 'mode', 'tap',
                      run_as_root=True)
    except exception.ProcessExecutionError:
       utils.execute('tunctl', '-b', '-t', dev, run_as_root=True)
    utils.execute('ip', 'link', 'set', dev, 'up', run_as_root=True)
 utils.execute('ovs-vsctl', '--', '--may-exist', 'add-port',
                FLAGS.libvirt_ovs_bridge, dev,

Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers