summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/ocf/ganesha_nfsd
Commit message (Collapse)AuthorAgeFilesLines
* nfs-ganesha: gluster_shared_storage fails to automount on node reboot on rhel 8Shwetha K Acharya2020-09-101-1/+1
| | | | | | | | | | | | | | The patch https://review.gluster.org/#/c/glusterfs/+/24934/, changes mount point of gluster_shared_storage from /var/run to /run to address the issue of symlink at mount path in fstab. NOTE: mount point /var/run is symlink to /run The required changes with respect to gluster_shared_storage mount path are introduced with this patch in nfs-ganesha. Fixes: #1475 Change-Id: I9c7677a053e1291f71476d47ba6fa2e729f59625 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* Revert "packaging: (ganesha) remove glusterfs-ganesha subpackage and related ↵Jiffin Tony Thottan2019-08-241-0/+167
| | | | | | | | | | | | | | | | | | | files" Until 3.12, glusterd had an option to setup HA cluster for nfs-ganesha using pacemaker and corosync. But later infavour of "Storhaug" Project, this functionality was removed from the codebase. Since there is not much development happening towards storhaug, it better to keep back old working HA solution for nfs-ganesha with bit improvements. Planned improvements : * add an option in nfs-ganesha enable to set ganesha without HA. * Handle usage of export id's properly in the scripts. Change-Id: I1d60c8970bfc20035cf674d7b2705dfd4819647e updates: #663 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* storhaug HA: first step, remove resource agents and setup scriptKaleb S. KEITHLEY2017-01-171-168/+0
| | | | | | | | | | | | | | | | resource agents and setup script(s) are now in storhaug This is a phased switch-over to storhaug. Ultimately all components here should be (re)moved to the storhaug project and its packages. But for now some will linger here. Change-Id: Ied3956972b14b14d8a76e22c583b1fe25869f8e7 BUG: 1410843 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/16349 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* common-ha: continuous grace_mon log messages in /var/log/messagesKaleb S KEITHLEY2016-04-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | messages are seen on RHEL6.x and RHEL7.1 and earlier versions of pacemaker. (And RHEL7.2 with RHEL7.1 pacemaker packages.) It's not possible to query attrd attributes in the older version, only set/update/clear them. The messages come from invalid attempts to query the attributes. However it is possible to query crm attributes. The fix here is to create a "shadow" crm attribute for the attrd attribute. Changes are made to both, queries are made on the crm attribute. (Resource Agents "follow" the attrd attribute using constraint locations, so we must keep the attrd attribute.) Change-Id: I84ac1a80673e528d98b67b7d5062e21dcf744d4a BUG: 1324509 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13919 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com>
* common-ha: reliable grace using pacemaker notify actionsKaleb S KEITHLEY2016-03-141-42/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using *-dead_ip-1 resources to track on which nodes the ganesha.nfsd had died was found to be unreliable. Running `pcs status` in the ganesha_grace monitor action was seen to time out during failover; the HA devs opined that it was, generally, not a good idea to run `pcs status` in a monitor action in any event. They suggested using the notify feature, where the resources on all the nodes are notified when a clone resource agent dies. This change adds a notify action to the ganesha_grace RA. The ganesha_mon RA monitors its ganesha.nfsd daemon. While the daemon is running, it creates two attributes: ganesha-active and grace-active. When the daemon stops for any reason, the attributes are deleted. Deleting the ganesha-active attribute triggers the failover of the virtual IP (the IPaddr RA) to another node where ganesha.nfsd is still running. The ganesha_grace RA monitors the grace-active attribute. When the grace-active attibute is deleted, the ganesha_grace RA stops, and will not restart. This triggers pacemaker to trigger the notify action in the ganesha_grace RAs on the other nodes in the cluster; which send a DBUS message to their ganesha.nfsd. (N.B. grace-active is a bit of a misnomer. while the grace-active attribute exists, everything is normal and healthy. Deleting the attribute triggers putting the surviving ganesha.nfsds into GRACE.) To ensure that the remaining/surviving ganesha.nfsds are put into NFS-GRACE before the IPaddr (virtual IP) fails over there is a short delay (sleep) between deleting the grace-active attribute and the ganesha-active attribute. To summarize: 1. on node 2 ganesha_mon:monitor notices that ganesha.nfsd has died 2. on node 2 ganesha_mon:monitor deletes its grace-active attribute 3. on node 2 ganesha_grace:monitor notices that grace-active is gone and returns OCF_ERR_GENERIC, a.k.a. new error. When pacemaker tries to (re)start ganesha_grace, its start action will return OCF_NOT_RUNNING, a.k.a. known error, don't attempt further restarts. 4. on nodes 1, 3, etc., ganesha_grace:notify receives a post-stop notification indicating that node 2 is gone, and sends a DBUS message to its ganesha.nfsd putting it into NFS-GRACE. 5. on node 2 ganesha_mon:monitor waits a short period, then deletes its ganesha-active attribute. This triggers the IPaddr (virt IP) failover according to constraint location rules. ganesha_nfsd modified to run for the duration, start action is invoked to setup the /var/lib/nfs symlink, stop action is invoked to restore it. ganesha-ha.sh modified accordingly to create it as a clone resource. BUG: 1290865 Change-Id: I1ba24f38fa4338b3aeb17c65645e9f439387ff57 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12964 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/13725
* common-ha: handle long node names and node names with '-' and '.' in themKaleb S. KEITHLEY2015-06-111-2/+2
| | | | | | | | | | | | | | | sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple and elegant solution for reading config params, but bash variable names do not allow '-' and '.' in them. Also fix incorrect path in shared volume mount Change-Id: I40140e5da0903221efd316de94dce40229263e15 BUG: 1225572 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11035 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* common-ha: delete-node implementationKaleb S. KEITHLEY2015-04-291-48/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | omnibus patch consisting of: + completed implemenation of delete-node (BZ 1212823) + teardown leaves /var/lib/nfs symlink (BZ 1210712) + setup copy config, teardown clean /etc/cluster (BZ 1212823) setup for copy config, teardown clean /etc/cluster: 1. on one (primary) node in the cluster, run: `ssh-keygen -f /var/lib/glusterd/nfs/secret.pem` Press Enter twice to avoid passphrase. 2. deploy the pubkey ~root/.ssh/authorized keys on _all_ nodes, run: `ssh-copy-id -i /var/lib/glusterd/nfs/secret.pem.pub root@$node` 3. copy the keys to _all_ nodes in the cluster, run: `scp /var/lib/glusterd/nfs/secret.* $node:/var/lib/glusterd/nfs/` N.B. this allows setup, teardown, etc., to be run on any node Change-Id: I9fcd3a57073ead24cd2d0ef0ee7a67c524f3d4b0 BUG: 1213933 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/10234 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha: Install scripts, config files, and resource agent scriptsKaleb S. KEITHLEY2015-03-171-0/+196
Resubmitting after a gerrit bug bungled the merge of http://review.gluster.org/9621 (was it really a gerrit bug?) Scripts related to NFS-Ganesha are in extras/ganesha/scripts. Config files are in extras/ganesha/config. Resource Agent files are in extras/ganesha/ocf Files are copied to appropriate locations. Change-Id: I137169f4d653ee2b7d6df14d41e2babd0ae8d10c BUG: 1188184 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/9912 Tested-by: Gluster Build System <jenkins@build.gluster.com>