Bug 1380027

Summary: [ganesha+gdeploy]: gdeploy fails to setup nfs-ganesha with 3.2 latest build
Product: Red Hat Gluster Storage Reporter: Shashank Raj <sraj>
Component: gdeployAssignee: Sachidananda Urs <surs>
Status: CLOSED NOTABUG QA Contact: Shashank Raj <sraj>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: jthottan, kkeithle, ndevos, rhs-bugs, sashinde, skoduri, smohan, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 09:32:23 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:

Description Shashank Raj 2016-09-28 13:45:27 UTC
Description of problem:

gdeploy fails to setup nfs-ganesha with 3.2 latest build

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

[root@dhcp43-159 ~]# rpm -qa|grep gdeploy
gdeploy-2.0.1-1.el7rhgs.noarch

[root@dhcp43-110 ~]# rpm -qa|grep glusterfs
glusterfs-api-3.8.4-1.el7rhgs.x86_64
glusterfs-fuse-3.8.4-1.el7rhgs.x86_64
glusterfs-geo-replication-3.8.4-1.el7rhgs.x86_64
glusterfs-libs-3.8.4-1.el7rhgs.x86_64
glusterfs-client-xlators-3.8.4-1.el7rhgs.x86_64
glusterfs-cli-3.8.4-1.el7rhgs.x86_64
glusterfs-ganesha-3.8.4-1.el7rhgs.x86_64
glusterfs-3.8.4-1.el7rhgs.x86_64
glusterfs-server-3.8.4-1.el7rhgs.x86_64
glusterfs-events-3.8.4-1.el7rhgs.x86_64

[root@dhcp43-110 ~]# rpm -qa|grep ganesha
nfs-ganesha-gluster-2.4.0-2.el7rhgs.x86_64
glusterfs-ganesha-3.8.4-1.el7rhgs.x86_64
nfs-ganesha-2.4.0-2.el7rhgs.x86_64


How reproducible:

Twice

Steps to Reproduce:
1.Create the config file with necessary parameters to setup nfs-ganesha.

[firewalld]
action=add
ports=662/tcp,662/udp
services=glusterfs,nlm,nfs,rpc-bind,high-availability,mountd,rquota

[volume]
action=create
volname=testvolume
transport=tcp
replica_count=2
force=

[nfs-ganesha]
action=create-cluster
ha-name=ganesha-ha-360
cluster-nodes=dhcp43-110.lab.eng.blr.redhat.com,dhcp43-96.lab.eng.blr.redhat.com,dhcp43-6.lab.eng.blr.redhat.com,dhcp42-110.lab.eng.blr.redhat.com
vip=10.70.40.209,10.70.40.210,10.70.40.211,10.70.40.212
volname=testvolume

2.Run the setup creation
3.Observe that it fails during "TASK: [Creating ganesha-ha.conf file]"

TASK: [Creating ganesha-ha.conf file] ***************************************** 
changed: [dhcp43-6.lab.eng.blr.redhat.com]
changed: [dhcp42-110.lab.eng.blr.redhat.com]
changed: [dhcp43-96.lab.eng.blr.redhat.com]
failed: [dhcp43-110.lab.eng.blr.redhat.com] => {"cur_context": ["system_u", "object_r", "fusefs_t", "s0"], "failed": true, "gid": 0, "group": "root", "input_was": ["system_u", "object_r", "glusterd_var_run_t", "s0"], "mode": "0600", "new_context": ["system_u", "object_r", "glusterd_var_run_t", "s0"], "owner": "root", "path": "/var/run/gluster/shared_storage/nfs-ganesha/.ansible_tmpki42cBganesha-ha.conf", "secontext": "system_u:object_r:fusefs_t:s0", "size": 814, "state": "file", "uid": 0}
msg: invalid selinux context

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/root/ganesha-conf-create.retry

dhcp42-110.lab.eng.blr.redhat.com : ok=3    changed=3    unreachable=0    failed=0   
dhcp43-110.lab.eng.blr.redhat.com : ok=2    changed=2    unreachable=0    failed=1   
dhcp43-6.lab.eng.blr.redhat.com : ok=3    changed=3    unreachable=0    failed=0   
dhcp43-96.lab.eng.blr.redhat.com : ok=3    changed=3    unreachable=0    failed=0   

Ignoring errors...

4.After checking the ganesha nodes, we have seen that ganesha-ha.conf is not getting created because of which it fails

[root@dhcp43-110 ~]# cd /etc/ganesha/
[root@dhcp43-110 ganesha]# ls
ganesha.conf  ganesha-ha.conf.sample
[root@dhcp43-110 ganesha]#

[root@dhcp43-110 ~]# cd /var/run/gluster/shared_storage/nfs-ganesha/
[root@dhcp43-110 nfs-ganesha]# ls
exports  ganesha.conf  ganesha-ha.conf.sample

Actual results:

gdeploy fails to setup nfs-ganesha with 3.2 latest build

Expected results:

there should not be any errors during nfs-ganesha setup creation.

Additional info:

Comment 2 Sachidananda Urs 2016-09-28 13:57:20 UTC
Shashank, this is due to some SELinux enforcements.

Here gdeploy is try to create directory under /var/run/gluster/shared_storage/nfs-ganesha and copy /etc/ganesha/* 

Can you give me access to the machines? I would like to check the SELinux settings. I don't see any problems in gdeploy right away.

Comment 3 Sachidananda Urs 2016-09-28 13:58:57 UTC
Also can you check if it has failed on all the nodes? I see failure on only one node.

Comment 6 Shashank Raj 2016-09-29 09:32:23 UTC
The issue was with ansible-1.9.4 and when tried with ansible 2.2, it works fine without any issues. Moving forward we will use 2.2 for testing. Based on the above observation, closing this bug.