Bug 1547622

Summary: [gdeploy ] The PV and VG name should be same as VDO volume in gdeploy conf file
Product: [oVirt] cockpit-ovirt Reporter: bipin <bshetty>
Component: GdeployAssignee: Gobinda Das <godas>
Status: CLOSED CURRENTRELEASE QA Contact: bipin <bshetty>
Severity: high Docs Contact:
Priority: high    
Version: 0.11.7CC: bugs, lveyde, rhs-bugs, sabose, sasundar
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2?
sasundar: planning_ack?
rule-engine: devel_ack+
sasundar: testing_ack+
Target Release: 0.11.17   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.11.17-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1547619 Environment:
Last Closed: 2018-04-18 12:26:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1547619    

Description bipin 2018-02-21 16:09:15 UTC
+++ This bug was initially created as a clone of Bug #1547619 +++

Description of problem:
In the cockpit UI, the gdeploy conf should have a uniform volume name. Currently the VDO,PV and VG makes use of same devices. Since the VDO volume is mounted in the first and when the PV makes use of same device it fails telling the device has already been mounted.


Version-Release number of selected component (if applicable):
cockpit-ovirt-dashboard-0.11.11-0.1.el7ev.noarch
kmod-kvdo-6.1.0.146-13.el7.x86_64
vdo-6.1.0.146-16.x86_64
gdeploy-2.0.2-22.el7rhgs.noarch


How reproducible:
Everytime

Steps to Reproduce:
1. Go to the Cockpit UI
2. Select the gluster deployment and go to the end(preview)
3. In the gdeploy conf file the vdo and pv section make use of same device 

Actual results:
The PV volume creation fails since the device has already been mounted

Expected results:
The volume creation shouldn't fail 

Additional info:

Snippet from the gdeploy conf file:

PLAY [gluster_servers] *********************************************************

TASK [Create VDO with specified size] ******************************************
changed: [10.70.36.243] => (item={u'disk': u'/dev/sdb', u'logicalsize': u'200000', u'name': u'engine'})
changed: [10.70.36.241] => (item={u'disk': u'/dev/sdb', u'logicalsize': u'200000', u'name': u'engine'})
changed: [10.70.36.242] => (item={u'disk': u'/dev/sdb', u'logicalsize': u'200000', u'name': u'engine'})

<..>
<..>

PLAY [gluster_servers] *********************************************************

TASK [Clean up filesystem signature] *******************************************
skipping: [10.70.36.241] => (item=/dev/sdb) 
skipping: [10.70.36.242] => (item=/dev/sdb) 
skipping: [10.70.36.243] => (item=/dev/sdb) 

TASK [Create Physical Volume] **************************************************
failed: [10.70.36.241] (item=/dev/sdb) => {"changed": false, "failed_when_result": true, "item": "/dev/sdb", "msg": "  Can't open /dev/sdb exclusively.  Mounted filesystem?\n", "rc": 5}
failed: [10.70.36.243] (item=/dev/sdb) => {"changed": false, "failed_when_result": true, "item": "/dev/sdb", "msg": "  Can't open /dev/sdb exclusively.  Mounted filesystem?\n", "rc": 5}
failed: [10.70.36.242] (item=/dev/sdb) => {"changed": false, "failed_when_result": true, "item": "/dev/sdb", "msg": "  Can't open /dev/sdb exclusively.  Mounted filesystem?\n", "rc": 5}
	to retry, use: --limit @/tmp/tmp9hqOHr/pvcreate.retry

--- Additional comment from Red Hat Bugzilla Rules Engine on 2018-02-21 11:04:43 EST ---

This bug is automatically being proposed for the current release of Red Hat Hyperconverged Infrastructure (RHHI) under active development, by setting the release flag 'rhhi‑2.0' to '?'. 

If this bug should be proposed for a different release, please manually change the proposed release flag.

Comment 1 SATHEESARAN 2018-02-21 17:06:00 UTC
In this case, PV and VG components should make use of VDO volume's name and not the device name directly.

Comment 2 bipin 2018-04-17 14:52:39 UTC
Verified the bug in the below component version's successfully.

Component versions's:
gdeploy-2.0.2-23.el7rhgs.noarch
cockpit-ovirt-dashboard-0.11.20-1.el7ev.noarch

Steps:
1. Install VDO 
2. Go to the cockpit UI and check the compression and deduplication tab.
3. Proceed to the review tab.
4. Check the PV,LV sections with appropriate parameters like below

Result:

[vdo1:10.70.45.29]
action=create
devices=sdb
names=vdo_sdb
logicalsize=200000G
blockmapcachesize=128M
readcache=enabled
readcachesize=20M
emulate512=enabled
writepolicy=sync
ignore_vdo_errors=no
slabsize=32G

[pv1:10.70.45.29]
action=create
devices=/dev/mapper/vdo_sdb
ignore_pv_errors=no

[vg1:10.70.45.29]
action=create
vgname=gluster_vg_sdb
pvname=/dev/mapper/vdo_sdb
ignore_vg_errors=no

Comment 3 Sandro Bonazzola 2018-04-18 12:26:14 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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