Bug 1261531 - Extend of VG does not check if additional devices are already part of it
Extend of VG does not check if additional devices are already part of it
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
3.5.3
Unspecified Unspecified
high Severity high
: ovirt-3.6.0-rc3
: 3.6.0
Assigned To: Fred Rolland
Elad
: ZStream
Depends On: 1258632
Blocks: 1265907
  Show dependency treegraph
 
Reported: 2015-09-09 10:25 EDT by Fred Rolland
Modified: 2016-03-09 14:45 EST (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1258632
: 1265907 (view as bug list)
Environment:
Last Closed: 2016-03-09 14:45:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45946 master MERGED lvm: Check if device in VG before extend Never
oVirt gerrit 46199 ovirt-3.6 MERGED lvm: Check if device in VG before extend Never

  None (edit)
Comment 9 Nir Soffer 2015-11-02 11:20:26 EST
Elad, you can test his like this:
- Use vdsClient to create a vg with a new pv
- Repeat the same request, it should fail with a message about the
  pv being a member of this vg.
Comment 10 Elad 2015-11-03 02:13:48 EST
Thanks Nir, based on these steps, an attempt to create a VG out of a PV right after a successful VG creation of this device fails.

[root@green-vdsb ~]# vdsClient -s 0 createVG 472a6f81-1665-4a8a-b3b4-8f100f491d25 360060160f4a0300024e704bdf781e511
ikRbn9-L7yg-n0uZ-LjCz-fMKU-N6NA-2owhyN
[root@green-vdsb ~]# vdsClient -s 0 createVG 472a6f81-1665-4a8a-b3b4-8f100f491d25 360060160f4a0300024e704bdf781e511
Failed to initialize physical device: ("['/dev/mapper/360060160f4a0300024e704bdf781e511']",)


Used vdsm-4.17.10-5.el7ev.noarch
Comment 11 Fred Rolland 2015-11-03 02:58:51 EST
Elad, the fix is on extend VG not create VG.
Can you please try to extend a VG twice with the same device ?
Comment 12 Elad 2015-11-03 04:28:25 EST
(In reply to Fred Rolland from comment #11)
> Elad, the fix is on extend VG not create VG.
> Can you please try to extend a VG twice with the same device ?

Extend storage domain out of the same pv twice is not allowed:


[root@green-vdsb 00000001-0001-0001-0001-000000000004]# vdsClient -s 0 extendStorageDomain 992fa11e-d046-4911-a898-13a5db4f0457 00000001-0001-0001-0001-000000000004 360060160f4a0300056c5b11d0782e511

[root@green-vdsb 00000001-0001-0001-0001-000000000004]# vdsClient -s 0 extendStorageDomain 992fa11e-d046-4911-a898-13a5db4f0457 00000001-0001-0001-0001-000000000004 360060160f4a0300056c5b11d0782e511
Cannot extend Volume Group: "vgname=992fa11e-d046-4911-a898-13a5db4f0457, devname=['/dev/mapper/360060160f4a0300056c5b11d0782e511']"
Comment 13 Nir Soffer 2015-11-03 04:35:12 EST
Elad, can you add the error in vdsm log? The vdsClient error is too generic, but vdsm log should explain why the operation failed.
Comment 14 Elad 2015-11-03 05:24:51 EST
Thread-127::ERROR::2015-11-03 09:25:48,258::task::866::Storage.TaskManager.Task::(_setError) Task=`b1bf8280-175c-46aa-beeb-d5aeddf9d8bf`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 873, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 49, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 731, in extendStorageDomain
    pool.extendSD(sdUUID, dmDevs, force)
  File "/usr/share/vdsm/storage/securable.py", line 77, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1962, in extendSD
    sdCache.produce(sdUUID).extend(devlist, force)
  File "/usr/share/vdsm/storage/blockSD.py", line 740, in extend
    lvm.extendVG(self.sdUUID, devlist, force)
  File "/usr/share/vdsm/storage/lvm.py", line 991, in extendVG
    raise se.VolumeGroupExtendError(vgName, pvs)
VolumeGroupExtendError: Cannot extend Volume Group: "vgname=992fa11e-d046-4911-a898-13a5db4f0457, devname=['/dev/mapper/360060160f4a0300056c5b11d0782e511']"
Comment 16 errata-xmlrpc 2016-03-09 14:45:15 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0362.html

Note You need to log in before you can comment on or make changes to this bug.