← Back to team overview

registry team mailing list archive

[Bug 678395] [NEW] Command "sudo tee /var/lib/nova/tmp/tmpuaJWRG/etc/network/interfaces" failed when starting an instance

 

Public bug reported:

When I start an instance, the following error happened.

2010-11-21 21:31:51-0800 [-] (root): ERROR instance instance-2147483647: Failed to spawn
2010-11-21 21:31:51-0800 [-] Traceback (most recent call last):
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 135, in run_instance
2010-11-21 21:31:51-0800 [-]     yield self.driver.spawn(instance_ref)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
2010-11-21 21:31:51-0800 [-]     result = result.throwExceptionIntoGenerator(g)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
2010-11-21 21:31:51-0800 [-]     return g.throw(self.type, self.value, self.tb)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py", line 329, in spawn
2010-11-21 21:31:51-0800 [-]     yield self._create_image(instance, xml)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
2010-11-21 21:31:51-0800 [-]     result = result.throwExceptionIntoGenerator(g)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
2010-11-21 21:31:51-0800 [-]     return g.throw(self.type, self.value, self.tb)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py", line 466, in _create_image
2010-11-21 21:31:51-0800 [-]     execute=execute)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 893, in _inlineCallbacks
2010-11-21 21:31:51-0800 [-]     result = g.send(result)
2010-11-21 21:31:51-0800 [-]   File "/usr/lib/pymodules/python2.6/nova/compute/disk.py", line 147, in inject_data
2010-11-21 21:31:51-0800 [-]     yield _inject_net_into_fs(net, tmpdir, execute=execute)
2010-11-21 21:31:51-0800 [-] ProcessExecutionError: Unexpected error while running command.
2010-11-21 21:31:51-0800 [-] Command: sudo tee /var/lib/nova/tmp/tmpuaJWRG/etc/network/interfaces
2010-11-21 21:31:51-0800 [-] Exit code: 1
2010-11-21 21:31:51-0800 [-] Stdout: '# This file describes the network interfaces available on your system\n# and how to activate them. For more information, see inter
faces(5).\n\n# The loopback network interface\nauto lo\niface lo inet loopback\n\n# The primary network interface\nauto eth0\niface eth0 inet static\n        address 10
.0.0.2\n        netmask 255.255.255.240\n        broadcast 10.0.0.15\n        gateway 10.0.0.1\n        dns-nameservers 8.8.4.4\n\n\n'
2010-11-21 21:31:51-0800 [-] Stderr: 'tee: /var/lib/nova/tmp/tmpuaJWRG/etc/network/interfaces: No such file or directory\n'

After I saw the source, there may be something wrong with the source
"/usr/lib/pymodules/python2.6/nova/compute/disk.py" . In method
_inject_net_into_fs(),  the source is as following.

def _inject_net_into_fs(net, fs, execute=None):
    netfile = os.path.join(os.path.join(os.path.join(
            fs, 'etc'), 'network'), 'interfaces')
    yield execute('sudo tee %s' % netfile, net)

Before tee command is executed, the folder was not created. So the error
message "No such file or directory" was thrown. Therefore, it will be
needed to create folder before tee.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
Command "sudo tee /var/lib/nova/tmp/tmpuaJWRG/etc/network/interfaces" failed when starting an instance
https://bugs.launchpad.net/bugs/678395
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.



Follow ups

References