Nova-compute does not clean up Logical Volume on resize/migrate

Bug #1241866 reported by Tyler Wilson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Genin

Bug Description

Noticed this starting in RC1 of Havana (Replicated with release build of Havana), with

libvirt_images_type=lvm
libvirt_images_volume_group=hv1_vg
in nova.conf

I am having to manually remove old Logical Volumes after a resize or migrate has completed in the Horizon UI;

Before Resize
[root@hv1 ~]# lvscan
  ACTIVE '/dev/hv1_vg/volume-9714c3de-b255-46c3-bdf6-234b99309d17' [15.00 GiB] inherit
  ACTIVE '/dev/hv1_vg/instance-00000047_disk' [20.00 GiB] inherit

After Resize
[root@hv3 ~]# lvscan
  ACTIVE '/dev/hv3_vg/instance-00000047_disk' [80.00 GiB] inherit

47_disk still exists;
[root@hv1 ~]# lvscan
  ACTIVE '/dev/hv1_vg/volume-9714c3de-b255-46c3-bdf6-234b99309d17' [15.00 GiB] inherit
  ACTIVE '/dev/hv1_vg/instance-00000047_disk' [20.00 GiB] inherit

In addition, if an instance is migrated or re-sized to a Hypervisor with a previous old Logical Volume (with that same instance disk ID) it will simply re-use the existing volume and not upgrade/downgrade the size.

Debug logs of the instance going to HV: http://pastebin.mozilla.org/3287928 and From HV: http://pastebin.mozilla.org/3287949

Tags: compute lvm nova
Tyler Wilson (loth)
description: updated
Tyler Wilson (loth)
tags: added: compute lvm nova
description: updated
Tyler Wilson (loth)
description: updated
Changed in nova:
assignee: nobody → Jay Lau (jay-lau-513)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
lirenke (lvhancy) wrote :

What's the consequence about this bug?

Revision history for this message
Joe Gordon (jogo) wrote :

patch was abandoned, is this bug still valid. moving to new to be re-triaged.

Changed in nova:
status: In Progress → New
assignee: Jay Lau (jay-lau-513) → nobody
Revision history for this message
Dan Genin (daniel-genin) wrote :

This is essentially a duplicate of https://bugs.launchpad.net/nova/+bug/1270305. The issue is that libvirt does not have code for migrating/resizing logical volumes and does not know it (i.e., does not fail gracefully). I have submitted a fix to raise a not implemented exception https://review.openstack.org/#/c/73387/.

Changed in nova:
status: New → Confirmed
Dan Genin (daniel-genin)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Tracy Jones (tjones-i) wrote :

shouldn't this be a dup then? or at least assigned to you?

Changed in nova:
importance: Medium → Undecided
status: In Progress → New
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Dan Genin (daniel-genin)
Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/73387
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e24f333cd5d3667a15c36ac502304bfb5a0e21df
Submitter: Jenkins
Branch: master

commit e24f333cd5d3667a15c36ac502304bfb5a0e21df
Author: Daniel Genin <email address hidden>
Date: Mon Jul 28 17:12:40 2014 -0400

    Raises NotImplementedError for LVM migration.

    Currently migration of an LVM backed instance results in a new
    instance being launched on the destination node, but the instance
    disk is neither copied to the destination nor deleted on the
    origin node. The problem is addressed by raising a NotImplementedError.

    Closes-Bug: #1270305
    Closes-Bug: #1245595
    Closes-Bug: #1241866
    Change-Id: I8010230b1aa5ddc322d0c93dd916b7700c25ab81
    DocImpact

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
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.