Bug 1397738 - [GDEPLOY+GANESHA] refresh config fails to modify the client permissions in export file
Summary: [GDEPLOY+GANESHA] refresh config fails to modify the client permissions in ex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: RHGS 3.3.0
Assignee: Devyani Kota
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks: 1417147
TreeView+ depends on / blocked
 
Reported: 2016-11-23 09:49 UTC by Manisha Saini
Modified: 2019-11-14 09:03 UTC (History)
8 users (show)

Fixed In Version: gdeploy-2.0.1-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-21 04:49:50 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2777 0 normal SHIPPED_LIVE gdeploy bug fix and enhancement update for RHEL7 2017-09-21 08:23:08 UTC

Description Manisha Saini 2016-11-23 09:49:22 UTC
Description of problem:
While modifying the already provided permission to client in export block ,refresh config fails with gdeploy

Version-Release number of selected component (if applicable):
gdeploy-2.0.1-5.el7rhgs.noarch
glusterfs-3.8.4-5.el7rhgs.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1.Create 4 node ganesha setup using gdeploy
2.Create a volume with nfs enable on that client
3.Mount the volume to client
4.With gdeploy give permissions to that particular client (say for example provide RO permission to that client).Run refresh-config
5.Modify the RO permission to RW permission (for the same client) using gdeploy refresh config

Actual results:
Refresh Config fails as instead of modifying the same block in export file,it is appending the permission after the block

EXPORT{
      Export_Id= 5 ;
      Path = "/ganeshaval";
      FSAL {
           name = GLUSTER;
           hostname="localhost";
          volume="ganeshaval";
           }
      Access_type = RW;
      Disable_ACL = true;
      Squash="No_root_squash";
      Pseudo="/ganeshaval";
      Protocols = "3", "4" ;
      Transports = "UDP","TCP";
      SecType = "sys";
client {
clients = 10.70.46.30;
allow_root_access = true;
access_type = "RW";
Protocols = "3";
anonymous_uid = 1440;
anonymous_gid = 72;
}

access_type = "RO";
}

     }


Expected results:
Modifying the permission for that particular client should work with gdeploy.It should modify the same export block instead of appending other.

Additional info:

Comment 4 Devyani Kota 2017-02-20 15:06:39 UTC
Refresh-config was failing to modify the same block in the export file.
Added 'update_config_lines' option to refresh-config.
PR #314 [1] fixes the same and is up for review.

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

Comment 7 Manisha Saini 2017-05-08 09:03:26 UTC
Verified this bug on gdeploy-2.0.2-4.el7rhgs.noarch


[hosts]
dhcp42-125.lab.eng.blr.redhat.com
dhcp42-127.lab.eng.blr.redhat.com
dhcp42-129.lab.eng.blr.redhat.com
dhcp42-119.lab.eng.blr.redhat.com
dhcp42-117.lab.eng.blr.redhat.com
dhcp42-114.lab.eng.blr.redhat.com
dhcp42-107.lab.eng.blr.redhat.com
dhcp42-88.lab.eng.blr.redhat.com


[nfs-ganesha]
action=refresh-config
update_config_lines=access_type = "RO";
#update_config_lines=Protocols = "4";
#update_config_lines=clients = 10.70.37.142;
volname=ganesha2


Updating client permissions in export file works with gdeploy,hence moving this bug to verified state.

Comment 9 errata-xmlrpc 2017-09-21 04:49:50 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/RHBA-2017:2777


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