1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 18:48:16 +01:00
Commit Graph

109 Commits

Author SHA1 Message Date
Michael Fellinger
1d534b57d2 Fix unrecognized flags in ganesha start hook (#2375)
Also fixes all issues pointed out by shellcheck
2021-05-23 06:52:04 +05:30
Nikhil Ladha
1c76135209 glusterd: Fix for shared storage in ipv6 env (#1972)
Change-Id: Ib38993724c709b35b603f9ac666630c50c932c3e
Fixes: #1406
Signed-off-by: nik-redhat <nladha@redhat.com>
2021-01-08 13:12:46 +05:30
Ravishankar N
146b35d1ba extras, tools, doc: remove offensive language
Replace master and slave terminology in geo-replication with primary and
secondary respectively.

Change-Id: I3eb9242d2ce8340435265b764d28221d50f872c8
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
2020-12-30 15:55:22 +05:30
Ravishankar N
aa29aaf1c9 cli/glusterd: conscious language changes for geo-rep
Replace master and slave terminology in geo-replication with primary and
secondary respectively.

All instances are replaced in cli and glusterd.

Changes to other parts of the code to follow in separate patches.
tests/00-geo-rep/* are passing thus far.

Updates: #1415
Change-Id: Ifb12b7f5ce927a4a61bda1e953c1eb0fdfc8a7c5
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
2020-12-30 15:55:22 +05:30
Shwetha K Acharya
3d2de9d89b nfs-ganesha: gluster_shared_storage fails to automount on node reboot on rhel 8
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>
2020-09-10 13:16:12 +05:30
Shwetha K Acharya
254f865037 geo-rep: gluster_shared_storage fails to automount on node reboot on rhel 8.
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>
2020-08-31 20:08:39 +05:30
nik-redhat
047140b93f glusterd: shared storage mount fails in ipv6 environment
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>
2020-07-30 13:04:52 +05:30
Anoop C S
98d0f1f31e extras/hooks: Remove smb.conf parameter allowing guest access
Change-Id: I88f494f16153d27ab6e2f2faf4d557e075671b10
Fixes: bz#1775612
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2019-11-22 17:36:55 +05:30
Jiffin Tony Thottan
e22ad31d47 Revert "packaging: (ganesha) remove glusterfs-ganesha subpackage and related 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>
2017-10-16 14:18:31 +05:30
yinkui
6b429aff1d gluster-smb:add smb parameter when access gluster by cifs
Change-Id: I9ff54f2ca6f86bb5b2f4740485a0159e1fd7785f
Fixes: bz#1741734
Signed-off-by: yinkui <13965432176@163.com>
2019-08-16 10:15:07 +08:00
Anoop C S
f841cab74a extras/hooks: Install and package newly added post add-brick hook script
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>
2019-06-12 15:41:27 +05:30
Anoop C S
f00ac55679 extras/hooks: Add SELinux label on new bricks during add-brick
Change-Id: Ifd8ae5eeb91b968cc1a9a9b5d15844c5233d56db
fixes: bz#1717953
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2019-06-06 18:33:19 +05:30
Xavier Hernandez
eb1845d162 tests: improve and fix some test scripts
Change-Id: Iceefe22af754096c599dc570d4894d14fce4deae
Updates: bz#1193929
Signed-off-by: Xavier Hernandez <xhernandez@redhat.com>
2018-01-19 12:18:13 +01:00
Milan Zink
6d34960bc7 extras/hooks: syntactical errors in SELinux hooks, scipt logic improved
Fixes: bz#1542072
Change-Id: Ia5fa1df81bbaec3a84653d136a331c76b457f42c
Signed-off-by: Milan Zink <zeten30@gmail.com>
2018-02-05 15:04:37 +01:00
Sunny Kumar
df6f9f7a60 geo-rep : fix slave volume read-only option
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>
2018-12-17 14:07:27 +05:30
Harpreet Kaur
38ad4b50b6 geo-rep: Make slave volume read-only (by default)
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>
2018-11-28 14:06:36 +05:30
Milan Zink
25ac2b002b Do not blindly add volume share section to smb.conf
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
2018-01-16 13:48:49 +01:00
Anoop C S
7df25c74a7 extras/hooks: General improvements to S30samba-start.sh
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>
2018-09-09 11:39:47 +05:30
Kaleb S. KEITHLEY
e7ff038968 core: python3
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>
2018-08-29 11:09:27 -04:00
Kotresh HR
baf5e4a0a1 geo-rep/hook-script: Fix ssh/scp options
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>
2018-07-31 10:27:03 -04:00
Anoop C S
bee3b7b9ab extras/hooks: Do not blindly remove volume share from smb.conf
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>
2018-03-21 13:09:01 +05:30
Kaleb S. KEITHLEY
7a8418e31f core/build/various: python3 compat, prepare for python2 -> python3
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>
2018-03-28 10:14:39 -04:00
Atin Mukherjee
3e1fba4366 hooks: fix workdir in S13create-subdir-mounts.sh
Change-Id: Id3eff498091ad9fa4651e93b66903426e76776d6
BUG: 1549915
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2018-03-06 21:59:44 +05:30
Amar Tumballi
b766c78212 hooks: add a script to stat the subdirs in add-brick
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>
2017-11-03 11:49:42 +05:30
Niels de Vos
21595abf2b build: add --without-server option
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>
2018-01-31 16:38:34 +01:00
Milan Zink
4f3ac29caa extras/hooks: Fix S10selinux-label-brick.sh hook script
* 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>
2018-01-10 13:04:42 +01:00
Milan Zink
aa85c27b8e Fix disabled-quota-root-xattr-heal.sh hook script
Fixing all shellchek warnings and POSIX incomapatibilities

Change-Id: I35772bfcf7344c6ed9bd2a7db300c8f58bd3b243
BUG: 1500649
Signed-off-by: Milan Zink <zeten30@gmail.com>
2018-01-11 11:43:40 +01:00
Kotresh HR
fee58ded95 tests: Enable geo-rep test cases
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>
2017-08-11 04:55:18 -04:00
Anoop C S
2d49b79b19 extras/hooks: Honour all input arguments to scripts
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>
2017-10-25 12:21:12 +05:30
Anoop C S
3870d5f867 extras/hooks: Fix getopt usage
`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>
2017-10-19 13:40:35 +05:30
Anoop C S
b71290f30b extras/hooks: Fix errors reported via shellcheck utility
Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa
BUG: 1500649
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-10-11 13:29:13 +05:30
Sanoj Unnikrishnan
f36ffb0a36 Heal root xattr correctly upon an add-brick operation
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>
2017-07-19 18:40:38 +05:30
Kaleb S. KEITHLEY
6cec7e367a scripts: invalid test(1) in extras/S32gluster_enable_shared_storage.sh
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>
2017-07-31 09:48:09 -04:00
Kaleb S. KEITHLEY
9f47dbc3da extras/hookscripts: non-portable shell syntax
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>
2017-06-01 07:05:42 -04:00
Brian Foster
e45a60240b extras/hook-scripts: SELinux brick file context management scripts
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>
2014-01-02 14:03:18 -05:00
Anoop C S
6a3813b518 extras/hooks: Use double quotes while using [..]
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>
2017-04-27 14:34:08 +05:30
Kaleb S. KEITHLEY
0b9af536ba packaging: (ganesha) remove glusterfs-ganesha subpackage and related files)
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>
2017-02-01 07:50:17 -05:00
Jiffin Tony Thottan
3023b9abe6 ganesha/scripts : find export id for already exported volume in 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>
2016-12-06 13:38:21 +05:30
Jiffin Tony Thottan
45e7b92ae2 glusterd/ganesha : handle volume reset properly for ganesha options
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>
2016-11-23 16:04:26 +05:30
Jiffin Tony Thottan
bc41e94767 ganesha/scripts : avoid incrementing Export Id value for already exported 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>
2016-11-28 19:18:51 +05:30
Jiffin Tony Thottan
9c1865199d ganesha/scripts : use export id for dbus signals
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>
2016-10-28 17:37:39 +05:30
Jiffin Tony Thottan
bfb58d741f ganesha/scripts : modify start hook script for shared storage changes
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>
2016-09-20 12:50:55 +05:30
Kaleb S KEITHLEY
43a6709234 core: assorted typos and spelling mistakes reported by Debian lintian
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>
2016-05-17 09:22:43 -04:00
jiffin tony Thottan
83b09addff Revert "NFS-Ganesha : scripts related changes for supporting multiple export 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>
2016-03-10 04:03:19 -08:00
Jiffin Tony Thottan
217968fefc NFS-Ganesha : scripts related changes for supporting multiple export entires 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>
2016-01-22 17:47:07 +05:30
vmallika
555ed1efa0 quota: heal object-limit on a root dir of a newly added brick
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>
2016-02-10 16:27:05 +05:30
vmallika
7bb677d459 quota: fix quota hook script for add-brick
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>
2015-12-29 17:35:30 +05:30
Michael Adam
3690138003 hook-scripts: S29CTDBsetup: clean and fix mount commands and options
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>
2016-01-04 18:50:38 +01:00
Niels de Vos
b60e340b6d scripts: prevent running 'showmount' from the start/post hook script
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>
2015-12-28 10:26:20 +01:00
Michael Adam
6281f5f40d hook-scripts: remove RHS-2.0 reference from S29CTDB scripts
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>
2016-01-04 18:21:51 +01:00