summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts
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>
* geo-rep: gluster_shared_storage fails to automount on node reboot on rhel 8.Shwetha K Acharya2020-09-101-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Issue: On reboot, all the mounts get wiped out. Only the mounts mentioned in /etc/fstab automatically gets mounted during boot/reboot. But /etc/fstab complains on not getting a canonical path (it gets path containing a symlink) This is because the gluster_shared_storage, is mounted to /var/run which is symlink to /run. This is a general practice followed by most operating systems. [root@ ~]# ls -lsah /var/run 0 lrwxrwxrwx. 1 root root 6 Jul 22 19:39 /var/run -> ../run Fix: Mount gluster_shared_storage on /run. (Also It is seen that /var/run is mostly used by old or legacy systems, thus it is a good practice to update /var/run to /run) fixes: #1459 Change-Id: I8c16653be8cd746c84f01abf0eea19284fb97c77 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* glusterd: shared storage mount fails in ipv6 environmentnik-redhat2020-08-181-1/+8
| | | | | | | | | | | | | | | | | Issue: In case of ipv6 environment, the mounting of glusterd_shared_storage volume fails as it doesn't recognises the ipv6 enviornment. Fix: In case of ipv6 environment, the address-family is passed to the hooks script on creating shared-storage, then depending upon the address-family --xlator-option=transport.address-family=inet6 option is added to the mount command, and the mounting succeeds. Fixes: #1406 Change-Id: Ib1888c34d85e6c01618b0ba214cbe1f57576908d Signed-off-by: nik-redhat <nladha@redhat.com>
* extras/hooks: Remove smb.conf parameter allowing guest accessAnoop C S2019-12-102-2/+0
| | | | | | Change-Id: I88f494f16153d27ab6e2f2faf4d557e075671b10 Fixes: bz#1775612 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* Revert "packaging: (ganesha) remove glusterfs-ganesha subpackage and related ↵Jiffin Tony Thottan2019-08-242-1/+123
| | | | | | | | | | | | | | | | | | | 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>
* gluster-smb:add smb parameter when access gluster by cifsyinkui2019-08-212-0/+2
| | | | | | Change-Id: I9ff54f2ca6f86bb5b2f4740485a0159e1fd7785f Fixes: bz#1741734 Signed-off-by: yinkui <13965432176@163.com>
* extras/hooks: Install and package newly added post add-brick hook scriptAnoop C S2019-06-191-2/+2
| | | | | | | | | | | | https://review.gluster.org/c/glusterfs/+/22834 added a new SELinux hook script as a post add-brick operation to label new brick paths. But the change failed to install and package new script. Therefore making necessary changes to Makefile and spec file to get it installed and packaged. Change-Id: I67b8f4982c2783c34a4bc749fb4387c19a038225 fixes: bz#1717953 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Add SELinux label on new bricks during add-brickAnoop C S2019-06-121-0/+100
| | | | | | Change-Id: Ifd8ae5eeb91b968cc1a9a9b5d15844c5233d56db fixes: bz#1717953 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* tests: improve and fix some test scriptsXavier Hernandez2019-05-091-13/+17
| | | | | | Change-Id: Iceefe22af754096c599dc570d4894d14fce4deae Updates: bz#1193929 Signed-off-by: Xavier Hernandez <xhernandez@redhat.com>
* extras/hooks: syntactical errors in SELinux hooks, scipt logic improvedMilan Zink2019-04-182-30/+43
| | | | | | Fixes: bz#1542072 Change-Id: Ia5fa1df81bbaec3a84653d136a331c76b457f42c Signed-off-by: Milan Zink <zeten30@gmail.com>
* geo-rep : fix slave volume read-only optionSunny Kumar2018-12-171-1/+1
| | | | | | | | | | | | Problem: When separate ssh key is given for non root user setting slave volume read-only option results in failure. Solution: Check for extra param in case separate key is given for non-root user and take action accordingly. Change-Id: Iafe9a2aa6b86cde1dcd7d63771048a6ae33c2cde fixes: bz#1659971 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* geo-rep: Make slave volume read-only (by default)Harpreet Kaur2018-12-071-0/+2
| | | | | | | | | | | | | | | Added a command to set "features.read-only" option to a default value "on" for slave volume. Changes are made in: $SRC//extras/hook-scripts/S56glusterd-geo-rep-create-post.sh for root geo-rep and $SRC/geo-replication/src/set_geo_rep_pem_keys.sh for non-root geo-rep. Fixes: bz#1654187 Change-Id: I15beeae3506f3f6b1dcba0a5c50b6344fd468c7c Signed-off-by: Harpreet Kaur <hlalwani@redhat.com>
* Do not blindly add volume share section to smb.confMilan Zink2018-12-042-5/+26
| | | | | | | | | | | | | With this change, by default GlusterFS volume share section will no longer be added to smb.conf for client access unless user.cifs or user.smb volume set options are enabled. This also fixes the hook script to check for presence of all configuration possibilities for those volume set options like 'enable' or 'on'. Change-Id: Ibecf7fffb4507d7255d963c3b1482afb0d0db984 Signed-off-by: Milan Zink <mzink@redhat.com> Signed-off-by: Anoop C S <anoopcs@redhat.com> Fixes: bz#1575836
* extras/hooks: General improvements to S30samba-start.shAnoop C S2018-09-141-13/+13
| | | | | | | | | Based on https://review.gluster.org/c/glusterfs/+/19204 from Milan Zink <mzink@redhat.com> Change-Id: I61f62407a62475a74a6cc046c24748a31c66e6cd Updates: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* core: python3Kaleb S. KEITHLEY2018-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see https://review.gluster.org/#/c/19788/, https://review.gluster.org/#/c/19871/, https://review.gluster.org/#/c/19952/, https://review.gluster.org/#/c/20104/, https://review.gluster.org/#/c/20162/, https://review.gluster.org/#/c/20185/, https://review.gluster.org/#/c/20207/, https://review.gluster.org/#/c/20227/, https://review.gluster.org/#/c/20307/, https://review.gluster.org/#/c/20320/, https://review.gluster.org/#/c/20332/, https://review.gluster.org/#/c/20364/, https://review.gluster.org/#/c/20441/, and https://review.gluster.org/#/c/20484 shebangs changed from /usr/bin/python2 to /usr/bin/python3. (Reminder, various distribution packaging guidelines require use of explicit python version and don't allow '#!/usr/bin/env python', regardless of how handy that idiom may be.) glusterfs.spec(.in) package python{2,3}-gluster and python2 or python3 dependencies as appropriate. configure(.ac): + test for and use python2 or python3 as appropriate. If build machine has python2 and python3, use python3. Override by setting PYTHON=/usr/bin/python2 when running configure. + PYTHONDEV_CPPFLAGS from python[23]-config --includes is a better match to the original python sysconfig.get_python_inc(). All those other extraneous flags breaks the build. + Only change the shebangs once. Changing them over and over again, e.g., during a `make glusterrpms` in extras/LinuxRPM just sends make (is it really make that's looping?) into an infinite loop. If you figure out why, let me know. + Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie). Everything else has 2.7 or 3.x + logic from https://review.gluster.org/c/glusterfs/+/21050, which needs to be removed/merged after that patch is merged. Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the mysterious RHEL > 7. Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* geo-rep/hook-script: Fix ssh/scp optionsKotresh HR2018-08-031-11/+12
| | | | | | | | | | | | | | Always use ssh and scp with "-oPasswordAuthentication=no" and "-oStrictHostKeyChecking=no" options. It might hang the post script otherwise leading geo-rep setup failure Also increased geo-rep timeout. Occasionally, it's taking more time to reach Active/Passive status. Especially, the first start after create. fixes: bz#1610405 Change-Id: I9560d64dbe0edf5db73446a9fc97dda19b88d233 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* extras/hooks: Do not blindly remove volume share from smb.confAnoop C S2018-05-073-9/+12
| | | | | | | | | | | | | | | | | When Gluster volumes are shared via Samba, any extra smb.conf parameter setting done by administrator to those shares are lost during restart of the volume. Instead of removing the whole share completely from smb.conf(via hook scripts during volume stop) it is better to make it temporarily unavailable to end-users till the volume is started again. Therefore we make use of a smb.conf parameter named 'available'[1] to achieve the above intend. [1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530 fixes: bz#1558921 BUG: 1558921 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* core/build/various: python3 compat, prepare for python2 -> python3Kaleb S. KEITHLEY2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note 1) we're not supposed to be using #!/usr/bin/env python, see https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Shebang_lines Note 2) we're also not supposed to be using "!/usr/bin/python, see https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out The previous patch (https://review.gluster.org/19767) tried to do too much in one patch, so it was abandoned. This patch does two things: 1) minor cleanup of configure(.ac) to explicitly use python2 2) change all the shebang lines to #!/usr/bin/python2 and add them where they were missing based on warnings emitted during rpmbuild. In a follow-up patch python2 will eventually be changed to python3. Before that python2-isms (e.g. print, string.join(), etc.) need to be converted to python3. Some of those can be rewritten in version agnostic python. E.g. print statements become print() with "from __future_ import print_function". The python 2to3 utility will be used for some of those. Also Aravinda has given guidance in the comments to the first patch for changes. updates: #411 Change-Id: I471730962b2526022115a1fc33629fb078b74338 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* hooks: fix workdir in S13create-subdir-mounts.shAtin Mukherjee2018-03-071-1/+1
| | | | | | Change-Id: Id3eff498091ad9fa4651e93b66903426e76776d6 BUG: 1549915 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* hooks: add a script to stat the subdirs in add-brickAmar Tumballi2018-03-062-2/+88
| | | | | | | | | | | | | | | | | | | | | | The subdirectories are expected to be present for a subdir mount to be successful. If not, the client_handshake() itself fails to succeed. When a volume is about to get mounted first time, this is easier to handle, as if the directory is not present in one brick, then its mostly not present in any other brick. In case of add-brick, the directory is not present in new brick, and there is no chance of healing it from the subdirectory mount, as in those clients, the subdir itself will be 'root' ('/') of the filesystem. Hence we need a volume mount to heal the directory before connections can succeed. This patch does take care of that by healing the directories which are expected to be mounted as subdirectories from the volume level mount point. Change-Id: I2c2ac7b7567fe209aaa720006d09b68584d0dd14 BUG: 1549915 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* build: add --without-server optionNiels de Vos2018-02-197-0/+14
| | | | | | | | | | | | | | | | With Gluster 4.0 we will not provide the server components for EL6 and older. At one point Gluster 4.x will get GlusterD2, which requires Golang tools in the distribution. EL6 does not contain these at the moment. With this change, it is possible to `./configure --without-server` which prevents building glusterd and the xlators for the bricks. Building RPMs can pass `--without server` and the glusterfs-server sub-package will not be created. Change-Id: I97f5ccf9f2c76e60d9af83915fc59fae57ad6d25 BUG: 1074947 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* extras/hooks: Fix S10selinux-label-brick.sh hook scriptMilan Zink2018-01-311-28/+29
| | | | | | | | | | * script was failng due to syntax error * shellcheck issues fixed * improved performance: semanage & restorecon is being run on unique path Change-Id: I58b357d9fd37586004a2a518f7a5d1c5c9ddd7e3 BUG: 1533342 Signed-off-by: Milan Zink <zeten30@gmail.com>
* Fix disabled-quota-root-xattr-heal.sh hook scriptMilan Zink2018-01-301-73/+76
| | | | | | | | Fixing all shellchek warnings and POSIX incomapatibilities Change-Id: I35772bfcf7344c6ed9bd2a7db300c8f58bd3b243 BUG: 1500649 Signed-off-by: Milan Zink <zeten30@gmail.com>
* tests: Enable geo-rep test casesKotresh HR2018-01-051-4/+11
| | | | | | | | | | | | | | | | | This patch re-enables the geo-rep test cases. Along with it does following optimizations. 1. Use EXPECT_WITHIN instead of sleep 2. Clean up geo-rep ssh key after test 3. Changes to gverify.sh and S56glusterd-geo-rep-create-post.sh to use the given ssh identity file for geo-rep create 4. Make gluster-command-dir configurable and introduce slave-gluster-command-dir which points the parent directory of gluster binaries in master and slave respectively. Change-Id: Ia7696278d9dd3ba04224dcd7c3564088ca970b04 BUG: 1480491 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* extras/hooks: Honour all input arguments to scriptsAnoop C S2017-10-314-28/+70
| | | | | | | | | | | | | | | | | Some of the hook scripts were not honouring the arguments with which they are invoked during various volume operations. So make sure that we consider everything while parsing the command line arguments to avoid following warnings: . . . ame: unrecognized option '--first=no' ame: unrecognized option '--version=1' ame: unrecognized option '--volume-op=start' . . . Change-Id: I5b08e5e7f32908c8509e97098a042096b507783e BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Fix getopt usageAnoop C S2017-10-309-9/+9
| | | | | | | | | | | | | | | | | | | | | | | `getopt` does not have an optional argument as '-name'. It should be either '-n' or '--name'(see man getopt(1)). This wrong usage resulted in setting the script name as 'ame' instead of $PROGNAME in most of the hook-scripts. Additionally the following line from DESCRIPTION given for `getopt` shell command expects short options for almost every kind of usage mentioned in SYNOPSIS: . . . If no '-o' or '--options' option is found in the first part, the first parameter of the second part is used as the short options string. . . . Refer http://man7.org/linux/man-pages/man1/getopt.1.html for more clarity on its usage. Change-Id: I95baf5fa8c99025e66b2d83656dd838d4f6048ce BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Fix errors reported via shellcheck utilityAnoop C S2017-10-1810-33/+30
| | | | | | Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa BUG: 1500649 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* Heal root xattr correctly upon an add-brick operationSanoj Unnikrishnan2017-09-142-5/+13
| | | | | | | | | | | | | | | | | | | | | When an add-brick is performed the root path xattr is healed using a hook script. For a volume in stopped state, the hook script is triggered in post op of add-brick. Otherwise, if the volume is in started state the hook script is started on a subsequent volume start. The script unlinks itself after execution. The issue is that current hook script does not work when you have multiple volumes in stopped state. A hook script meant for volume1 can get trigerred during start of volume2. Fix: create separate hook script links for individual volumes. Bug: 1472609 Change-Id: If5f056509505fdbbbf73d3363e9966047ae6a3d3 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com> Reviewed-on: https://review.gluster.org/17824 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* scripts: invalid test(1) in extras/S32gluster_enable_shared_storage.shKaleb S. KEITHLEY2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | test(1) man pages says -eq is for INTEGER compares, and = is for string compares. Also note the comment that -a and -o are ambiguous and to use test && test or test || test instead. This bug has existed since 2015! (yikes) Found while testing localtime logging and running glusterd in the foreground. Change-Id: Ia544f7295e247b981504d085ebc4c533ab60ba84 BUG: 1476785 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17925 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* extras/hookscripts: non-portable shell syntaxKaleb S. KEITHLEY2017-06-021-2/+2
| | | | | | | | | | | | | | use of "function" is not portable to other shells Reported-by: Patrick Matthäi <pmatthaei@debian.org> Change-Id: I13a0482b387cc3b7a7a57df424e673850603da37 BUG: 1457812 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17443 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* extras/hook-scripts: SELinux brick file context management scriptsBrian Foster2017-05-017-1/+138
| | | | | | | | | | | | | | | | | | | | | | The SELinux policy for gluster defines the glusterd_brick_t type to support server side SELinux (e.g., server side labels). Add convenience hook scripts that users/packagers can install to ensure that new bricks are labeled correctly. The volume create hook script adds a new SELinux file context for each brick path and runs a restorecon to label the brick. The volume delete hook removes the per-brick SELinux file context. Change-Id: I5f102db5382d813c4d822ff74e873a7a669b41db BUG: 1047975 Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/6630 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>
* extras/hooks: Use double quotes while using [..]Anoop C S2017-04-271-1/+1
| | | | | | | | | | | | | | | This avoids the following warning when first operand is null [: =: unary operator expected Change-Id: I5439d8f60a6d9e30e6ba04c16c3de2096a87c38f BUG: 1446126 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/17127 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: Jeff Darcy <jeff@pl.atyp.us>
* packaging: (ganesha) remove glusterfs-ganesha subpackage and related files)Kaleb S. KEITHLEY2017-03-212-123/+1
| | | | | | | | | | | | | | | Indiana Jones and the Temple of Ganesha HA, part two. remove glsuterfs-ganesha subpackage, superceded by storhaug Change-Id: I42a1fc59159add108d77080b9b130696216aa76d BUG: 1418417 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16506 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>
* ganesha/scripts : find export id for already exported volume in ↵Jiffin Tony Thottan2016-12-081-0/+3
| | | | | | | | | | | | | | S31ganesha-start.sh Change-Id: Iada90ed215966d3f526fa20aa5359b67f25a6944 BUG: 1401822 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/16037 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>
* glusterd/ganesha : handle volume reset properly for ganesha optionsJiffin Tony Thottan2016-12-062-52/+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 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>
* ganesha/scripts : avoid incrementing Export Id value for already exported ↵Jiffin Tony Thottan2016-12-011-32/+10
| | | | | | | | | | | | | | | | | | | volumes Currently a volume will unexport when it stops and reexport it during volume start using hook script. And also it increments the value for export id for each reexport. Since a hook script is called from every node parallely which may led inconsistency for export id value. Change-Id: Ib9f19a3172b2ade29a3b4edc908b3267c68c0b20 BUG: 1399186 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15948 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>
* ganesha/scripts : use export id for dbus signalsJiffin Tony Thottan2016-11-171-7/+3
| | | | | | | | | | | | | | | | | 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". 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>
* ganesha/scripts : modify start hook script for shared storage changesJiffin Tony Thottan2016-09-281-1/+1
| | | | | | | | | | | | | Change-Id: Ib8dfe41d06ae0756af8f1c110fc774ac16bdc581 BUG: 1377607 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15535 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* core: assorted typos and spelling mistakes reported by Debian lintianKaleb S KEITHLEY2016-05-181-1/+2
| | | | | | | | | | | | | | | Also missing bang (!) in #!/bin/bash in shell scripts. Change-Id: I567a4be8f0f31f6285550f243fe802895f6bc43b BUG: 1336793 Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14398 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* Revert "NFS-Ganesha : scripts related changes for supporting multiple export ↵jiffin tony Thottan2016-04-241-12/+14
| | | | | | | | | | | | | | | | | | | entires for volume" This reverts change-id I2286af4877f96f4334435818f67beea87efa2b1f. While testing, I had found that ganesha-ha.sh is not working as expected. It is almost equivalent to rewrite entire thing again Change-Id: Ia85e50fe8e043e8a2bc6441b7c45dcc726b36672 BUG: 1275966 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13673 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Soumya Koduri <skoduri@redhat.com> Reviewed-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : scripts related changes for supporting multiple export entires ↵Jiffin Tony Thottan2016-03-011-14/+12
| | | | | | | | | | | | | | | | for volume Previously script such as dbus-send.sh, ganesha-ha.sh can handle only one EXPORT{} block. Change-Id: I2286af4877f96f4334435818f67beea87efa2b1f BUG: 1275966 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13283 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> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* quota: heal object-limit on a root dir of a newly added brickvmallika2016-02-271-33/+28
| | | | | | | | | | | | | | | 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>
* quota: fix quota hook script for add-brickvmallika2016-02-081-26/+25
| | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/13110 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>
* hook-scripts: S29CTDBsetup: clean and fix mount commands and optionsMichael Adam2016-01-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This refactors the mount options of S29CTDBstart.sh into one variable, removing the superfluous mentioning of 'default'. The manual mount command is fixed to: - also use the common options, thereby adding _netdev,transport=tcp (while this does not have an effect for the _netdev option, it makes a difference for the transport option), - also use the HOSTNAME variable just like the fstab entry, - use a "/" in the remote location specification. Hence it now behaves identically to the fstab mount. Change-Id: Ibb7613b1b1278ab13745846baa79268db226ef19 BUG: 1295520 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13170 Tested-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@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: Niels de Vos <ndevos@redhat.com>
* scripts: prevent running 'showmount' from the start/post hook scriptNiels de Vos2016-01-121-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. 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>
* hook-scripts: remove RHS-2.0 reference from S29CTDB scriptsMichael Adam2016-01-112-2/+1
| | | | | | | | | | | | | This is old. And such downstream reference should not appear in upstream code. Change-Id: Ifa0664dae0fe5ac913a49afe2fefa43b0112b024 BUG: 1295505 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13169 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* hook-scripts: remove outdated comment from C29CTDB start sciptMichael Adam2016-01-101-2/+0
| | | | | | | | | | | | This script does not change Samba's config any more. Change-Id: Ie6001f9a49006f95b291e24252dc362f2a7db14c BUG: 1295504 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build: use 'make install' to install the hook scriptsNiels de Vos2015-12-266-0/+18
| | | | | | | | | | | | | | | | | 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>
* hook-scripts: fix S30Samba scripts on systemd systemsMichael Adam2015-12-173-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>
* hook-scripts: don't let ctdb script change samba configMichael Adam2015-12-162-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>