Bug 1116375 - (RHEL6) Whitespace after an IP in /etc/ctdb/nodes file causing ctdb set-up to fail
Summary: (RHEL6) Whitespace after an IP in /etc/ctdb/nodes file causing ctdb set-up t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: samba
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
high
low
Target Milestone: ---
: RHGS 3.1.2
Assignee: Michael Adam
QA Contact: surabhi
URL:
Whiteboard: ctdb
Depends On:
Blocks: 1260783 1292483
TreeView+ depends on / blocked
 
Reported: 2014-07-04 11:13 UTC by Lalatendu Mohanty
Modified: 2019-02-15 13:42 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.7.5-6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1292483 (view as bug list)
Environment:
Last Closed: 2016-03-01 06:13:10 UTC
Embargoed:


Attachments (Terms of Use)
ctdb logs (42.93 KB, application/x-gzip)
2014-07-04 11:17 UTC, Lalatendu Mohanty
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0324 0 normal SHIPPED_LIVE gluster-smb bug fix and enhancement update 2016-03-01 10:31:19 UTC
Samba Project 11365 0 None None None Never

Description Lalatendu Mohanty 2014-07-04 11:13:40 UTC
Description of problem:

During setting up CTDB, we need to create  /etc/ctdb/nodes file on all the nodes that is used as Samba servers and add the ips of these nodes to the file.
E.g.: 
$cat /etc/ctdb/nodes
10.16.157.0
10.16.157.3
10.16.157.6
10.16.157.9

But if there is any white space after the IP addresses, ctdb fails to parse it and goes to unhealthy state. 

e.g: 

10.16.157.0<white space>
10.16.157.3<white space>

I can see below in /var/log/log.ctdb

2014/07/04 15:24:19.244686 [ 2697]: Starting CTDBD (Version 2.5.3) as PID: 2697
2014/07/04 15:24:19.558658 [ 2697]: common/ctdb_util.c:455 Failed to translate 10.70.43.93  into sin_addr
2014/07/04 15:24:19.558718 [ 2697]: tcp/tcp_connect.c:118 Unparsable address : 10.70.43.93 .
2014/07/04 15:24:19.559087 [ 2697]: Freeze priority 1
2014/07/04 15:24:19.561197 [ 2697]: Freeze priority 2
2014/07/04 15:24:19.562124 [ 2697]: Freeze priority 3
2014/07/04 15:24:19.587347 [ 2697]: common/ctdb_util.c:455 Failed to translate 10.70.43.93  into sin_addr
2014/07/04 15:24:19.587389 [ 2697]: tcp/tcp_connect.c:118 Unparsable address : 10.70.43.93 .
2014/07/04 15:24:19.834621 [ 2697]: common/ctdb_util.c:455 Failed to translate 10.70.43.93  into sin_addr
2014/07/04 15:24:19.834673 [ 2697]: server/ctdb_recover.c:145 Failed to parse 10.70.43.93  into a sockaddr



Version-Release number of selected component (if applicable):

ctdb2.5-2.5.3-5.el6rhs.x86_64.rpm

glusterfs-3.6.0.22-1.el6rhs.x86_64.rpm

How reproducible:

Always

Steps to Reproduce:
Follow below documentation and while putting ips in  /etc/ctdb/nodes, put white space after one of the ips

https://documentation-devel.engineering.redhat.com/site/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Configuring_Automated_IP_Failover_for_NFS_and_SMB.html#Setting_Up_CTDB

Actual results:

In "ctdb status" the heath of the cluster was unhealthy

Expected results:
CTDB should be intelligent enough to ignore the white space.

Additional info:

Comment 1 Lalatendu Mohanty 2014-07-04 11:17:32 UTC
Created attachment 914706 [details]
ctdb logs

Comment 2 surabhi 2015-05-04 10:37:44 UTC
The issue is still seen with:
ctdb2.5-2.5.4-1.el6rhs.x86_64

2015/05/04 06:33:29.910685 [24680]: common/system_util.c:154 Failed to translate 10.16.157.78   into sin_addr
2015/05/04 06:33:29.910708 [24680]: tcp/tcp_connect.c:118 Unparsable address : 10.16.157.78  .
2015/05/04 06:33:29.910728 [24680]: Unable to bind to any of the node addresses - giving up
2015/05/04 06:33:29.910741 [24680]: tcp/tcp_init.c:67 Failed to start listening on the CTDB socket

Comment 3 Michael Adam 2015-06-30 07:51:19 UTC
Patch exists by now in upstream samba master.
Need backport to ctdb 2.5.

Comment 10 surabhi 2015-11-24 12:06:03 UTC
Verified the BZ on RHEL7. Waiting for RHEL6 build.

Comment 11 surabhi 2015-11-30 12:42:30 UTC
On RHEL6 verified the bz with following steps:
While doing the setup for CTDB , introduce a whitespace after the IP entry in /etc/ctdb/nodes files and save the config an do ctdb start,

Expected result:
CTDB should start successfully.
Tried with multiple spaces , it works fine.
Verified on RHEL6 and RHEL7 with builds as follows:

ctdb-4.2.4-8.el6rhs.x86_64 : RHEL6
ctdb-4.2.4-6.el7rhgs.x86_64 : RHEL7

Comment 13 errata-xmlrpc 2016-03-01 06:13:10 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://rhn.redhat.com/errata/RHBA-2016-0324.html


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