Bug 1515733

Summary: gdeploy should not pick up hostnames from host list for ctdb deployment if ctdb_nodes is not set
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Matthias Muench <mmuench>
Component: gdeployAssignee: Devyani Kota <dkota>
Status: CLOSED ERRATA QA Contact: Manisha Saini <msaini>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, mmuench, musoni, rcyriac, rhinduja, rhs-bugs, smohan, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.3.1 Async   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: gdeploy-2.0.2-22 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-21 03:33:14 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: 1581561    

Description Matthias Muench 2017-11-21 09:45:23 UTC
Description of problem:
When using gdeploy to setup ctdb it picks up the list from hosts as ctdb_nodes and stores it into /etc/ctdb/nodes, regardless of finding hostnames or ip addresses. Since ctdb expects ip address format for entries in /etc/ctdb/nodes it fails to start with error message.

Version-Release number of selected component (if applicable):
gdeploy-2.0.2-14.el7rhgs.noarch

How reproducible:
Always.


Steps to Reproduce:
1. use hostnames instead of ip addresses in [hosts] section of gdeploy config file
2. don't specify ctdb_nodes list
3. run gdeploy 

Actual results:
gdeploy fails with error messages:

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

TASK [start/stop/restart/reload services] *****************************************************************************************************
failed: [gl-t3] (item=ctdb) => {"failed": true, "item": "ctdb", "msg": "Unable to start service ctdb: Job for ctdb.service failed because the control process exited with error code. See \"systemctl status ctdb.service\" and \"journalctl -xe\" for details.\n"}
failed: [gl-t2] (item=ctdb) => {"failed": true, "item": "ctdb", "msg": "Unable to start service ctdb: Job for ctdb.service failed because the control process exited with error code. See \"systemctl status ctdb.service\" and \"journalctl -xe\" for details.\n"}
failed: [gl-t1] (item=ctdb) => {"failed": true, "item": "ctdb", "msg": "Unable to start service ctdb: Job for ctdb.service failed because the control process exited with error code. See \"systemctl status ctdb.service\" and \"journalctl -xe\" for details.\n"}
	to retry, use: --limit @/tmp/tmpyUmGR5/service_management.retry


and from /var/log/log.ctdb:
2017/11/21 00:44:12.235065 ctdbd[7040]: CTDB starting on node
2017/11/21 00:44:12.236956 ctdbd[7040]: ../ctdb/common/system_util.c:123 Failed to translate gl-t1 into sin_addr
2017/11/21 00:44:12.236973 ctdbd[7040]: Failed to load nodes file "/etc/ctdb/nodes"



Expected results:
gdeploy should not put hostnames into /etc/ctdb/nodes

Additional info:
full trace see https://github.com/mattmuench/bug-traces/blob/master/bug-ctdb_nodes--gdeploy-2.0.2-14

Comment 2 Devyani Kota 2017-12-18 12:10:44 UTC
Hi,

PR[1] fixes the issue.
When ctdb_nodes are not set, the default behaviour of gdeploy is to
pick up hosts from the host list.
gdeploy should throw error when hostnames are given instead of IPs
in this case.

[1] https://github.com/gluster/gdeploy/pull/471

Thanks,
Devyani Kota

Comment 8 errata-xmlrpc 2018-06-21 03:33:14 UTC
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/RHEA-2018:1958