_cleanup_failed_start aggressively removes local instance files when handling plug_vif failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Lee Yarwood | ||
Newton |
Fix Released
|
High
|
Lee Yarwood |
Bug Description
Description
===========
Iab5afdf1b5b8d1
As such any failures when resuming or restarting an instance will lead to these files being removed and the instance left in an unbootable state. IMHO these files should only be removed when cleaning up after errors hit while initially spawning an instance.
Steps to reproduce
==================
- Boot an instance using local disks
- Stop the instance
- Start the instance, causing a timeout or other failure during plug_vifs
- Attempt to start the instance again
Expected result
===============
The local instance files are left on the host if instances are rebooting or resuming.
Actual result
=============
The local instance files are removed from the host if _cleanup_
Environment
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://
$ pwd
/opt/stack/nova
$ git rev-parse HEAD
42222969a21e
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
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
==============
$ nova boot --image cirros-
[..]
$ nova stop test-boot
$ ll ../data/
total 18596
-rw-rw-r--. 1 root root 16699 Jan 31 09:30 console.log
-rw-r--r--. 1 root root 10289152 Jan 31 09:30 disk
-rw-r--r--. 1 stack libvirtd 257 Jan 31 09:29 disk.info
-rw-rw-r--. 1 qemu qemu 4979632 Jan 31 09:29 kernel
-rw-rw-r--. 1 qemu qemu 3740163 Jan 31 09:29 ramdisk
I used the following change to artificially recreate an issue plugging the VIFs :
$ git diff
diff --git a/nova/
index 33e3157..248e960 100644
--- a/nova/
+++ b/nova/
@@ -5015,6 +5015,7 @@ class LibvirtDriver(
pause = bool(events)
guest = None
try:
+ raise exception.
with self.virtapi.
$ nova start test-boot
Request to start server test-boot has been accepted.
$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| be6cb386-
+------
$ ll ../data/
ls: cannot access '../data/
Future attempts to start the instance will fail as a result :
$ nova start test-boot
Request to start server test-boot has been accepted.
$ vi ../logs/n-cpu.log
[..]
5353 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5354 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5355 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5356 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5357 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5358 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5359 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5360 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5361 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5362 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5363 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5364 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5365 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5366 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5367 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5368 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5369 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5370 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5371 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5372 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5373 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5374 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5375 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5376 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5377 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5378 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5379 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5380 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5381 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5382 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5383 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5384 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5385 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5386 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5387 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5388 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5389 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5390 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5391 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5392 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5393 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5394 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5395 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5396 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5397 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5398 2017-01-31 09:35:59.117 TRACE oslo_messaging.
5399 2017-01-31 09:35:59.117 TRACE oslo_messaging.
tags: | added: ocata-rc-potential |
Changed in nova: | |
importance: | Undecided → High |
tags: |
added: libvirt removed: ocata-rc-potential |
Fix proposed to branch: master /review. openstack. org/427267
Review: https:/