Bug 1478862

Summary: gdeploy failing with bad error message, doesn't point to the correct message
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Vivek Das <vdas>
Component: gdeployAssignee: Sachidananda Urs <surs>
Status: CLOSED NOTABUG QA Contact: Manisha Saini <msaini>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, rhs-bugs, smohan, storage-qa-internal, vdas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-05 11:30:48 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:

Description Vivek Das 2017-08-07 10:50:55 UTC
Description of problem:
On commenting the "brick_dirs" section in conf file and running gdeploy for multiple volume creation, gdeploy fails with bad error message. It is not pointing to exact issue.

Version-Release number of selected component (if applicable):
gdeploy-2.0.2-14.el6rhs.noarch
ansible-2.3.1.0-1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1.Comment the brick_dirs section in the gdeploy conf file
2. run gdeploy
3.

Actual results:
Fails with bad error message

Expected results:
Should fail with exact error message

Additional info:
Traceback (most recent call last):
  File "/usr/bin/gdeploy", line 219, in <module>
    main(sys.argv[1:])
  File "/usr/bin/gdeploy", line 208, in main
    call_features()
  File "/usr/lib/python2.6/site-packages/gdeploylib/call_features.py", line 39, in call_features
    map(get_feature_dir, Global.sections)
  File "/usr/lib/python2.6/site-packages/gdeploylib/call_features.py", line 94, in get_feature_dir
    section_dict, yml = feature_call(section_dict)
  File "/usr/lib/python2.6/site-packages/gdeployfeatures/volume/volume.py", line 23, in volume_create
    (section_dict['volname'], section_dict['brick_dirs']))
KeyError: 'brick_dirs'

Comment 3 Sachidananda Urs 2017-09-13 10:28:09 UTC
Vivek, do you by chance have the config file for this? This works for me. The config file I am using:

=====================
[hosts]
10.70.42.10
10.70.42.122

#[backend-setup]
#devices=vdb
#mountpoints=/gluster/brick1/
#brick_dirs=/gluster/brick1/f

[volume]
action=create
volname=vol1
transport=tcp
replica_count=2
#brick_dirs=/gluster/brick1/foo

[volume2]
action=create
volname=vol2
transport=tcp
replica_count=2
#brick_dirs=/gluster/brick1/bar

=====================================


[sac@dhcp35-44 gdeploy_config]$ gdeploy -c vol-create.conf 
Error: 'brick_dirs' not provided for all the hosts.

Comment 4 Vivek Das 2017-10-05 09:45:04 UTC
Hi
I am unable to reproduce the error messages again now with the below version

gdeploy-2.0.2-14
ansible-2.3.2.0-1