• P
    virsh: Check whether found volume is member of the specified storage pool · 6ef0b034
    Peter Krempa 提交于
    When looking up storage volumes virsh uses multiple lookup steps. Some
    of the steps don't require a pool name specified. This resulted into a
    possibility that a volume would be part of a different pool than the
    user specified:
    
    Let's have a /var/lib/libvirt/images/test.qcow image in the 'default'
    pool and a second pool 'emptypool':
    
    Currently we'd return:
      $ virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow
      Name:           test.qcow
      Type:           file
      Capacity:       100.00 MiB
      Allocation:     212.00 KiB
    
    After the fix:
     $ tools/virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow
     error: Requested volume '/var/lib/libvirt/images/test.qcow' is not in pool 'emptypool'
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1088667
    6ef0b034
virsh-volume.c 49.6 KB