devtest cleanup-env doesn't remove seed libvirt image file

Bug #1298466 reported by Loganathan Parthipan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Low
Stephane Miller

Bug Description

In devtest

scripts/cleanup-env cleans up virtual machines in the following sequence:

virsh destroy
virsh undefine --managed-save --remove-all-storage

However, this wouldn't work for seed storage which is not created off a volume pool. So after a virsh destroy it becomes owned by root:root instead of libvirt-qemu:kvm

virsh undefine --managed-save --remove-all-storage seed
Storage volume 'sda'(/var/lib/libvirt/images/seed.qcow2) is not managed by libvirt. Remove it manually.
Domain seed has been undefined

/var/lib/libvirt/images$ sudo ls -l
total 3186636
-rw-r--r-- 1 root root 3263234048 Mar 27 15:18 seed.qcow2

Thus the seed.qcow2 image is not deleted.

Changed in tripleo:
status: New → Confirmed
summary: - devtest cleanup-env doesn't remove seed image
+ devtest cleanup-env doesn't remove seed libvirt image file
Changed in tripleo:
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/128481

Changed in tripleo:
assignee: nobody → Stephane Miller (stephaneeee)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-incubator (master)

Reviewed: https://review.openstack.org/128481
Committed: https://git.openstack.org/cgit/openstack/tripleo-incubator/commit/?id=9ab830529b8c704473bd44de884604cb2da1cbce
Submitter: Jenkins
Branch: master

commit 9ab830529b8c704473bd44de884604cb2da1cbce
Author: stephane <email address hidden>
Date: Tue Oct 14 16:32:07 2014 -0700

    Clean up seed image file

    Since libvirt doesn't manage the seed's storage volume, it doesn't
    currently get deleted when cleanup-env is run. This change handles the
    destroy and volume cleanup differently for the seed such that the volume
    gets removed.

    Changes have also been added in the destroy and remove process to avoid
    producing noisy error messages, by only destroying domains that are
    currently running, as well as only attempting to remove storage for
    non-seed domains.

    Change-Id: I65b8f5dde936efa11c0b6857a5b8b138da7f425b
    Closes-Bug: 1298466

Changed in tripleo:
status: In Progress → Fix Released
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.