summaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
* glusterd/ganesha : handle volume reset properly for ganesha optionsJiffin Tony Thottan2016-12-232-51/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "gluster volume reset" should first unexport the volume and then delete export configuration file. Also reset option is not applicable for ganesha.enable if volume value is "all". This patch also changes the name of create_export_config into manange_export_config Upstream reference : >Change-Id: Ie81a49e7d3e39a88bca9fbae5002bfda5cab34af >BUG: 1397795 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/15914 >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> >Reviewed-by: soumya k <skoduri@redhat.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: Ie81a49e7d3e39a88bca9fbae5002bfda5cab34af BUG: 1405955 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/16054 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> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/16199
* ganesha/scripts : use export id for dbus signalsJiffin Tony Thottan2016-12-192-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently for add export and update export parameter passed for executing those signal is "PATH". This is based on assumption that volume name and PATH will always be same. But it is wrong for subdir exports. The only reliable parameter in export configuration file is "Export_Id". Upstream reference : >Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9 >BUG: 1389746 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/15751 >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> >Reviewed-by: soumya k <skoduri@redhat.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9 BUG: 1405918 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15970 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> (cherry picked from commit beace6aed3ef27e1e55a420d606ecdfbd56b32b2) Reviewed-on: http://review.gluster.org/16194
* extras: Include shard and full-data-heal in virt groupKrutika Dhananjay2016-12-131-0/+2
| | | | | | | | | | | | | Backport of: http://review.gluster.org/15995 Change-Id: I995d1866bd520409c9b32c27daa2d439aa291b05 BUG: 1402215 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/16047 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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* build: systemd unit should not be marked executableNiels de Vos2016-08-121-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd complains about the unit for GlusterD when it is executable: Configuration file /usr/lib/systemd/system/glusterd.service is marked executable. Please remove executable permission bits. Proceeding anyway. The Makefile that installs the unit has some scripted commands. These are not needed and standard "*dir" and "*DATA" postfixes for variables can be used instead. The EXTRA_DIST variable is needed for building the 'make dist' tarball on systems where there is no systemd. The unit would be missing from the tarball if it is not explicitly included. Cherry picked from commit 9f22282795e20fd62b22847b92dffd0cde9cca1b: > BUG: 1354489 > Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 > Reported-by: Sergej Pupykin <ml@sergej.pp.ru> > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14892 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 BUG: 1354476 Reported-by: Sergej Pupykin <ml@sergej.pp.ru> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/15116 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* extras: allign glusterd stop response in init scriptAtin Mukherjee2016-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13839 An echo is missing stop() function which results in bad allignment of glusterd stop output Cherry-picked from commit dd02c5af9acb77cddc3bbe1ce9a51b7428b24446: > Change-Id: I63ac9571457db90574fb1bfbf4f18ba09d3df1af > BUG: 1321762 > Signed-off-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-on: http://review.gluster.org/13839 > Smoke: Gluster Build System <jenkins@build.gluster.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: I63ac9571457db90574fb1bfbf4f18ba09d3df1af BUG: 1322667 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13863 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* scripts: bash-isms in scriptsKaleb S KEITHLEY2016-06-241-5/+5
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14401/ Change-Id: I05f8718fb73c16dbb37c1f7460bb7b55cc0ffe97 BUG: 1223947 Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Kotresh HR <khiremat@redhat.com> Original-Author: Kaleb S KEITHLEY <kkeithle@redhat.com> (cherry picked from commit 2df72780e473709128a4f5d7f274a9063b288252) Reviewed-on: http://review.gluster.org/14774 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> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: race/timing issue setting up clusterKaleb S KEITHLEY2016-06-243-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ganesha_grace resource agent can start before the ganesha_mon resource agent, with the result that the crm_attribute that ganesha_grace expects to find has not been created yet. This is never (never? Or just so rarely that it has never actually been seen during development) seen with four nodes, but with just two nodes it's very repeatable. Note that when long (FQDN) names are used it is not unexpected to see Failed Actions in the output of `pcs status`, e.g.: * nfs-grace_monitor_5000 on node1.fully.qualified.domain.name.com 'unknown error' (1): call=20, status=complete, exitreason='none', last-rc-change='Wed Jun 1 12:32:32 2016', queued=0ms, exec=0ms * nfs-grace_monitor_5000 on node2.fully.qualified.domain.name.com 'unknown error' (1): call=18, status=complete, exitreason='none', last-rc-change='Wed Jun 1 12:32:42 2016', queued=0ms, exec=0ms and as long as all the ganesha_grace_clone and cluster_ip-1 resource agents are in Started state then this is okay. backport master: > http://review.gluster.org/14607 > BUG: 1341768 release-3.8 > http://review.gluster.org/14609 > BUG: 1341770 Change-Id: I726c9946ceb1ca92872b321612eb0f4c3cc039d8 BUG: 1341772 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14610 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> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* common-ha: post fail-back, ganesha.nfsds are not put into NFS-GRACEKaleb S KEITHLEY2016-05-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A little known, rarely used feature of pacemaker called "notification" is used to follow the status of the ganesha.nfsds in the cluster. This is done with location constraints and other Black Magick. When a nfsd dies, the ganesha-active attribute is cleared, the associated floating IP (VIP) fails over to another node, and the ganesha_grace notify method is invoked with post-stop on all the nodes where the ganesha.nfsd is still running. The notify methods send dbus msgs to put their nfsds into NFS-GRACE, and the nfsds perform their grace processing, e.g. taking over locks from the failed nfsd. N.B. Fail-back was originally not planned to be a feature for glusterfs-3.7, but we sorta got it for free. For fail-back, the opposite occurs. The ganesha-active attribute is recreated, the floating IP fails back, and the notify method is invoked with pre-start on all the nodes where the surviving ganesha.nfsds continue to run. The notify methods send dbus msgs again to put their nsfds into NFS-GRACE again, and the nfsds clean up their locks. backport mainline > http://review.gluster.org/14506 > BUG: 1338967 release-3.8 > http://review.gluster.org/14507 > BUG: 1338968 Change-Id: I3fc64afa20ae3a928143d69aa533a8df68dd680e BUG: 1338969 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14508 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com>
* common-ha: wait for cluster to elect DC before accessing CIBKaleb S KEITHLEY2016-05-241-6/+13
| | | | | | | | | | | | | | | | | | | access attempts, e.g. `pcs property set stonith-enabled=false` will fail (or time out) if attempted "too early", i.e. before the cluster has elected its DC. see https://bugzilla.redhat.com/show_bug.cgi?id=1336947#c3 and https://bugzilla.redhat.com/show_bug.cgi?id=1320740 Change-Id: Ifc0aa7ce652c1da339b9eb8fe17e40e8a09b1096 BUG: 1336948 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14428 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-by: soumya k <skoduri@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* common-ha: log flooded with Could not map name=xxxx to a UUIDKaleb S KEITHLEY2016-05-232-9/+30
| | | | | | | | | | | | | | When the cluster is configured with long (FQDN) cluster members the log is flooded with "Could not map name=$shortname to a UUID" notices, and setting/getting the attribute is failing Change-Id: I954d8cef7115659cc9c8b23dae75a5a247dc5db7 BUG: 1337653 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14437 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>
* common-ha: stonith-enabled option set error in new pacemakerKaleb S KEITHLEY2016-05-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Setting the option too early results in an error in newer versions of pacemaker. Postpone setting the option in order for it to succeed. N.B. We do not use a fencing agent. Yes, we know this is "not supported." Backport of mainline >> http://review.gluster.org/#/c/14404/ >> BUG: 1336945 >> Change-Id: I86953fdd67e6736294dbd2d0795611837188bd9d release-3.8 > http://review.gluster.org/#/c/14405/ > BUG: 1336947 > Change-Id: I402992bcb90a92dbcc915a75fe03b25221625e98 Change-Id: I6f75a4d67618b41a4b30c341f5b7e9ea976b553e BUG: 1336948 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14406 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>
* ganesha/scripts : Fixing refresh config in ganesha-ha.shJiffin Tony Thottan2016-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | The change http://review.gluster.org/#/c/14225/ cause a regression for refresh config funtion in ganesha-ha.sh due to a invalid usage of awk arguement. This is backport of below mainstream bug - http://review.gluster.org/14325 Change-Id: Id5adfb12f99b29bdb3531773cd34bd67cfff8768 BUG: 1336331 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14325 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14353 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>
* common-ha: floating IP (VIP) doesn't fail over when ganesha.nfsd diesKaleb S KEITHLEY2016-05-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | restore mistaken removal of 'attrd_updater delete grace-active' to trigger fail-over original was: attrd_updater -D -n grace-active sleep attrd_updater -D -n ganesha-active mistake was: sleep attrd_updater -D -n grace-active Change-Id: Iabd06ed042671e1fa744c4db469cd33ff40d6c4e BUG: 1336199 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14345 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* extras: stop all include glusterfs process as wellPrasanna Kumar Kalever2016-05-141-27/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | currently, extras/stop-all-gluster-processes.sh script handles brick processes, node services and geo-rep's gsync process. from now this script also handles mount processes as well, as part of this patch I have reorganized this script Backport of: > Change-Id: Id62d6fda6dd331bde722ce3d99ec3f09fed55cb0 > BUG: 1334620 > Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> > Reviewed-on: http://review.gluster.org/14277 > Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Change-Id: Id62d6fda6dd331bde722ce3d99ec3f09fed55cb0 BUG: 1334750 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14320 Tested-by: Prasanna Kumar Kalever <pkalever@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> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* geo-rep: Fix gluster binary invocation while running as cronAravinda VK2016-05-102-9/+13
| | | | | | | | | | | | | | | | | | When scheduler script was executed as cron, it was unable to detect the Gluster binaries. BUG: 1331924 Change-Id: Ic9c533586ed9a472765f69aa2f87d004c46d4340 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14111 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> (cherry picked from commit 80e3832ec16f69d4184172cfc9afa9e42533e0ef) Reviewed-on: http://review.gluster.org/14122 Reviewed-by: Kotresh HR <khiremat@redhat.com>
* glusterd-ganesha : copy ganesha export configuration files during rebootJiffin Tony Thottan2016-05-062-2/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glusterd creates export conf file for ganesha using hook script during volume start and ganesha_manage_export() for volume set command. But this routine is not added in glusterd restart scenario. Consider the following case, in a three node cluster a volume got exported via ganesha while one of the node is offline(glusterd is not running). When the node comes back online, that volume is not exported on that node due to the above mentioned issue. Also I have removed unused variables from glusterd_handle_ganesha_op() For this patch to work pcs cluster should running on that be node. Upstream reference >Change-Id: I5b2312c2f3cef962b1f795b9f16c8f0a27f08ee5 >BUG: 1330097 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>i >Reviewed-on: http://review.gluster.org/14063 >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-by: soumya k <skoduri@redhat.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I5b2312c2f3cef962b1f795b9f16c8f0a27f08ee5 BUG: 1333661 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14233 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : Parse the Export_Id correctly for unexporting volumeJiffin Tony Thottan2016-05-053-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently export id parsed using "cut -d ' ' -f8" which might endup in giving wrong value. In case of multiple space chracter, output may differ. In this all those instance will replaced by awk call >Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 >BUG: 1333319 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14225 >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-by: soumya k <skoduri@redhat.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >(cherry picked from commit 5440bad91026f27399df51856176aef85c1fcf4d) Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 BUG: 1333528 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14231 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com>
* scripts: correct the usage of -perm in backend-cleanup.shNiels de Vos2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | extras/backend-cleanup.sh uses deprecated find -perm +xxx syntax: find [...] -perm +01000 [...] This GNU extension syntax is deprecated and does not work in GNU findutils 4.5.11 and later. Please change to find -perm /xxx instead. The new syntax was introduced in 4.2.25 (October 2005) and should therefore be available on any relevant system. Bachport of this change on the master branch: > BUG: 1294223 > Reviewed-on: http://review.gluster.org/13080 > Change-Id: Ice742957dd24f0ab4f70a8569dff6f2536e9ac1e > Reported-by: Andreas Metzler <ametzler@bebt.de> > Signed-off-by: Niels de Vos <ndevos@redhat.com> BUG: 1294077 Change-Id: Ice742957dd24f0ab4f70a8569dff6f2536e9ac1e Reported-by: Andreas Metzler <ametzler@bebt.de> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13081 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* geo-rep: Fix checkpoint issue in schedulerAravinda VK2016-04-291-15/+11
| | | | | | | | | | | | | | | | | If checkpoint is not met, Scheduler script should touch the Mount point so that SETATTR will get recorded in every brick Changelog. Script was not touching the mount point in each iteration. BUG: 1330450 Change-Id: I2718a764fb3e550742c9dcd316724683561ddf18 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14029 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit 8590c1cf3c27468177c425c920cab01f52b251e5) Reviewed-on: http://review.gluster.org/14071
* common-ha: continuous grace_mon log messages in /var/log/messagesKaleb S KEITHLEY2016-04-284-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.) Backport of > Change-Id: I84ac1a80673e528d98b67b7d5062e21dcf744d4a > BUG: 1324509 > http://review.gluster.org/#/c/13919/ Change-Id: I7301c48849496be026ef598c588e78c68f273a8a BUG: 1324510 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13920 Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com>
* packaging: additional dirs and files in /var/lib/glusterd/Kaleb S KEITHLEY2016-04-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing /var/lib/glusterd files and dirs found by downstream testing. Use a loop to create hook dirs instead of open-coding. Merge the %ghost and non-ghost dirs in -server %files section for easier maintenance. Eliminate a benign warning for enabling non-existent glusterfsd.{init,service} which is only relevant to Fedora koji builds Don't reject glusterfs.spec.in changes because of long lines Backport of > Change-Id: I5802175d729e0168eea879a2a61626b0b73d77c8 > BUG: 1326410 > http://review.gluster.org/13981 Change-Id: Ica0f54e63ec01056263a27bbcd4a10e469f67e42 BUG: 1326413 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13982 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* Revert "glusterd: Bug fixes for IPv6 support"Kaushal M2016-04-161-1/+0
| | | | | | | | This reverts commit b33f3c95ec9c8112e6677e09cea05c4c462040d0. This commit exposes some issues with management encryption that prevents GlusterFS from operating properly. This will be added again once problems with management encryption are fixed.
* extras: Add namespace for options in group-virt.exampleVijay Bellur2016-04-131-8/+8
| | | | | | | | | | | | | | | | | | | | | Commit 23ccabbeb7 introduced a new key "disperse.eager-lock" which causes a conflict with key "cluster.eager-lock" when option is used without the qualifying namespace. group-virt.example which gets installed as /var/lib/glusterd/ groups/virt contains options without namespace qualifiers. This patch adds the appropriate namespace to all options in group-virt.example. Change-Id: I2c09dd10d44138410d889ddeb805f01c641c6780 BUG: 1325630 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/13929 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13958 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Kaushal M <kaushal@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* extras:add gfid-to-dirname.shRavishankar N2016-03-241-0/+46
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13797/ Add a script that converts the gfid-string of a directory into absolute path name w.r.t the brick path. Example:gfid-to-dirname.sh /home/ravi/bricks/brick1 e9c81321-f009-41b0-a009-cd77888c217e Location of the directory corresponding to gfid:e9c81321-f009-41b0-a009-cd77888c217e is /home/ravi/bricks/brick1/d1/d2/d3/d4/d5/d6/d7/ Change-Id: I276ddf9c4f3d11a5b1932286d848b00b5ea1895d BUG: 1320367 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit afbdcda3f4d6ffb906976064e0fa6f6b824718c8) Reviewed-on: http://review.gluster.org/13812 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-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* extra: "enable-shared-storage" key should create shared-storageGaurav Kumar Garg2016-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/11491/ Currently while creating shared storage it accept only "cluster.enable-shared-storage" key. It should also accept "enable-shared-storage" key. Change-Id: I4c68782f4b7927ec8cd725e411b0b9db17d9c48d BUG: 1319645 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Change-Id: I4c68782f4b7927ec8cd725e411b0b9db17d9c48d >> BUG: 1238224 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/11491 >> Tested-by: NetBSD Build System <jenkins@build.gluster.org> >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> >> Reviewed-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit 890e58f5d4d3db9477e36cac3d16798ffe3b0480) Change-Id: Ic77fd67b90be3381cff33f18f49eee97972eb19a Reviewed-on: http://review.gluster.org/13794 Tested-by: Gaurav Kumar Garg <ggarg@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Bug fixes for IPv6 supportNithin D2016-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11988/ Problem: Glusterd not working using ipv6 transport. The idea is with proper glusterd.vol configuration, 1. glusterd needs to listen on default port (240007) as IPv6 TCP listner. 2. Volume creation/deletion/mounting/add-bricks/delete-bricks/peer-probe needs to work using ipv6 addresses. 3. Bricks needs to listen on ipv6 addresses. All the above functionality is needed to say that glusterd supports ipv6 transport and this is broken. Fix: When "option transport.address-family inet6" option is present in glusterd.vol file, it is made sure that glusterd creates listeners using ipv6 sockets only and also the same information is saved inside brick volume files used by glusterfsd brick process when they are starting. Tests Run: Regression tests using ./run-tests.sh IPv4: Regression tests using ./run-tests.sh for release-3.7 branch verified by comparing with clean repo. IPv6: (Need to add the above mentioned config and also add an entry for "hostname ::1" in /etc/hosts) Started failing at ./tests/basic/glusterd/arbiter-volume-probe.t and ran successfully till here Change-Id: Idd7513aa2347ce0de2b1f68daeecce1b7a39a7af BUG: 1310445 Signed-off-by: Nithin D <nithind1988@yahoo.in> Reviewed-on: http://review.gluster.org/13787 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-by: Atin Mukherjee <amukherj@redhat.com>
* ganesha: Include a script to generate epoch valueSoumya Koduri2016-03-212-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | In a NFS-Ganesha HA cluster setup, for NFS clients to recover state succesfully post failover, the NFS-servers should start with a unique epoch value. With NFS-Ganesha 2.3, the service accepts an option "EPOCH_EXEC" which takes path of the script, generating epoch value. This script is executed before starting nfs-ganesha service so that the generated epoch value is used while bringing up the service. This patch includes the script to be used by nfs-ganesha+gluster setup. The epoch value is computed as follows - - first 32-bit contains the now() time - rest 32-bit value contains the local glusterd node uuid Change-Id: I876ea5a3730d7c6b40503e0fec16a4a142c54a36 BUG: 1317482 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/13716 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* bash-completion: Swap order of characters in egrep bracket expressionPaul Stauffer2016-03-171-1/+1
| | | | | | | | | | | | | | | Backport of http://review.gluster.org/11939 Change-Id: I5132a8ffb00d03932bc6bd801eeaf237b334e2e3 BUG: 1318750 Signed-off-by: Paul Stauffer <paulds@horde.com> Reviewed-on: http://review.gluster.org/13769 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Ravishankar N <ravishankar@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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* geo-rep: Script to Schedule Geo-replicationAravinda VK2016-03-082-2/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script can be used to run Geo-replication when required. can be scheduled using cron job to run Geo-replication. This script does the following, 1. Stop Geo-replication if Started 2. Start Geo-replication 3. Set Checkpoint 4. Check the Status and see Checkpoint is Complete.(LOOP) 5. If checkpoint complete, Stop Geo-replication Usage: python /usr/share/glusterfs/scripts/schedule_georep.py <MASTERVOL> \ <SLAVEHOST> <SLAVEVOL> For example, python /usr/share/glusterfs/scripts/schedule_georep.py gv1 fvm1 gv2 To schedule the Geo-replication to run once in a day using cron, # Run daily at 08:30pm 30 20 * * * root python /usr/share/glusterfs/scripts/schedule_georep.py \ --no-color gv1 fvm1 gv2 >> /var/log/glusterfs/schedule_georep.log 2>&1 BUG: 1309191 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/13279 Change-Id: Ie1507be00afd9ff189bb1664b156328dced4076a Reviewed-on: http://review.gluster.org/13510 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-by: Kotresh HR <khiremat@redhat.com>
* quota: heal object-limit on a root dir of a newly added brickvmallika2016-03-031-33/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/13422 When a new brick is added, xattr trusted.glusterfs.quota.limit-objects is not healed on a root directory. This patch will fix the problem > Change-Id: I776609ebf4d7822c541b6262e63d465ea3a86db4 > BUG: 1306220 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/13422 > Smoke: Gluster Build System <jenkins@build.gluster.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I47412b4da35c0f5d28106020daf32212d267cb9e BUG: 1312954 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13551 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* nfs-ganesha: pcs cluster setup needs '--name' optionSoumya Koduri2016-03-031-8/+1
| | | | | | | | | | | | | | | Even on fedora machines (on f22, f23), pcs cluster setup CLI expects '--name' to be provided. This patch addresses the same. Change-Id: Id33c8bbdc33955dd54729b10c720f4fa646f7e8c BUG: 1314204 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/13590 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* ganesha: Read export_id on each node while performing refresh-configSoumya Koduri2016-02-282-24/+40
| | | | | | | | | | | | | | | | | | As mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1309238#c1, there could be cases which shall result in having different ExportIDs for the same volume on each node forming the ganesha cluster. Hence during refresh-config, it is necessary to read the ExportID on each of those nodes and re-export that volume with the same ID. Change-Id: I44058352fe977ccc649d378da3b68bbfb992fcd7 BUG: 1309238 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/13459 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: reliable grace using pacemaker notify actionsKaleb S KEITHLEY2016-02-264-306/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Change-Id: Iad60b0c5222bbd55ef95c8b8f955e791caa3ffd0 BUG: 1290865 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>
* quota: fix quota hook script for add-brickvmallika2016-02-101-26/+25
| | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13110/ Hook script should not call any CLI commands as this can cause parallel operation problem, so remove quota list command from the script > Change-Id: I76a364133403371b172e063abd5f742075b20a2f > BUG: 1294637 >Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I9f2850e53c2ce69b33a82acec3fc739bc5bf54e5 BUG: 1296040 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13182 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-by: Atin Mukherjee <amukherj@redhat.com>
* build: use 'make install' to install the hook scriptsvmallika2016-02-036-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13072 The installation should be the same on all distributions, and doing manual installation of files in the .spec is very ugly. This change adds the rules so that 'make install' places the hook scripts in the right location. Also, the hook script(s) for NFS-Ganesha should be part of the glusterfs-ganesha sub-package and got moved there. > BUG: 1174765 > Change-Id: Iba25a7a5112c7d40db4c10ff4a5ac7a5fb4f7c4e > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/13072 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: I8fade7e9e540eedc1e619f116d356a2b26f599a9 BUG: 1302955 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13313 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* all: reduce "inline" usageKaleb S KEITHLEY2016-01-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There are three kinds of inline functions: plain inline, extern inline, and static inline. All three have been removed from .c files, except those in "contrib" which aren't our problem. Inlines in .h files, which are overwhelmingly "static inline" already, have generally been left alone. Over time we should be able to "lower" these into .c files, but that has to be done in a case-by-case fashion requiring more manual effort. This part was easy to do automatically without (as far as I can tell) any ill effect. In the process, several pieces of dead code were flagged by the compiler, and were removed. backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155, http://review.gluster.org/11769, BUG: 1245331 Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44 BUG: 1283302 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12646 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-by: Niels de Vos <ndevos@redhat.com>
* scripts: prevent running 'showmount' from the start/post hook scriptNiels de Vos2016-01-141-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 31ganesha-start.sh hook script tries to run 'showmount' to see if the volume that is getting started should get exported by NFS-Ganesha. It was reported that this caused the 'gluster volume start ...' command to hang in case rpcbind is not running. Instead of running 'showmount', we can use DBus to contact NFS-Ganesha directly, and request the available exports. This will immediately fail in case NFS-Ganesha is not running. Cherry picked from commit 2b2294d2a4ef221fccb6eb9f74e9b7dc233b9f1d: > BUG: 1294446 > Change-Id: I3aba1f86fead67116ca5adb1864a8be626c334fa > Reported-by: Jeff Darcy <jdarcy@redhat.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/13098 > Tested-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> BUG: 1297862 Change-Id: I3aba1f86fead67116ca5adb1864a8be626c334fa Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13230 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* extras: fix deprecation warining in checkpatch.plMichael Adam2016-01-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left braces in patterns need to be escaped. Otherwise, for perl >= 5.16, we get a warning: "Unescaped left brace in regex is deprecated, passed through in regex;" This patch fixes the relevant braces. Hence perl -c ./examples/checkpatch.pl is clean again. > Change-Id: I938c9c262239f53de57d30a2cff7030f22e63dc1 > BUG: 1198849 > Signed-off-by: Michael Adam <obnox@samba.org> > Reviewed-on: http://review.gluster.org/12828 > Reviewed-by: Anoop C S <anoopcs@redhat.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> (cherry picked from commit 2e9376a2f1b992d3649dd1d5a8e844b4c031ef3c) Change-Id: I2a38e8e2d0652af519bf139ec046edc42c5e5356 BUG: 1290534 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12942 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* hook-scripts: fix S30Samba scripts on systemd systemsMichael Adam2015-12-183-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | /etc/init.d/smb does not exist on systemd systems. Using "service smb <COMMAND>" is the portable way. It calls init scripts on sysv systems, and redirects to systemctl on systemd systems. > Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615 > BUG: 1290604 > Signed-off-by: Michael Adam <obnox@samba.org> > Reviewed-on: http://review.gluster.org/12945 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Anoop C S <anoopcs@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Niels de Vos <ndevos@redhat.com> (cherry picked from commit ce3ff7e328483dffdae6ae2914924bc2380db67e) Change-Id: Ied6b5fe330f8d29df10a9aea1809be5c5f0c8a5e BUG: 1292755 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13000 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* hook-scripts: don't let ctdb script change samba configMichael Adam2015-12-182-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several reasons why the behaviour in the hook scripts was bad: 1. A samba installation is clustered or non-clustered. That does not change because of the availability of the CTDB lock-volume. If the lock-volume is not available (and hence CTDB is not available or not healthy), then Samba won't be operational. But turning it into a non-clustered Samba-installation can in the worst case lead to data corruption if clients manage to access the same files (on share volumes). Hence 'clustering = yes/no' in Samba's config should not be touched. In particular, Samba should not be stopped/started by the hook script. If needed, then ctdb will take care of it. 2. Changing the idmap configuration is potentially dangerous as well. In particular the used tdb2 backend is legacy nowadays and should not be used any more in new installs. (I stems from the times when ctdb could not host persistent databases.) Changing the idmap can result in loss of access to files or in giving access to files where it is not intended. 3. The pattern used for detecting need for change is fragile. It may or may not play well possible manual changes to smb.conf. This change removes the parts that change the smb.conf file and start or stop Samba from the S29CTDB* hook scripts. > Change-Id: I72f7aabafa8f089da4531fca2572a72c22825bcc > BUG: 1290151 > Signed-off-by: Michael Adam <obnox@samba.org> > Reviewed-on: http://review.gluster.org/12930 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> (cherry picked from commit 27c16d6da82876a689dfba53b8d45c3a3a657954) Change-Id: Ie1f787cebb5f6da1a658f7dead879fa854901ef5 BUG: 1292254 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12986 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* glusterd: disable ping timer b/w glusterd and make epoll thread count to 1Gaurav Kumar Garg2015-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12874/ Currently glusterd is crashing when enable/disable heal and i/o is in progress on the fuse mount. This is because of by default multi thread epoll in glusterd is 2. Workaround is to make epoll thread to 1 and set ping-timeout to 0 >> Change-Id: Ifbe9b43a361c5409b707539f0ee831c610a5c36b >> BUG: 1288059 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Change-Id: Ifbe9b43a361c5409b707539f0ee831c610a5c36b BUG: 1288060 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12875 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/geo-rep: Adding ssh-port option for geo-rep createKotresh HR2015-11-231-7/+21
| | | | | | | | | | | | | | | | | | | | | | Geo-replication uses default ssh port 22 for setup. i.e., to distribute ssh keys to slaves. In container environments, custom port number might be used. Hence to support custom port number for ssh, option is provided in geo-rep create command to take the same. Change-Id: I0fb61959b1c085342b8e4c21ac4e076fba5462f1 BUG: 1283060 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12504 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> (cherry picked from commit 5bb3c521431cc27b2826acd889bffb2f90ae7f73) Reviewed-on: http://review.gluster.org/12652 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd.service: Ensure rpcbind is started before glusterdNiels de Vos2015-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the rpcbind.service under the `After` option only ensures that glusterd.service is started after rpcbind.service if both are enabled/started at the same time. It doesn't ensure that starting glusterd.service will start rpcbind.service. The systemd.unit(5) man page suggests to use both the `Requires` and `After` options to ensure that rpcbind is started before glusterd, whenever glusterd is started. Cherry picked from commit 23440a73bc348bbc3bb43ec397f0639ee45865fc: > BUG: 1282915 > Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9 > Signed-off-by: Kaushal M <kaushal@redhat.com> > Reviewed-on: http://review.gluster.org/12605 > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9 BUG: 1283142 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12640 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* extras/hooks: Fix parsing of args in S30samba-set.shRaghavendra Talur2015-11-151-5/+9
| | | | | | | | | | bug: 1243041 Change-Id: I75756f44757a144b0ed229fcc0e29a273fc75886 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11669 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* extras: Exit with SUCCESS if no processes to stopShubhendu Tripathi2015-11-111-2/+12
| | | | | | | | | | | | | | | | | This script might be executed even when there are no valid processes running to be stopped. In this scenario, the script should return with SUCCESS Change-Id: Ia293214a4b5052bc4bef9769f197f7b05c55ffe9 BUG: 1279776 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: http://review.gluster.org/11739 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12564 Tested-by: Ramesh N <rnachimu@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* common-ha: Corrected refresh-config output parsingSoumya Koduri2015-11-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >>>> Sample program with the earlier changes - output=$(dbus-send --print-reply --system \ --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \ org.ganesha.nfsd.exportmgr.RemoveExport uint16:5 2>&1\ | grep -v "^method return") ret=$? echo "${output}" echo $ret sleep 1 output=$(dbus-send --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ string:/usr/etc/ganesha/exports/export.vol3.conf \ string:"EXPORT(Path=/vol3)" 2>&1 | grep -v "^method return") ret=$? echo "${output}" echo $ret Output: 1 1 Even if the command was successfully executed, 'grep -v' has filtered out the output. >>>> Sample program with the current changes - output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport\ uint16:5 2>&1) ret=$? echo "${output}" echo $ret sleep 1 output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ string:/usr/etc/ganesha/exports/export.vol3.conf \ string:"EXPORT(Path=/vol3)" 2>&1) ret=$? echo "${output}" echo $ret Output: method return sender=:1.155 -> dest=:1.174 reply_serial=2 0 method return sender=:1.155 -> dest=:1.175 reply_serial=2 string "1 exports added" 0 Change-Id: If9a38e825b2c1a87101de303f9494a0769a9e897 BUG: 1254494 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/12439 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* firewall/spec: Create glusterfs firewall service if firewalld installed.anand2015-10-153-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It creates glusterfs firewall service during installation. glusterfs service : It contains all default ports which needs to be opened. During installation glusterfs.xml is copied into firewall service directory(/usr/lib/firewalld/services/). Note: 1.For bricks: It opens the 512 ports, if brick is running out side this range(>49664) then admin need to open the port for that brick. 2.By default this service is not enabled in any of zone. To enable this service(glusterfs) in firewall: 1. Get active zone(s) in node firewall-cmd --get-active-zones 2. Attached this service(glusterfs) to zone(s) firewall-cmd --zone=<zone_name> --add-service=glusterfs --To apply runtime firewall-cmd --permanent --zone=<zone_name> --add-service=glusterfs --To apply permanent Note: we can also use firewall-config which gives GUI to configure firewall. Backport of: >Change-Id: Id97fe620c560fd10599511d751aed11a99ba4da5 >BUG: 1253967 >Signed-off-by: anand <anekkunt@redhat.com> >Reviewed-on: http://review.gluster.org/11989 >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >(cherry picked from commit 7f327d3b4f9222995d2ee78862e48ca44c28411c) Change-Id: Iacf44b15ffb176c965c7f3b074065a54cf785dc7 BUG: 1057295 Signed-off-by: anand <anekkunt@redhat.com>; Reviewed-on: http://review.gluster.org/12357 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* systemd/spec/glusterd: Adding EnvironmentFile in glusterd systemctrl service ↵anand2015-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | file. Issue: glusterd was not running in debug mode, this is because of "systemctrl start glusterd" was not reading configuration from glusterd-sysconfig file. Fix: Set glusterd-sysconfig file as "EnvironmentFile" and pass args to glusterd. Backport of: >Change-Id: I6a032a2e86e5a25c39199ddf953bfbd6590d53b6 >BUG: 1263087 >Signed-off-by: anand <anekkunt@redhat.com> >Reviewed-on: http://review.gluster.org/12175 >Reviewed-by: Anoop C S <anoopcs@redhat.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >(cherry picked from commit 63e3806ba3c4d5f196ad2254f63d85b79602705a) Change-Id: Ib081a2a4bcfbfc1fe4334da1ec8c1dbab0760657 BUG: 1271540 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/12358 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* common-ha: distribution neutral location of config filesJoe Julian2015-09-293-23/+49
| | | | | | | | | | | | | | work on systems with config files in directories other than /etc/sysconfig. BUG: 1251821 Change-Id: Ie8e0a330810430cbc92499181ab60d79ea43c8f1 Signed-off-by: Joe Julian <me@joejulian.name> Reviewed-on: http://review.gluster.org/12132 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: refresh-config output includes dbus "method return" msgKaleb S. KEITHLEY2015-09-241-16/+18
| | | | | | | | | | | | | filter out extraneous text from dbus-send Change-Id: If8467f8e756584027d36559960fd691dcaf98993 BUG: 1262881 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12174 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com>