← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1597669] Re: [libvirt] disk.config.rescue is not used when rescuing an instance

 

Reviewed:  https://review.openstack.org/335884
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8795b206247fe2ca57f32c437d72c51492637649
Submitter: Jenkins
Branch:    master

commit 8795b206247fe2ca57f32c437d72c51492637649
Author: Lee Yarwood <lyarwood@xxxxxxxxxx>
Date:   Thu Jun 30 10:22:28 2016 +0100

    libvirt: Use the recreated disk.config.rescue during a rescue
    
    I931421ea introduced a callback to _create_configdrive from
    _create_domain during a rescue that recreates the config disk of an
    instance with an additional .rescue suffix. However due to a latent bug
    neither the original or this recreated config disk are mapped to the
    instance during the resulting rescue.
    
    To correct this disk.config.rescue is now added to the disk_mapping for
    the instance if a config disk is required during a rescue.
    
    Closes-bug: #1597669
    Change-Id: I46cebd0612f50ff7373f677c4a002d444a877972


** Changed in: nova
       Status: In Progress => 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/1597669

Title:
  [libvirt] disk.config.rescue is not used when rescuing an instance

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========

  I931421ea688641e2ceb212c6dc099639c53433f2 introduced a callback to
  _create_configdrive from _create_domain that recreates the config disk
  of an instance during a rescue.

  However neither the original or this recreated config disk are used by
  the instance during the resulting rescue.

  Steps to reproduce
  ==================

  $ nova boot --image cirros-0.3.4-x86_64-uec --flavor 1 test-config-rescue
  [..]
  $ nova rescue test-config-rescue
  [..]
  $ nova list
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  | ID                                   | Name               | Status | Task State | Power State | Networks         |
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  | 5ef76bd4-4e4f-46dd-88f6-dcd212e54802 | test-config-rescue | RESCUE | -          | Running     | private=10.0.0.2 |
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  $ ll ../data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/
  total 28556
  -rw-------. 1 qemu  qemu        16939 Jun 30 04:39 console.log
  -rw-r--r--. 1 qemu  qemu     10682368 Jun 30 04:39 disk
  -rw-rw-r--. 1 qemu  qemu       432128 Jun 30 04:38 disk.config
  -rw-rw-r--. 1 stack libvirtd   432128 Jun 30 04:39 disk.config.rescue
  -rw-r--r--. 1 stack libvirtd      534 Jun 30 04:39 disk.info
  -rw-r--r--. 1 qemu  qemu       197120 Jun 30 04:39 disk.rescue
  -rw-rw-r--. 1 qemu  qemu      4979632 Jun 30 04:38 kernel
  -rw-rw-r--. 1 qemu  qemu      4979632 Jun 30 04:39 kernel.rescue
  -rw-rw-r--. 1 stack libvirtd     3146 Jun 30 04:39 libvirt.xml
  -rw-rw-r--. 1 qemu  qemu      3740163 Jun 30 04:38 ramdisk
  -rw-rw-r--. 1 qemu  qemu      3740163 Jun 30 04:39 ramdisk.rescue
  -rw-rw-r--. 1 stack libvirtd     4569 Jun 30 04:39 unrescue.xml
  $ grep config ../data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/libvirt.xml 
        <nova:name>test-config-rescue</nova:name>
  $ sudo virsh domblklist 5ef76bd4-4e4f-46dd-88f6-dcd212e54802
  Target     Source
  ------------------------------------------------
  vda        /opt/stack/data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/disk.rescue
  vdb        /opt/stack/data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/disk

  
  $ nova unrescue test-config-rescue
  $ nova list
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  | ID                                   | Name               | Status | Task State | Power State | Networks         |
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  | 5ef76bd4-4e4f-46dd-88f6-dcd212e54802 | test-config-rescue | ACTIVE | -          | Running     | private=10.0.0.2 |
  +--------------------------------------+--------------------+--------+------------+-------------+------------------+
  $ ll ../data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/
  total 19604
  -rw-------. 1 qemu  qemu        20403 Jun 30 04:48 console.log
  -rw-r--r--. 1 qemu  qemu     10878976 Jun 30 04:47 disk
  -rw-rw-r--. 1 qemu  qemu       432128 Jun 30 04:38 disk.config
  -rw-r--r--. 1 stack libvirtd      534 Jun 30 04:39 disk.info
  -rw-rw-r--. 1 qemu  qemu      4979632 Jun 30 04:38 kernel
  -rw-rw-r--. 1 stack libvirtd     4569 Jun 30 04:47 libvirt.xml
  -rw-rw-r--. 1 qemu  qemu      3740163 Jun 30 04:38 ramdisk
  $ grep config ../data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/libvirt.xml 
        <nova:name>test-config-rescue</nova:name>
        <source file='/opt/stack/data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/disk.config'/>
  $ sudo virsh domblklist 5ef76bd4-4e4f-46dd-88f6-dcd212e54802
  Target     Source
  ------------------------------------------------
  vda        /opt/stack/data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/disk
  hdd        /opt/stack/data/nova/instances/5ef76bd4-4e4f-46dd-88f6-dcd212e54802/disk.config

  
  Expected result
  ===============
  disk.config.rescue attached to the rescued instance.

  Actual result
  =============
  No config disks are attached to the rescued instance. Only the rescue disk and original root disk are attached.

  Environment
  ===========
  1. Exact version of OpenStack you are running. See the following
     list for all releases: http://docs.openstack.org/releases/

     $ pwd
     /opt/stack/nova
     $ git rev-parse HEAD
     23153952a979c93a414705744b0f8ba4bde18f75

  2. Which hypervisor did you use?
     libvirt + kvm

  2. Which storage type did you use?
     (For example: Ceph, LVM, GPFS, ...)
     What's the version of that?
     N/A

  3. Which networking type did you use?
     (For example: nova-network, Neutron with OpenVSwitch, ...)
     N/A

  Logs & Configs
  ==============

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


References