Bug 1231742 - nfs-ganesha: hardcoded value for parameter cidr_netmask=32 in ganesha-ha.sh script
Summary: nfs-ganesha: hardcoded value for parameter cidr_netmask=32 in ganesha-ha.sh s...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: nfs-ganesha
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Kaleb KEITHLEY
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-15 10:28 UTC by Saurabh
Modified: 2018-04-16 18:03 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1227311 0 high CLOSED nfs-ganesha: 8 node pcs cluster setup fails 2021-02-22 00:41:40 UTC

Internal Links: 1227311

Description Saurabh 2015-06-15 10:28:36 UTC
Description of problem:
As per the script of ganesha-ha.sh script the cidr_netmask param is hardcoded and this is getting used at the time of resource creations.

hard coded line from script,
 pcs -f ${cibfile} resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} cidr_netmask=32 op monitor interval=15s

The cidr_netmask may not always be "32"in customer scenarios.
Highly likely because of this hard coded value I am getting a issue related to setting up cluster, as /var/log/messages report

Jun 15 19:28:19 nfs11 IPaddr(nfs11-cluster_ip-1)[2872]: ERROR: IP address ["10.70.44.92"] not valid. 

We get this error during cluster setup and setup fails. From further triage I see that the ip assigned is with cidr "<ip>/22" not "<ip>/32".


Version-Release number of selected component (if applicable):
glusterfs-3.7.1-3.el6rhs.x86_64
nfs-ganesha-2.2.0-2.el6rhs.x86_64

How reproducible:
always


Expected results:
parameters values should not be hard coded.

Additional info:

Comment 2 Kaleb KEITHLEY 2015-06-15 19:55:45 UTC
The real issue was the '"' characters in the virt IP address that were causing the resource to not be created.

Once the resource is successfully created with a virt IP address (without the '"'s) then things seem to be okay.

Comment 3 Kaleb KEITHLEY 2015-06-15 22:21:05 UTC
The real issue was the '"' characters in the virt IP address that were causing the resource to not be created.

Once the resource is successfully created with a virt IP address (without the '"'s) then things seem to be okay.

Fixed by the patch for  https://bugzilla.redhat.com/show_bug.cgi?id=1227311

Comment 4 Saurabh 2015-06-16 09:11:49 UTC
I tested the things as per modified script i.e. ganesha-ha.sh(script under review), asn I was able to get the 8 node cluster running on one hypervisor.

Though I am still not sure why we have to hardcode the value for cidr_netmask param, can't we take the same as input from config file?

Comment 5 Kaleb KEITHLEY 2015-06-17 18:40:50 UTC
hard-coded 32 is not wrong AFAICT. a /32 netmask is normally a mistake. I believe that the resource agent will compute the correct netmask.

The documentation says that if the cidr_netmask is not specified that it will compute the netmask from the interface. However if the cidr_netmask isn't specified then the resource create will fail. The documention shows using a value of 32. I infer that using 32 is okay and will compute the correct netmask.

We could certainly add it to the /etc/ganesha/ganesha-ha.conf file if the above assumptions turn out to be incorrect.


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