Interrupted snapshot is not trigger during nova-compute restart service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Pierre Libeau |
Bug Description
Description
===========
The init of nova-compute service reset the state of the instance in snapshotting but no action was taken to stop the job in progress and to clean the snapshot directory.
Adding an abort on libvirt job during the init and deleting the data generated in the snapshot directory helping to not have data leak on the compute node.
Steps to reproduce
==================
* on devstack
* add conf "snapshots_
* create an instance with local storage and some data
$ cat gen-data.sh
#!/bin/bash
head -c 10G </dev/urandom >bigfile
$ openstack server create --flavor m1.small --image 3f4b3e2c-
* create a snapshot of the instance
$ openstack server image create --name snap1 6bfd51f6-
* restart nova-compute on the host during the snapshot
$ sudo systemctl restart <email address hidden>
* instance go to ACTIVE
* job not abort and folder not clean
$ virsh blockjob --info 6bfd51f6-
Block Copy: [ 91 %]
$ ls -al /opt/stack/
total 12
drwxrwxr-x 3 stack stack 4096 Feb 8 07:47 .
drwxrwxr-x 3 stack stack 4096 Feb 8 07:45 ..
drwx-----x 2 stack libvirt 4096 Feb 8 07:47 tmp59vspxay
$ls -al /opt/stack/
total 10511512
drwx-----x 2 stack libvirt 4096 Feb 8 07:47 .
drwxrwxr-x 3 stack stack 4096 Feb 8 07:47 ..
-rw-r--r-- 1 libvirt-qemu kvm 10763829248 Feb 8 07:47 805be505a09b46b
Expected result
===============
* No blokjob running in libvirt
* No disk instance in the snapshot directory
Actual result
=============
* blokjob running in libvirt
* disk instance in the snapshot directory
Environment
===========
OpenStack master
Libvirt + KVM
Local storage
Changed in nova: | |
assignee: | nobody → Pierre Libeau (pierre-libeau) |
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /873062
Review: https:/