Bug 1406403
| Summary: | vgcreate should fail if there is an exisitng vg with the same name. | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | RamaKasturi <knarra> |
| Component: | gdeploy | Assignee: | Sachidananda Urs <surs> |
| Status: | CLOSED ERRATA | QA Contact: | RamaKasturi <knarra> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rhgs-3.2 | CC: | amukherj, asrivast, rhinduja, rhs-bugs, sabose, smohan, storage-qa-internal, surs |
| Target Milestone: | --- | ||
| Target Release: | RHGS 3.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | gdeploy-2.0.1-2 | Doc Type: | Bug Fix |
| Doc Text: |
Cause:
If there exists a VG and if user tries to create another VG with the same name, gdeploy would extend it instead of failing.
Consequence:
vgcreate would never fail upon trying to create new VG with a name that was already used in another VG. Instead volume group would be extended.
Workaround (if any):
User has to ensure that a new VG name is used.
Result:
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-09-21 04:49:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1417147 | ||
|
Description
RamaKasturi
2016-12-20 12:58:19 UTC
Following is the code where the bug exists "/usr/lib/python2.7/site-packages/ansible/modules/extras/system/glusterfs/vg.py"
def vg_presence_check(self, vg):
rc, out, err = self.run_command('vgdisplay', ' ' + vg)
ret = 0
if self.action == 'create' and not rc:
self.action = 'extend'
self.op = 'vgextend'
return
elif self.action == 'extend' and rc:
self.action = 'create'
self.op = 'vgcreate'
return
elif self.action == 'remove' and rc:
self.module.exit_json(changed=changed, rc=1, msg="%s Volume Group Doesn't Exists!" % disk)
else:
ret = 1
return ret
Is there an option in vg section to indicate if user wants to extend or create? Yes. [vg] action=extend Commit: https://github.com/gluster/gdeploy/commit/c7c81fe fixes the issue. Verified and works fine with build gdeploy-2.0.2-10.el7rhgs.noarch.
vgcreate fails with the error, "failed: [host_name] (item={u'brick': u'/dev/sdd', u'vg': u'RHGS_vg1'}) => {"changed": false, "failed": true, "item": {"brick": "/dev/sdd", "vg": "RHGS_vg1"}, "msg": "A volume group called RHGS_vg1 already exists", "rc": 1}"
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://access.redhat.com/errata/RHBA-2017:2777 |