Live Migration (block_migrate): "Disk of instance is too large", with cinder LVM based volume

Bug #1428542 reported by Tom Patzig
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Medium
Unassigned

Bug Description

When live migrating (block_migrate), an instance, cinder volumes based on LVM, that are attached via iscsi to the compute node, are included within the MigrationPreCheck disk-size calculation.
Because the cinder iscsi volume is just attached to the migration target node, these devices need to be skipped.

In the past only devices with type 'file' got included in that disk_size calculation; But with commit 5fa74bc0b2ab6fe5149a9b684b4beadb67877622 (Adds ephemeral storage encryption for LVM back-end images ), disks with type 'block' got included as well, which also includes iscsi devices.

I experienced that with stable juno.

I worked around that with this additional check:

diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 0809f09..566b2b2 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -6000,6 +6000,10 @@ class LibvirtDriver(driver.ComputeDriver):
                           'volume', {'path': path, 'target': target})
                 continue

+ if disk_type == 'block' and path.find('iqn.2010-10.org.openstack') > 0:
+ LOG.debug('skipping disk because it looks like an iscsi volume', path)
+ continue
+
             # get the real disk size or
             # raise a localized error if image is unavailable
             if disk_type == 'file':

If this is the right place to exclude that disks, I can submit that little patch for review. Or you can point me to the right location for that and I'll give it a try.

What do you think?

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Indeed it looks like you are correct in asserting that https://review.openstack.org/40467 caused this regression, because it erroneously assumes that block devices would always be LVM backed only. Not sure about the fix though, maybe there are other volume types affected too?

Changed in nova:
status: New → Confirmed
Changed in nova:
assignee: nobody → Timofey Durakov (tdurakov)
status: Confirmed → In Progress
tags: added: live-migrate
Revision history for this message
Zhenzan Zhou (zhenzan-zhou) wrote :

@tdurakov, are you still working on this bug? If no, I'd like to take it, thanks a lot.

Changed in nova:
assignee: Timofey Durakov (tdurakov) → nobody
status: In Progress → Confirmed
importance: Undecided → Medium
Paul Murray (pmurray)
tags: added: live-migration
removed: live-migrate
lvmxh (shaohef)
Changed in nova:
assignee: nobody → lvmxh (shaohef)
lvmxh (shaohef)
Changed in nova:
assignee: lvmxh (shaohef) → nobody
Revision history for this message
Eli Qiao (taget-9) wrote :

@Tom Patzig

It looks like Change-Id: Ifb20655c32896b640672917e3840add81b136780 (libvirt: make _get_instance_disk_info conservative) will fix this issue.

- elif disk_type == 'block':
+ elif disk_type == 'block' and block_device_info:
                 dk_size = lvm.get_volume_size(path)
+ else:
+ LOG.debug('skipping disk %(path)s (%(target)s) - unable to '
+ 'determine if volume',
+ {'path': path, 'target': target})
+ continue

I will mark this as incompeleted before you confirm you can reproduce this bug with the commit I pasted.

Eli.

Changed in nova:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.