Exceptions during soft reboot should result in a hard reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Matt Riedemann | ||
Grizzly |
Fix Released
|
Undecided
|
Lingxian Kong |
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-
$ nova list
$ nova list
+-----
| ID | Name | Status | Task State | Power State | Networks |
+-----
| 2b9451fe-
+-----
Find and remove the base image backing file
$ cd /opt/stack/
$ file 2b9451fe-
2b9451fe-
(Note file name may be truncated)
$ rm /opt/stack/
Reboot the instance
$ nova reboot 2b9451fe-
$ nova list
+-----
| ID | Name | Status | Task State | Power State | Networks |
+-----
| 2b9451fe-
+-----
$ nova list
+-----
| ID | Name | Status | Task State | Power State | Networks |
+-----
| 2b9451fe-
+-----
Hard reboot the instance
$ nova reboot --hard 2b9451fe-
$ nova list
+-----
| ID | Name | Status | Task State | Power State | Networks |
+-----
| 2b9451fe-
+-----
tags: | added: libvirt |
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
Changed in nova: | |
milestone: | none → havana-3 |
status: | Fix Committed → Fix Released |
tags: | added: grizzly-backport-potential |
Changed in nova: | |
milestone: | havana-3 → 2013.2 |
tags: | removed: grizzly-backport-potential |
Fix proposed to branch: master /review. openstack. org/38085
Review: https:/