← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1202974] Re: Exceptions during soft reboot should result in a hard reboot

 

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

** Changed in: nova
    Milestone: None => havana-3

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

Title:
  Exceptions during soft reboot should result in a hard reboot

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  The current code for soft_reboot in libvirt will only fall back to a
  hard reboot if the soft reboot returns a value of False.  However
  there are some cases where an exception in  soft reboot can be cleared
  by a hard reboot - for example if the image file is missing soft
  reboot will raise an exception, whereas a hard reboot (because it
  rebuilds the domain) will re-collect the image from Glance.

  The code in libvirt/reboot should wrap the soft reboot attempt in a
  try block, and attempt a hard reboot is the soft reboot raises an
  libvirtError exception.

  
  Steps to reproduce in Devstack:

  Create an instance
   $ nova boot --image aebde4c5-10d3-4d76-90ab-28be2c891047 --flavor 1 phil 
   $ nova list 
   $ nova list
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | ID                                   | Name | Status | Task State | Power State | Networks         |
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | 2b9451fe-3d23-4e4a-b12c-9633f0467156 | phil | ACTIVE | None       | Running     | private=10.0.0.3 |
   +--------------------------------------+------+--------+------------+-------------+------------------+

  Find and remove the base image backing file
    $ cd /opt/stack/data/nova/instances
    $ file 2b9451fe-3d23-4e4a-b12c-9633f0467156/disk
       2b9451fe-3d23-4e4a-b12c-9633f0467156/disk: QEMU QCOW Image (v2), has backing file (path 
          /opt/stack/data/nova/instances/_base/552f54f49b488dcb1c787bd87b), 1073741824 bytes
  (Note file name may be truncated)
     $ rm /opt/stack/data/nova/instances/_base/552f54f49b488dcb1c787bd87b2294272048874c 
   
  Reboot the instance
   $ nova reboot 2b9451fe-3d23-4e4a-b12c-9633f0467156
   $ nova list
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | ID                                   | Name | Status | Task State | Power State | Networks         | 
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | 2b9451fe-3d23-4e4a-b12c-9633f0467156 | phil | REBOOT | rebooting  | Running     | private=10.0.0.3 |
   +--------------------------------------+------+--------+------------+-------------+------------------+

   $ nova list
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | ID                                   | Name | Status | Task State | Power State | Networks         | 
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | 2b9451fe-3d23-4e4a-b12c-9633f0467156 | phil | ERROR  | None       | Running     | private=10.0.0.3 |
   +--------------------------------------+------+--------+------------+-------------+------------------+

  Hard reboot the instance
   $ nova reboot --hard 2b9451fe-3d23-4e4a-b12c-9633f0467156
   $ nova list
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | ID                                   | Name | Status | Task State | Power State | Networks         |
   +--------------------------------------+------+--------+------------+-------------+------------------+
   | 2b9451fe-3d23-4e4a-b12c-9633f0467156 | phil | ACTIVE | None       | Running     | private=10.0.0.3 | 
   +--------------------------------------+------+--------+------------+-------------+------------------+

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