libvirt: rescue for images with kernel missing cmdline config in xml

Bug #1086780 reported by MotoKen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Yaguang Tang

Bug Description

when rescue images with kernel, the rescued instances cannot boot successfully due to missing cmdline config in libvirt.xml.rescue

the libvirt.xml.rescue:
<domain type="kvm">
  <uuid>e6c7148a-9411-4a6b-92db-52bf334e14cd</uuid>
  <name>i-00001707</name>
  <memory>2097152</memory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <kernel>/var/lib/nova/instances/i-00001707/kernel.rescue</kernel>
    <initrd>/var/lib/nova/instances/i-00001707/ramdisk.rescue</initrd>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset="utc">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup"/>
  </clock>
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/i-00001707/disk.rescue"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/i-00001707/disk"/>
      <target bus="virtio" dev="vdb"/>
    </disk>
    <interface type="bridge">
      <mac address="fa:16:3e:f9:ca:3c"/>
      <model type="virtio"/>
      <source bridge="br2"/>
      <filterref filter="nova-instance-i-00001707-fa163ef9ca3c">
        <parameter name="IP" value="10.0.0.10"/>
        <parameter name="DHCPSERVER" value="10.0.0.1"/>
      </filterref>
    </interface>
    <serial type="file">
      <source path="/var/lib/nova/instances/i-00001707/console.log"/>
    </serial>
    <serial type="pty"/>
    <input type="tablet" bus="usb"/>
    <graphics type="vnc" autoport="yes" keymap="en-us" listen="0.0.0.0"/>
  </devices>
</domain>

the libvirt.xml:
<domain type="kvm">
  <uuid>e6c7148a-9411-4a6b-92db-52bf334e14cd</uuid>
  <name>i-00001707</name>
  <memory>2097152</memory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <kernel>/var/lib/nova/instances/i-00001707/kernel</kernel>
    <initrd>/var/lib/nova/instances/i-00001707/ramdisk</initrd>
    <cmdline>root=/dev/vda console=ttyS0</cmdline>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset="utc">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup"/>
  </clock>
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/i-00001707/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/i-00001707/disk.local"/>
      <target bus="virtio" dev="vdb"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/i-00001707/disk.swap"/>
      <target bus="virtio" dev="vdc"/>
    </disk>
    <interface type="bridge">
      <mac address="fa:16:3e:f9:ca:3c"/>
      <model type="virtio"/>
      <source bridge="br2"/>
      <filterref filter="nova-instance-i-00001707-fa163ef9ca3c">
        <parameter name="IP" value="10.0.0.10"/>
        <parameter name="DHCPSERVER" value="10.0.0.1"/>
      </filterref>
    </interface>
    <serial type="file">
      <source path="/var/lib/nova/instances/i-00001707/console.log"/>
    </serial>
    <serial type="pty"/>
    <input type="tablet" bus="usb"/>
    <graphics type="vnc" autoport="yes" keymap="en-us" listen="0.0.0.0"/>
  </devices>
</domain>

Yaguang Tang (heut2008)
Changed in nova:
status: New → Confirmed
assignee: nobody → Yaguang Tang (heut2008)
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Looks like this is already being worked on https://review.openstack.org/#/c/17547/

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/17547
Committed: http://github.com/openstack/nova/commit/3b8e122f7ddaa1382036f1f4d0c1f833f8d7deaa
Submitter: Jenkins
Branch: master

commit 3b8e122f7ddaa1382036f1f4d0c1f833f8d7deaa
Author: Yaguang Tang <email address hidden>
Date: Thu Dec 6 00:31:27 2012 +0800

    fix instance rescue without cmdline params in xml.rescue.

    fix bug #1086780

    Change-Id: I3495693b35dbde9c9da3d78208854b8ebc3f2a04

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.