Bug 1478862 - gdeploy failing with bad error message, doesn't point to the correct message
Summary: gdeploy failing with bad error message, doesn't point to the correct message
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Sachidananda Urs
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-07 10:50 UTC by Vivek Das
Modified: 2017-10-09 14:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-05 11:30:48 UTC
Embargoed:


Attachments (Terms of Use)

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


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