mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +00:00
fix(instances): a disk on an LVM pool is not resized, the page says so instead of failing
libvirt's logical pool cannot change a volume's capacity, so every resize of such a disk ended in a 500. Disks are resized one at a time; VIR_ERR_NO_SUPPORT becomes a message naming the disk, and the other disks still grow. A live test creates an LVM pool from the storage page on a spare disk (TEST_LIBVIRT_LVM_DEVICE; the Vagrant computes get /dev/vdb), attaches new and existing volumes to stopped and running VMs as block disks, and checks the refused resize in every state.
This commit is contained in:
parent
a83b46d65d
commit
c46212bb38
5 changed files with 198 additions and 13 deletions
|
|
@ -1495,8 +1495,9 @@ class wvmInstance(wvmConnect):
|
|||
|
||||
def resize_disk(self, disks):
|
||||
"""Grow disks. QEMU holds the lock of a running domain's image files and
|
||||
grows them itself; block volumes (e.g. LVM) are grown by the storage
|
||||
pool first, then QEMU is told the new size."""
|
||||
grows them itself; other volumes are grown by the storage pool first,
|
||||
then QEMU is told the new size. A pool that cannot resize volumes (LVM
|
||||
for one) raises VIR_ERR_NO_SUPPORT before anything changes."""
|
||||
active = self.instance.isActive()
|
||||
for disk in disks:
|
||||
vol = self.get_volume_by_path(disk["path"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue