← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1131913] Re: boot from volume - invalid flow in libvirt driver

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
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/1131913

Title:
  boot from volume - invalid flow in libvirt driver

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  (Testing grizzly trunk from ubuntu)

  I had different bugs when booting from volume:

  libvirt could not pre-create chardev file
  libvirt could not find disk.config (when using a config drive)
  libvirt could not create the console.log file

  (these cases result in complete failure to spawn the VM, libvirt
  aborts)

  this is was in various scenarios (config drive, no config drive,
  etc..) but always when booting from volume (not providing any image),
  all three problems got solved when I decided to ALWAYS call
  self._create_image at the beginning of the spawn() function of the
  libvirt driver:

  /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py:

      def spawn(self, context, instance, image_meta, injected_files,
                admin_password, network_info=None, block_device_info=None):

          # couple of lines removed...

          if image_meta:
              self._create_image(context, instance, xml,
                                 disk_info['mapping'],
                                 network_info=network_info,
                                 block_device_info=block_device_info,
                                 files=injected_files,
                                 admin_pass=admin_password)

  if remove the check for image_meta, _create_image will always be
  called, this seems to enable the boot from volume functionality since
  the /var/lib/nova/instances/instance-xxxxxxxx will be correctly
  populated enabling libvirt to spawn the instance.

  I think since we're now able to boot from volume without specifying
  any kind of image, we cannot simply check for image_meta and decide
  wether or not to call create_image, we still need to create the
  instance directory and prepare files before calling libvirt to
  instanciate.

  I can say that all my different BFV scenarios work when I call
  _create_image no matter what.

  Could someone with a better understanding of the libvirt driver have a
  look and maybe rethink this check for image_meta?

  thank you guys

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