← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 678395] Re: More graceful error needed when using flat mode and --flat_injected with incompatible guests

 

*** This bug is a duplicate of bug 666554 ***
    https://bugs.launchpad.net/bugs/666554

I think this bug should be considered fixed, we no longer have a weird
error message on non-supported images. That won't make non Debian/Ubuntu
/whatever-supports-etc-network-interfaces magically work.

Not a big fan of throwing ImageUnacceptable exception if lsb_release is
not Debian/Ubuntu: that could break images that support /e/n/i but
overrided lsb_release.

Therefore I think this should be closed as a duplicate of 666554.

** This bug has been marked a duplicate of bug 666554
   _inject_net_info_fs in compute/disk.py fails if /etc/network doesn't exist

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/678395

Title:
  More graceful error needed when using flat mode and --flat_injected
  with incompatible guests

Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/678395/+subscriptions