Commit Graph

497 Commits

Author SHA1 Message Date
Poornima G
056bce103c extras: Ease creation of new xlators
Add a python generator that creates a template for new xlator.

Co-Authored by Jeff Darcy.

Change-Id: I10820c0483794dcd450656684cf954f7b8f159e0
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13061
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: Jeff Darcy <jdarcy@redhat.com>
2016-03-22 11:51:07 -07:00
Soumya Koduri
9879c4e543 ganesha: Include a script to generate epoch value
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: 1317902
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13744
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-21 01:15:04 -07:00
Kaleb S KEITHLEY
53d81d9ece ganesha-ha: merge release-3.7 to master for release-3.8
cherry-pick changes from release-3.7 branch to master in preparation
for 3.8

changes merged/cherry-picked from release-3.7 consist of:

> common-ha: delete virt-IP entry of deleted node
> commit aee983ff43655771a9102592a284d0b0a29ad89f
> BUG: 1250601
>
> common-ha: concise output for HA status
> commit d804b17f2fe92b1516f85f03978072c42ddc6f19
> BUG: 1250628
>
> common-ha : refresh-config should print sensible output
> commit d7adcca24fb9638df2806c01d8ea7e73eec46928
> BUG: 1254494
>
> CommonHA: Avoid scp of the config state to the same host
> commit 07b31a008b59d6c0b06bd17994de85fc56560b38
> BUG: 1259225
>
> CommonHA: Fix the path of 'systemctl' cmd
> commit 8e7ca068720fa6fa50e4746e5b17c305f38171e8
> BUG: 1259225
>
> common-ha: refresh-config output includes dbus "method return" msg
> commit 045cb34238e341d68288893b8f040056e138c04e
> BUG: 1262881
>
> common-ha: distribution neutral location of config files
> commit 6667478cdba920d2658bba2edc99c8f8cc33e271
> BUG: 1251821
>
> common-ha: Corrected refresh-config output parsing
> commit 2892bab69cac2d991509fca1279a659bce1ae793
> BUG: 1254494
>
> common-ha: reliable grace using pacemaker notify actions
> commit e8121c4afb3680f532b450872b5a3ffcb3766a97
> BUG: 1290865
>
> ganesha: Read export_id on each node while performing refresh-config
> commit e0e633cdce7586af92490730257ed7f0cffcff61
> BUG: 1309238
>
> nfs-ganesha: pcs cluster setup needs '--name' option
> commit 812e7321d3c56d329526628fe96a8f6fabea75ca
> BUG: 1314204

Change-Id: I41c19bd369bd9da1092b0677590634a4e9f72813
BUG: 1317424
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13728
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>
2016-03-15 00:26:01 -07:00
Soumya Koduri
f032bc6cae nfs-ganesha: pcs cluster setup needs '--name' option
Even on fedora machines (on f22, f23), pcs cluster setup CLI
expects '--name' to be provided. This patch addresses the same.

BUG: 1314204
Change-Id: If23851bfd7fe2f1c200731d66dcb3e744390ff83
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>
Reviewed-on: http://review.gluster.org/13727
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-15 00:25:38 -07:00
Soumya Koduri
ef1b79a867 ganesha: Read export_id on each node while performing refresh-config
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.

BUG: 1309238
Change-Id: Id39b3a0ce2614ee611282ff2bee04cede1fc129d
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>
Reviewed-on: http://review.gluster.org/13726
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-15 00:25:19 -07:00
Kaleb S KEITHLEY
40a24f5ab9 common-ha: reliable grace using pacemaker notify actions
Using *-dead_ip-1 resources to track on which nodes the ganesha.nfsd
had died was found to be unreliable.

Running `pcs status` in the ganesha_grace monitor action was seen to
time out during failover; the HA devs opined that it was, generally,
not a good idea to run `pcs status` in a monitor action in any event.
They suggested using the notify feature, where the resources on all
the nodes are notified when a clone resource agent dies.

This change adds a notify action to the ganesha_grace RA. The ganesha_mon
RA monitors its ganesha.nfsd daemon. While the daemon is running, it
creates two attributes: ganesha-active and grace-active. When the daemon
stops for any reason, the attributes are deleted. Deleting the
ganesha-active attribute triggers the failover of the virtual IP (the
IPaddr RA) to another node where ganesha.nfsd is still running. The
ganesha_grace RA monitors the grace-active attribute. When the
grace-active attibute is deleted, the ganesha_grace RA stops, and will
not restart. This triggers pacemaker to trigger the notify action in
the ganesha_grace RAs on the other nodes in the cluster; which send a
DBUS message to their ganesha.nfsd.

(N.B. grace-active is a bit of a misnomer. while the grace-active
attribute exists, everything is normal and healthy. Deleting the
attribute triggers putting the surviving ganesha.nfsds into GRACE.)

To ensure that the remaining/surviving ganesha.nfsds are put into
NFS-GRACE before the IPaddr (virtual IP) fails over there is a short
delay (sleep) between deleting the grace-active attribute and the
ganesha-active attribute. To summarize:
  1. on node 2 ganesha_mon:monitor notices that ganesha.nfsd has died
  2. on node 2 ganesha_mon:monitor deletes its grace-active attribute
  3. on node 2 ganesha_grace:monitor notices that grace-active is gone
     and returns OCF_ERR_GENERIC, a.k.a. new error. When pacemaker
     tries to (re)start ganesha_grace, its start action will return
     OCF_NOT_RUNNING, a.k.a. known error, don't attempt further
     restarts.
  4. on nodes 1, 3, etc., ganesha_grace:notify receives a post-stop
     notification indicating that node 2 is gone, and sends a DBUS
     message to its ganesha.nfsd putting it into NFS-GRACE.
  5. on node 2 ganesha_mon:monitor waits a short period, then deletes
     its ganesha-active attribute. This triggers the IPaddr (virt IP)
     failover according to constraint location rules.

ganesha_nfsd modified to run for the duration, start action is invoked
to setup the /var/lib/nfs symlink, stop action is invoked to restore it.
ganesha-ha.sh modified accordingly to create it as a clone resource.

BUG: 1290865
Change-Id: I1ba24f38fa4338b3aeb17c65645e9f439387ff57
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12964
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: http://review.gluster.org/13725
2016-03-14 21:34:27 -07:00
Soumya Koduri
7240923a55 common-ha: Corrected refresh-config output parsing
>>>> 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

BUG: 1254494
Change-Id: I44fbe32588ec11f087c8b99b2d55ed55ba73727c
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>
Reviewed-on: http://review.gluster.org/13724
Tested-by: Kaleb KEITHLEY <kkeithle@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>
2016-03-14 21:34:01 -07:00
Joe Julian
6d83559ea4 common-ha: distribution neutral location of config files
work on systems with config files in directories other than
/etc/sysconfig.

BUG: 1251821
Change-Id: I009946623b508ba422a4881913455218d8846055
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>
Reviewed-on: http://review.gluster.org/13723
Tested-by: Kaleb KEITHLEY <kkeithle@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>
2016-03-14 21:33:37 -07:00
Kaleb S. KEITHLEY
932ef7d760 common-ha: refresh-config output includes dbus "method return" msg
filter out extraneous text from dbus-send

BUG: 1262881
Change-Id: I2fec5c0cc8d1db0a12a42ca2d727a4320fd57b30
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>
Reviewed-on: http://review.gluster.org/13722
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>
2016-03-14 21:30:14 -07:00
Soumya Koduri
bcb3f9ba2b CommonHA: Fix the path of 'systemctl' cmd
'systemctl' command path should be '/usr/bin/sytemctl'.
Fixed the typo in the HA-script.

BUG: 1259225
Change-Id: I0e7fcc1eb74419679d78d4cc61253c6edf23b57b
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/12089
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-on: http://review.gluster.org/13721
Tested-by: Kaleb KEITHLEY <kkeithle@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>
2016-03-14 21:27:04 -07:00
Soumya Koduri
5154e581ae CommonHA: Avoid scp of the config state to the same host
During add-node, have seen an issue where in scp doesn't work
if the source and destination host are same. Fixed the same.

BUG: 1259225
Change-Id: Ib8fe21b3c95d653c62698310d5390b46a3c6bbf4
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/12091
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: http://review.gluster.org/13720
Tested-by: Kaleb KEITHLEY <kkeithle@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>
2016-03-14 21:25:32 -07:00
Meghana M
dd1201e01f common-ha : refresh-config should print sensible output
ganesha-ha.sh --refresh-config printed the dbus-send output
messages as is on the console. Improving the output
of the operation by redirecting the messages to /var/log/messages
and by checking the exit code of the command executed.

The behaviour is also changed a litlle by exiting
when refresh-config fails on any of the nodes.
We don't want to continue changing config files
on other nodes when refresh-config has already failed
on one of the nodes.

BUG: 1254494
Change-Id: I33a1c0f750695135118b4ad4d5fa038b27bc7fec
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11949
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-on: http://review.gluster.org/13719
Tested-by: Kaleb KEITHLEY <kkeithle@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>
2016-03-14 21:24:54 -07:00
Kaleb S. KEITHLEY
8a5b697456 common-ha: concise output for HA status
filter out unnecessary detail from the HA status

BUG: 1250628
Change-Id: I85fb3aaa3dacee2b1c48f46fb7eef6dc255168bc
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11942
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/13718
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>
2016-03-14 21:23:01 -07:00
Kaleb S. KEITHLEY
4bf4bab995 common-ha: delete virt-IP entry of deleted node
Avoid accumulating invalid/defunct virtual IP entries in the HA
config file.

use correct 'clean' name when adding a node and its virtual IP

Also fix a nit in the sample HA config file

BUG: 1250601
Change-Id: I0e6a251334e854d0003d5930ca804f972900b624
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11841
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13717
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>
2016-03-14 21:22:18 -07:00
Jiffin Tony Thottan
ea00992d3d 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-03-01 00:00:04 -08:00
vmallika
1560286586 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-27 21:30:40 -08:00
Nithin D
46bd29e0f2 glusterd: Bug fixes for IPv6 support
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: Ran manually till tests/basic/rpm.t .
    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

Unit Tests using Ipv6
    peer probe
    add-bricks
    remove-bricks
    create volume
    replace-bricks
    start volume
    stop volume
    delete volume

Change-Id: Iebc96e6cce748b5924ce5da17b0114600ec70a6e
BUG: 1117886
Signed-off-by: Nithin D <nithind1988@yahoo.in>
Reviewed-on: http://review.gluster.org/11988
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>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-02-20 09:16:42 -08:00
Aravinda VK
d7e052ee24 geo-rep: Script to Schedule Geo-replication
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: 1300956
Change-Id: I6b1e2ddbf7fc09ef621499b57ae230fd4dbbd9a6
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/13279
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2016-02-16 22:23:38 -08:00
vmallika
6608b5cc1f 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>
2016-02-08 19:58:56 -08:00
Rajesh Joseph
959785a885 extras/devel-tool: Added gdb_macros for debugging
provided following functions in the script
1) print dictionary (dict_t) items
2) print list members (only address)

Change-Id: I5befb2dcdbf258ab3001ff25212a5862b9cc5321
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/13289
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-02-01 23:43:46 -08:00
Niels de Vos
2e69ae03c3 Point users of glusterfs-hadoop to the upstream project
The code we have in glusterfs-hadoop/ is old and should not be used
anymore. The plugin for Hadoop HCFS is maintained at the
glusterfs-hadoop project on GitHub:

  https://github.com/gluster/glusterfs-hadoop

Removing the old code from the repository, and adding a pointer to the
projects wiki in the MAINTAINERS file.

Change-Id: Ia86d08fb0c73a3f75b706b1e0793e3d7a0f4984c
BUG: 1301352
CC: Jay Vyas <jvyas@redhat.com>
CC: Bradley Childs <bchilds@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13286
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2016-01-30 04:53:27 -08:00
Michael Adam
a0e690fbdf 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-15 05:52:56 -08:00
Niels de Vos
11f6ad26fe scripts: correct the usage of -perm in backend-cleanup.sh
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.

BUG: 1294223
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/13080
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-01-14 03:40:58 -08:00
Niels de Vos
2b2294d2a4 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>
2016-01-12 07:38:22 -08:00
Michael Adam
a249ea5aa7 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-11 01:09:38 -08:00
Michael Adam
1cdea23660 hook-scripts: remove outdated comment from C29CTDB start scipt
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>
2016-01-10 02:52:54 -08:00
Jeff Darcy
f9caa5ef87 extras: add script to analyze regression-test failures
Often a test will fail quite frequently, but not so frequently that it
will fail twice in a row for the same patch.  This allows it to "fly
beneath the radar" for quite a long time, slowing project-wide progress
until somebody crawls through the logs looking for patterns.  This patch
adds a script to automate some of that process.

Change-Id: Ic74fbf6b0bfa34bffd9cb109fd51db019053e2cc
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/12510
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-01-08 03:35:10 -08:00
Niels de Vos
7ab8a1a3f4 build: use 'make install' to install the hook scripts
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>
2015-12-26 09:31:24 -08:00
Michael Adam
ce3ff7e328 hook-scripts: fix S30Samba scripts on systemd systems
/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>
2015-12-17 04:11:36 -08:00
Michael Adam
27c16d6da8 hook-scripts: don't let ctdb script change samba config
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>
2015-12-16 11:13:36 -08:00
Gaurav Kumar Garg
976d2902cb glusterd: disable ping timer b/w glusterd and make epoll thread count to 1
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>
Reviewed-on: http://review.gluster.org/12874
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>
2015-12-03 20:08:22 -08:00
Michael Adam
2e9376a2f1 extras: fix deprecation warining in checkpatch.pl
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>
2015-12-02 04:43:27 -08:00
Kotresh HR
5bb3c52143 glusterd/geo-rep: Adding ssh-port option for geo-rep create
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: 1276028
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>
2015-11-18 11:33:37 -08:00
Kaushal M
23440a73bc glusterd.service: Ensure rpcbind is started before glusterd
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.

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>
2015-11-18 02:21:05 -08:00
Raghavendra Talur
ea7e34f38c extras/hooks: Fix parsing of args in S30samba-set.sh
Change-Id: I75756f44757a144b0ed229fcc0e29a273fc75886
BUG: 1242892
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/11668
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-11-16 05:41:15 -08:00
Niels de Vos
4ac2ff18db build: MKDIR_P is not defined for Makefiles, use mkdir_p instead
Change-Id: Id6d5263eb7b1c53e72a7668e716e9cc4e34b82cd
Reported-by: Milind Changire <mchangir@redhat.com>
BUG: 1198849
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/12553
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-11-10 00:57:44 -08:00
Shubhendu Tripathi
066a45d760 extras: Exit with SUCCESS if no processes to stop
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: 1277533
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>
2015-11-10 00:56:57 -08:00
Richard Wareing
d3e496cbcd debug/io-stats: Add FOP sampling feature
Summary:
- Using sampling feature you can record details about every Nth FOP.
  The fields in each sample are: FOP type, hostname, uid, gid, FOP priority,
  port and time taken (latency) to fufill the request.
- Implemented using a ring buffer which is not (m/c) allocated in the IO path,
  this should make the sampling process pretty cheap.
- DNS resolution done @ dump time not @ sample time for performance w/
  cache
- Metrics can be used for both diagnostics, traffic/IO profiling as well
  as P95/P99 calculations
- To control this feature there are two new volume options:
  diagnostics.fop-sample-interval - The sampling interval, e.g. 1 means
  sample every FOP, 100 means sample every 100th FOP
  diagnostics.fop-sample-buf-size - The size (in bytes) of the ring
  buffer used to store the samples.  In the even more samples
  are collected in the stats dump interval than can be held in this buffer,
  the oldest samples shall be discarded.  Samples are stored in the log
  directory under /var/log/glusterfs/samples.
- Uses DNS cache written by sshreyas@fb.com (Thank-you!), the DNS cache
  TTL is controlled by the diagnostics.stats-dnscache-ttl-sec option
  and defaults to 24hrs.

Test Plan:
- Valgrind'd to ensure it's leak free
- Run prove test(s)
- Shadow testing on 100+ brick cluster

Change-Id: I9ee14c2fa18486b7efb38e59f70687249d3f96d8
BUG: 1271310
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/12210
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-11-01 09:14:34 -08:00
Jiffin Tony Thottan
84367f0c91 extras/hookscripts : introducing additional check in S31ganesha-start.sh
New export file with default configuration will be created for a volume
when it is started again. This patch will create new export file only
when it is not present. This change is required for scenarios such as
snapshot restore , node reboot etc.

Change-Id: I34123911f176dcb29d5c016aa097af3a3b2c727b
BUG: 1261444
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/12159
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-09-24 01:52:44 -07:00
anand
63e3806ba3 systemd/spec/glusterd: Adding EnvironmentFile in glusterd systemctrl service 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.

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>
2015-09-15 06:08:38 -07:00
anand
7f327d3b4f firewall/spec: Create glusterfs firewall service if firewalld installed.
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.



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>
2015-09-10 23:44:50 -07:00
Paul Stauffer
0bd9beabd2 bash-completion: Swap order of characters in egrep bracket expression
With glusterfs-cli installed, bash tab completion fails to work and prints an
error message:

    $ gluster volgrep: Invalid range end
    ^C

The problem is caused by the ordering of characters within an egrep bracket
expression in the "_gluster_completion()" function defined in
/etc/bash_completion.d/gluster.  The file contains this line:

    egrep -ao --color=never "([A-Za-z0-9_-.]+)|[[:space:]]+|." |  \

And egrep is interpreting the "-" character in that bracket expression as
indicating a range is being requested, "_-." Fortunately, "_" actually comes
after ".", this range expression is invalid, and egrep throws the error instead
of silently not doing what was intended.

The fix is simply to swap the positions of "-" and "." in that bracket
expression:

    egrep -ao --color=never "([A-Za-z0-9_.-]+)|[[:space:]]+|." |  \

With this change, bash tab completion works as intended.

Change-Id: Iace2d57a1122b4530987ba6f5f5558b56b094665
BUG: 1243108
Signed-off-by: Paul Stauffer <paulds@horde.com>
Reviewed-on: http://review.gluster.org/11939
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-09-08 07:49:30 -07:00
Jeff Darcy
0773ca67fd all: reduce "inline" usage
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.

Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155
BUG: 1245331
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/11769
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-09-01 04:55:15 -07:00
Avra Sengupta
6cb78f8b74 snapshot/scheduler: Check if volume exists before adding/editing schedules
Before adding or editing a scheduler, check if the volume name provided
in the schedule, exists in the cluster or not.

Added return code VOLUME_DOES_NOT_EXIST(17) for the same.

Change-Id: Ia3fe3cc1e1568ddd10f9193bbf40a098f0fe990a
BUG: 1213349
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11830
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-08-23 23:55:47 -07:00
Avra Sengupta
6bd770c031 snapshot/scheduler: Output correction of initialisation
Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923
BUG: 1218164
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11924
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-08-23 23:34:24 -07:00
Niels de Vos
454bd09b8b rpm: include required directory for glusterfind
The directory was marked as %ghost, which causes the following
installation failure:

  Error unpacking rpm package glusterfs-server-3.8dev-0.446.git45e13fe.el7.centos.x86_64
  error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py;5581f20e: cpio: open

Also, *all* Python files should be part of the RPM package. This
includes generated .pyc and .pyo files.

BUG: 1225465
Change-Id: Iee74905b101912c4a845257742c470c3fe42ce2a
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/11298
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-08-19 03:33:14 -07:00
Kaleb S. KEITHLEY
34517651a6 build: scripts are not installed with +x bit
scripts listed in Makefile.am as foo_DATA, should be foo_SCRIPTS
to be installed +x

Change-Id: Ib9b98efcea968c03b574726bdc0d4f76cdfd1dc1
BUG: 1225018
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11806
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-07-31 07:12:56 -07:00
Gaurav Kumar Garg
890e58f5d4 extra: "enable-shared-storage" key should create shared-storage
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: 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>
2015-07-13 03:25:38 -07:00
Meghana M
3524a03a5e NFS-Ganesha : Add-node does not copy "exports" directory correctly
Add-node logic has to copy the "exports" directory into the
new node in the same path. There was an error in copying to the correct
path. Fixing it.

Change-Id: I539d1d525cc5614594b76f2cff1ac93a926712cf
BUG: 1241895
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11618
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-07-10 07:02:10 -07:00
Meghana M
87bce01f32 NFS-Ganesha : Export fails on RHEL 7.1
We grep for CONFFILE parameter in "/etc/syconfig/ganesha"
file to find out the path of the ganesha config file.
In RHEL 7.1, this parameter does not exist in the file and
we can't find out the ganesha config file. Export
fails invariably due to this. Changing this pattern to
a more generic one and default it to "/etc/ganesha/ganesha.conf"

Change-Id: I4ac97b1b5ee4f5a7e448a351b7c6270385dffe61
BUG: 1241480
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11594
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-07-10 03:03:59 -07:00
Kaleb S. KEITHLEY
ea7161bca1 common-ha: ganesha-ha.sh status tries to read ganesha-ha.conf
status doesn't need to read the config

Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd
BUG: 1241133
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11581
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-07-09 08:01:37 -07:00
Avra Sengupta
8c3cec03e3 snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_file
for writing data into tmp file and then making an atomic rename to
the required filename.

The reason for using this location is that it adheres to
the selinux policies.

Also moving the update of the current_scheduler file,
under the lock so as to avoid multiple writes

Change-Id: I61e62b5daf6f1bce2319f64f7b1dfb8b93726077
BUG: 1239269
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11535
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>
2015-07-08 02:36:44 -07:00
Avra Sengupta
cd43a3e15e glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's brick
The brick path we use to create shared storage is
/var/run/gluster/ss_brick.

The problem with using this brick path is /var/run/gluster
is a tmpfs and all the brick/shared storage data will be wiped
off when the node restarts. Hence using /var/lib/glusterd/ss_brick
as the brick path for shared storage volume as this brick and
the shared storage volume is internally created by us (albeit on
user's request), and contains only internal state data and no user data.

Change-Id: I808d1aa3e204a5d2022086d23bdbfdd44a2cfb1c
BUG: 1218573
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11533
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-07-06 22:52:44 -07:00
Meghana M
8def0f28c9 NFS-Ganesha : Unexport fails after S31ganesha-start script is run
The dbus-send script extracts the export ID from the export config file.
It expects the export ID to be written in a particular format. The post-phase
hook-script created the export file in a different format,and the dbus-send
never gets the correct export ID because of this.
Fixing the issue by replacing the write_conf function in the
S31ganesha-start hook-script.Also, NFS-Ganesha service stops when dbus signal is sent more
than once on the same export. Consecutive start/stop operations creates problems.
Fixing all the issues at once.

Change-Id: Ibf639eb3556b1e51dd8dcb0c784a6a7f07badb97
BUG: 1238054
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11477
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-07-02 04:38:48 -07:00
Soumya Koduri
d56b2eecbb common-ha: Fix '/var/lib/nfs/statd/state' path creation
'/var/lib/nfs/statd/state' which contains NSM state number
should be a file instead of directory.

Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b
BUG: 1237174
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/11468
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
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>
2015-06-30 13:07:27 -07:00
Meghana M
64f36a04d0 NFS-Ganesha : Exporting volume fails
Due to a recent fix, the dbus-send.sh looked
for a .export_added file even before it was
created. This resulted in the ganesha.enable
option failing consistently. Fixing it.

Change-Id: I26a68578551b6e38e49a9997e6f6f983fd668971
BUG: 1236561
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11456
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-29 09:42:56 -07:00
Meghana M
257668d97e NFS-Ganesha : Automatically export volume after volume restart
The export file was not getting created in the correct
path. Fixing the path in this patch.

Change-Id: If624266e1a934514868affb712514881d10239dc
BUG: 1231738
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11432
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>
2015-06-26 18:27:23 -07:00
Kaleb S. KEITHLEY
254218fa39 common-ha: fix delete-node
N.B. delete-node is a designed to be "disruptive"

surgically delete a node from the config and stop nfs-ganesh on that
node.

finish the implementation and fix a few minor issues

Change-Id: I964bb72a76ee635b5fc484ec5b541e69eeececcd
BUG: 1234474
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11353
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-26 12:35:35 -07:00
Kotresh HR
f1139ca4f8 geo-rep: Fix ssh issue in geo-rep
In geo-rep mountbroker setup, workers fails with
'Permission Denied' even though the public keys
are shared to all the slave nodes. The issue
is with selinux context not being set for .ssh
and .ssh/authorizedkeys. Doing restorecon on
these entries to set default selinux security
context fixes the issue.

Change-Id: I75e16d22f7a168de6c13b0c7571a7ab75761ae0d
BUG: 1235359
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11383
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-06-25 04:48:31 -07:00
Meghana M
1ff820381b NFS-Ganesha : Implement refresh-config
It is important that we give an automatic way of refreshing the config
when the user has changed the export file manually.
Without this, the user will be forced to restart the server.
Implementing refresh_config by utilizing two other scripts
that are already in place.
Making a few changes to make sure that "--help"
doesn't throw unnecessary error messages.

Change-Id: I6559b89e858526717168ba286e1ff7d9977097c6
BUG: 1233624
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11331
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-06-24 03:27:19 -07:00
Avra Sengupta
bc6d9d679a gluster/shared_storage: Add/Remove shared storage from /etc/fstab during enable/disable
While creating/deleting shared storage volume, add/remove the shared storage
entry from /etc/fstab, so as to ensure availability of the shared storage,
even after a node reboot

Change-Id: Ib9edc8fd02c74a677062ca53ffd10be997b056c6
BUG: 1231876
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11272
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-06-22 01:56:59 -07:00
Meghana M
e19552c8cc common-ha : Fixing add node operation
Resource create for the added node referenced a variable
new_node that was never passed. This led to a wrong schema
type in the cib file and hence the added node always ended
up in failed state. And also, resources were wrongly
created twice and led to more errors. I have fixed the variable
name and deleted the repetitive invocation of the recreate-resource
function.

The new node has to be added to the existing ganesha-ha config
file for correct behaviour during subsequent add-node operations.
This edited file has to be copied to all the other cluster nodes.
I have added a fix for this as well.

Change-Id: Ie55138e2657d22298d89db1c08f2e17930686bd6
BUG: 1233246
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11316
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-19 06:52:32 -07:00
Kaleb S. KEITHLEY
46bf15e897 common-ha: cluster setup issues on RHEL7
* use --name on RHEL7 (later versions of pcs drop --name) we guessed
   wrong and did not get the version that dropped use of --name option
 * more robust config file param parsing for n/v with ""s in the value
   after not sourcing the config file
 * pid file fix. RHEL6 init.d adds -p /var/run/ganesha.nfsd.pid to
   cmdline options. RHEL7 systemd does not, so defaults to
   /var/run/ganesha.pid.

Change-Id: I575aa13c98f05523cca10c55f2c387200bad3f93
BUG: 1229948
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11257
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-19 01:25:46 -07:00
Kaleb S. KEITHLEY
26f17994a4 common-ha: cluster HA setup sometimes fails
the "s in the VIP_foo="x.x.x.x" lines are problematic now that the
config file isn't sourced.

Revised to also handle names containing '-', e.g. host-11, and FQNs,
e.g. host-11.lab.gluster.org

Change-Id: I1a52afbf398a024cdff851d0c415d8363f699c90
BUG: 1232001
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11281
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-18 10:16:24 -07:00
Kaleb S. KEITHLEY
1b9a2edf2c common-ha: cluster HA setup sometimes fails
the "s in the VIP_foo="x.x.x.x" lines are problematic now that the
config file isn't sourced.

(A short term work-around is to simply eliminate them.)

Change-Id: I65f375f2d3b8453adb45dc3dbbc7d3fb07cf85d0
BUG: 1232001
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11237
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-16 08:16:57 -07:00
Meghana M
4a829e33d9 NFS-Ganesha: Automatically export vol that was exported before vol restart
Consider a volume that is exported via NFS-Ganesha. Stopping this
volume will automatically unexport the volume. Starting this volume
should automatically export it. Although the logic was already there,
there was a bug in it. Fixing the same by introducing a hook script.

Also with the new CLI options, the hook script S31ganesha-set.sh
is no longer required. Hence, removing the same.
Adding a comment to tell the user that one of the CLI
commands will take a few minutes to complete.

Change-Id: Ibff769ca04fef0c2a129c83fe31fc9c869350e8d
BUG: 1231738
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11247
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-06-16 05:50:14 -07:00
Meghana Madhusudhan
5cdbbf34e3 common-ha : Clean up cib state completely
Clean up cluster state on all the machines during tear down.

Change-Id: If9ca65b6ca8790ac97311f33359e28558e90c557
BUG: 1228415
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11231
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-06-15 08:06:55 -07:00
Aravinda VK
d28b226131 tools/glusterfind: Cleanup glusterfind dir after a volume delete
If `glusterfind delete` command was not run before volume delete, stale
session directories exists in /var/lib/glusterd/glusterfind directories.

Also shows these sessions in `glusterfind list`

When Volume is deleted, Post hook will be run which cleans up the stale
session directories

BUG: 1225465
Change-Id: I54c46c30313e92c1bb4cb07918ed2029b375462c
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10944
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-12 03:01:07 -07:00
Kaleb S. KEITHLEY
04791e4d53 common-ha: handle long node names and node names with '-' and '.' in them
sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple
and elegant solution for reading config params, but bash variable names
do not allow '-' and '.' in them.

Also fix incorrect path in shared volume mount

Change-Id: I40140e5da0903221efd316de94dce40229263e15
BUG: 1225572
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11035
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-11 13:12:11 -07:00
meghana
9eef639e19 common-ha : Clean up persistent cib state
Pacemaker saves old configurations in the
directory, "/var/lib/pacemaker/cib". It's
good to clean up this directory during teardown so that
old data doesn't show up the next time.

Change-Id: If0f413ba2da599dd6672b51e60e1d35e674d576b
BUG: 1228415
Signed-off-by: meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11093
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-11 13:07:45 -07:00
Avra Sengupta
71f27128cb snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared storage is available
If shared storage is not accessible, create a flag in /var/run/gluster/
So that when /etc/cron.d/glusterfs_snap_cron_tasks is
available again, the flag will tell us, to reload
/etc/cron.d/glusterfs_snap_cron_tasks

Change-Id: I41b19f57ff0b8f7e0b820eaf592b0fdedb0a5d86
BUG: 1218573
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11139
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-11 00:08:17 -07:00
Avra Sengupta
5b05d3e376 snapshot/scheduler: Check if GCRON_TASKS exists before
accessing it's mtime

Change-Id: I873c83d21620527b20d7de428d11582c5499d1af
BUG: 1228613
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11138
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-10 03:02:20 -07:00
Avra Sengupta
d835219a30 snapshot/scheduler: Handle OSError in os. callbacks
Handle OSError and not IOError in os. callbacks.

Change-Id: I2b5bfb629bacbd2d2e410d96034b4e2c11c4931e
BUG: 1218060
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11087
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-09 23:40:52 -07:00
Avra Sengupta
402589f58c glusterd/shared_storage: Provide a volume set option to create and mount the shared storage
Introducing a global volume set option(cluster.enable-shared-storage)
which helps create and set-up the shared storage meta volume.

gluster volume set all cluster.enable-shared-storage enable

On enabling this option, the system analyzes the number of peers
in the cluster, which are currently connected, and chooses three
such peers(including the node the command is issued from). From these
peers a volume(gluster_shared_storage) is created. Depending on the
number of peers available the volume is either a replica 3
volume(if there are 3 connected peers),  or a replica 2 volume(if there
are 2 connected peers). "/var/run/gluster/ss_brick" serves as the
brick path on each node for the shared storage volume. We also mount
the shared storage at "/var/run/gluster/shared_storage" on all the nodes
in the cluster as part of enabling this option. If there is only one node
in the cluster,  or only one node is up then the command will fail

Once the volume is created, and mounted the maintainance of the
volume like adding-bricks, removing bricks etc., is expected to
be the onus of the user.

On disabling the option, we provide the user a warning, and on
affirmation from the user we stop the shared storage volume, and unmount
it from all the nodes in the cluster.

gluster volume set all cluster.enable-shared-storage disable

Change-Id: Idd92d67b93f444244f99ede9f634ef18d2945dbc
BUG: 1222013
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10793
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-04 02:37:19 -07:00
nnDarshan
b15ee49c94 snapshot/scheduler: Modified main() function to take arguments.
Modified the main function to take script arguments, so that this
script can be used as a module by other programs .

Change-Id: I902f0bc7ddfbf0d335cc087f51b1a7af4b7157fc
BUG: 1220670
Signed-off-by: n Darshan <dnarayan@redhat.com>
Reviewed-on: http://review.gluster.org/10760
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-04 00:00:40 -07:00
Niels de Vos
0209b18fd6 build: fix compiling on older distributions
data-tiering is disabled on RHEL-5 because it depends on a too new
SQLite version.

This change also prevents installing some of files that are used by
geo-replication, which is also not available on RHEL-5. geo-replication
depends on a too recent version of Python.

Due to an older version of OpenSSL, some of the newer functions can not
be used. A fallback to previous functions is done. Unfortunately RHEL-5
does not seem to have TLSv1.2 support, so only older versions can be
used.

Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913
BUG: 1222317
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10803
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-03 06:53:43 -07:00
Avra Sengupta
9798a24feb snapshot/scheduler: Return proper error code in case of failure
ENUM                              RETCODE     ERROR
----------------------------------------------------------
INTERNAL_ERROR                    2           Internal Error
SHARED_STORAGE_DIR_DOESNT_EXIST   3           Shared Storage Dir
                                              does not exist
SHARED_STORAGE_NOT_MOUNTED        4           Shared storage is not mounted
ANOTHER_TRANSACTION_IN_PROGRESS   5           Another transaction is in progress
INIT_FAILED                       6           Initialisation failed
SCHEDULING_ALREADY_DISABLED       7           Scheduler is already disabled
SCHEDULING_ALREADY_ENABLED        8           Scheduler is already enabled
NODE_NOT_INITIALISED              9           Node not initialised
ANOTHER_SCHEDULER_ACTIVE          10          Another scheduler is active
JOB_ALREADY_EXISTS                11          Job already exists
JOB_NOT_FOUND                     12          Job not found
INVALID_JOBNAME                   13          Jobname is invalid
INVALID_VOLNAME                   14          Volname is invalid
INVALID_SCHEDULE                  15          Schedule is invalid
INVALID_ARG                       16          Argument is invalid

Change-Id: Ia1da166659099f4c951fcdb4d755529e41167b80
BUG: 1218055
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11005
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-02 23:49:35 -07:00
Kaleb S. KEITHLEY
751c4583bb common-ha: fix race between setting grace and virt IP fail-over
Also send stderr output of `pcs resource {create,delete} $node-dead_ip-1`
to /dev/null to avoid flooding the logs

Change-Id: I29d526429cc4d7521971cd5e2e69bfb64bfc5ca9
BUG: 1219485
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10646
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: Meghana M <mmadhusu@redhat.com>
2015-06-01 11:13:45 -07:00
Kaleb S. KEITHLEY
54b193760c common-ha: handle long node names and node names with '-' and '.' in them
sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple
and elegant solution for reading config params, but bash variable names
do not allow '-' and '.' in them.

Change-Id: I0d2e6cb21017472b1e0f764335cf28946cca95f0
BUG: 1225572
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10952
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-05-30 05:24:17 -07:00
Aravinda VK
5d912230a7 scripts: Added script stop-all-gluster-processes.sh in rpm
This script was not included as part of rpm. Fixed now

BUG: 1204641
Change-Id: I5e559b187253cc2f4f8ea7cf8ec56a32802e5ab2
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10931
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-29 05:28:30 -07:00
Avra Sengupta
d67eb34b2a snapshot/scheduler: Do not enable scheduler if another scheduler is running
Check if another snapshot scheduler is running before
enabling the scheduler.

Also introducing a hidden option, disable_force

"snapshot_scheduler.py disable_force" will disable the
cli snapshot scheduler from any node, even though the node
has not been initialised for the scheduler, as long as the
shared storage is mounted

This option is hidden, because we don't want to encourage
users to use all commands from nodes that are not initialised.

Change-Id: I7ad941fbbab834225a36e740c61f8e740813e7c8
BUG: 1219442
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10641
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: NetBSD Build System
Reviewed-by: Kaushal M <kaushal@redhat.com>
2015-05-28 19:25:18 -07:00
Meghana Madhusudhan
5e61673d6e NFS-Ganesha : Disable ACL by default
ACLs need to be disabled by default.
To enable ACLs, the user has to change the
export file manually, set Disable_ACL=False
and run ganesha-ha.sh --refresh-config.
Changing the default export file to
accommodate these changes.

Change-Id: If3fe0f237344c594a43ad6fc5d351bd391ae5256
BUG: 1221131
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10769
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-14 00:38:22 -07:00
Meghana Madhusudhan
7f950ed3ae NFS-Ganesha : Improved sed expression in cleanup
The global config file should not be emptied when
tear down is called. Improving the sed expression
to delete the ".conf" files only
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>

Change-Id: Ida3d303f629cb512c02dadacce1ec7e5f07db018
BUG: 1218854
Reviewed-on: http://review.gluster.org/10630
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-05-07 08:37:52 -07:00
Meghana Madhusudhan
9096a79447 NFS-Ganesha: Add-node and delete-node changes in HA implementation
NFS-Ganesha related config files have to be copied over to the new node
and NFS-Ganesha service has to be started.
Similary NFS-Ganesha service has to be stopped when a node is
deleted from the HA cluster.

Change-Id: Ia38e72cac86713fe23b7d1b829a256637a9ca796
BUG: 1212816
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10596
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-05-07 02:55:22 -07:00
Meghana Madhusudhan
e79edf3517 NFS-Ganesha : Do not empty global config file when cluster is torn
The global config file will need new blocks to support client lock recovery.
Current cleanup function empties the entire file. Deleting only "include"
lines in the config file.

Change-Id: I21f09e30a738d2ba01861ce480ecf906667d887b
BUG: 1218854
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10592
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-06 05:34:56 -07:00
Meghana Madhusudhan
a5fc34604a Cache-invalidation : set to on/off depending on ganesha.enable value
Multi-Head NFS-Ganesha servers need upcall (cache-invalidation)
support to notify them in case of any changes to the files in the backend.
Hence, upcall xlator option "features.cache-invalidation" needs to be enabled
when ganesha.enable is set to 'on'. Similarly, this feature needs
to be disabled when ganesha.enable is set to 'off'
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>

Change-Id: Ifdd1d50e48a2bd2a388f73c0b9e318c6092ac190
BUG: 1213752
Reviewed-on: http://review.gluster.org/10581
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-05 12:47:00 -07:00
Avra Sengupta
466289f755 snapshot/scheduler: Use os.path.realpath() for path validation
In order to accomodate systems, where /var/run is a symlink to
/run, we are using os.path.realpath() for path validations.

Change-Id: I4eae536867ec6c88f92c762b92f5c1966b622bde
BUG: 1216931
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10464
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-05-05 02:44:52 -07:00
Avra Sengupta
0be5e3d7c5 snapshot/scheduler: Use shutil.move instead of os.rename()
os.rename is a wrapper on top of the rename function,
which fails with invalid cross-device link if /tmp
is a tmpfs. Hence using shutil.move

Change-Id: Ia026d2a810b725ccd398db895e612c53bc6a2f95
BUG: 1214574
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10347
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-30 01:28:16 -07:00
Kaleb S. KEITHLEY
d28a99d6f2 common-ha: delete-node implementation
omnibus patch consisting of:
+ completed implemenation of delete-node         (BZ 1212823)
+ teardown leaves /var/lib/nfs symlink           (BZ 1210712)
+ setup copy config, teardown clean /etc/cluster (BZ 1212823)

setup for copy config, teardown clean /etc/cluster:
1. on one (primary) node in the cluster, run:
  `ssh-keygen -f /var/lib/glusterd/nfs/secret.pem`

  Press Enter twice to avoid passphrase.

2. deploy the pubkey ~root/.ssh/authorized keys on _all_ nodes, run:
  `ssh-copy-id -i /var/lib/glusterd/nfs/secret.pem.pub root@$node`

3. copy the keys to _all_ nodes in the cluster, run:
  `scp /var/lib/glusterd/nfs/secret.*  $node:/var/lib/glusterd/nfs/`
  N.B. this allows setup, teardown, etc., to be run on any node

Change-Id: I9fcd3a57073ead24cd2d0ef0ee7a67c524f3d4b0
BUG: 1213933
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10234
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-29 18:25:12 -07:00
Emmanuel Dreyfus
1fbcecb72e Fix case mistake for MKDIR_P in Makefiles
Some makefiles used $(mkdir_p) instead of the corectly defined $(MKDIR_P).
The former is substituted as an empty string, leading to possible failures
depending of the user shell tolerance. NetBSD's /bin/sh seems to choke
more easily than Linux's /bin/bash, but if the later does not fail, it
does not created the intended directories anyway.

BUG: 1129939
Change-Id: I8caed4000f3c91cb3a685453848fb854793945ed
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/10276
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-20 04:29:26 -07:00
Soumya Koduri
08a1041ca9 geo-rep: Added GF_CPPFLAGS to Makefile.am
This change is required to include contrib files in glusterfs.h

Change-Id: I40ef2c495015a6861fdd9f6a72599f094a89eb2a
BUG: 1200262
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/10200
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-14 19:46:39 +00:00
Meghana Madhusudhan
c37045c9ab NFS-Ganesha : Use common meta-volume for shared storage
A fixed name and mount point is used to share the common volume
required by various components. Make appropriate changes on the
NFS-Ganesha to accomodate the commom meta-volume as the
shared storage.

Change-Id: I9c87e486c2bb3a414f9773c74ed46e111f3c9c14
BUG: 1210344
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10211
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
2015-04-14 10:23:51 +00:00
Justin Clift
db5fc47e20 Fix incorrect rfc.sh and checkpatch.pl use of "jenkins" instead of "gerrit"
Change-Id: I6e78477554097a2be5aad8e3fb196970fb30dac2
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/10203
Tested-by: NetBSD Build System
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-04-13 11:10:07 +00:00
Meghana Madhusudhan
dbd9bd7b2d NFS-Ganesha : Fixing HA script invocation and others
gluster features.ganesha disable failed invariably.
And also, there were problems in unexporting
volumes dynamically.Fixed the above problems.

Change-Id: I29aa289dc8dc7b39fe0fd9d3098a02097ca8ca0c
BUG: 1207629
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10199
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: NetBSD Build System
2015-04-13 10:36:58 +00:00
Avra Sengupta
7a999ac6b1 snapshot/scheduler: Adhering to the common storage for scheduler
Making snapshot scheduler use the common storage
shared by nfs, snapshot and geo-rep. The meta volume
should be named as gluster_shared_storage, and it
should be mounted at "/var/run/gluster/shared_storage/".

Each component(nfs, snapshot, and geo-rep) should have
their own repos inside the shared storage, and perform
their operations in the shared storage

Change-Id: I4f670bf089c80037bd2b0716ddf743f48d7411ca
BUG: 1210344
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10183
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:20:12 +00:00
Avra Sengupta
10ed06a5a1 snapshot/scheduler: Validate the number of entries in schedule
A valid schedule entry in snapshot schedule must have
six elements and adhere to the following format

* * * * *
| | | | |
| | | | +---- Day of the Week   (range: 1-7, 1 standing for Monday)
| | | +------ Month of the Year (range: 1-12)
| | +-------- Day of the Month  (range: 1-31)
| +---------- Hour              (range: 0-23)
+------------ Minute            (range: 0-59)

Change-Id: Idf03a3c43a461295dd3e2026bbcd0420319dd0e0
BUG: 1209408
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10169
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:03:11 +00:00
Avra Sengupta
14dcabf21d snapshot/scheduler: Fix deleting of snapshot schedule
Check if the argument has an attribute before
validating the attribute.

Change-Id: Ia4c6c91c2fca2ec3e82b47d81fbc19a5e0f17eb4
BUG: 1210204
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10168
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:01:39 +00:00
Avra Sengupta
3f21a34793 snapshot/scheduler: Only run if shared storage is mounted
Before running any snapshot scheduler op command,
verify if /var/run/gluster/snaps/shared_storage/ exists
and if the shared storage is mounted at it.

Change-Id: Ibb6ba6c01c227cacf9a19d1bf9264500373a4ed6
BUG: 1209112
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10135
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 04:59:32 +00:00
Kaleb S. KEITHLEY
6ae434eeb3 ganesha-ha: more robust pid file handling
fix bug with reading pid file to determine if ganesha.nfsd is running

Change-Id: I4050a119e2be93578045a221b67f616e152546d9
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10163
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-08 17:50:09 +00:00
Avra Sengupta
057d2bed41 snapshot/scheduler: Don't append timestamp in scheduled snapshots
The scheduled snapshots will now have names as follows:
Scheduled-<jobname>-<volume name>.

Stopped appending time-stamp in scheduled snapshots because
time-stamps are appended in snapshots by default unless
explicitly asked not to. 

Therefore snapshot created from "Job1" of "test_vol" volume
will look like
Scheduled-Job1-test_vol_GMT-2015.04.02-09.43.02

Change-Id: I75b4a87d265ed55193f08153fd7ffe521cc5ef68
BUG: 1208097
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10115
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:50:45 -07:00
Avra Sengupta
1a22f3e10c snapshot/scheduler: Remove unwanted schedule enable check
Allow add, edit, list, delete of schedules even when 
snapshot scheduling is disabled.

Change-Id: Ie55ea7d6e9b3fccd914a786cc54bb323ac765a98
BUG: 1209117
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10136
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:44:27 -07:00
Avra Sengupta
6816c7d466 snapshot/scheduler: Check the correctness of Jobname and Volname
Check for the correctness of Jobname and Volname. They should
not be empty, and should contain only one word. 

If this condition is met, the rest of the whitespaces are 
also striped, before processing the command.

Change-Id: I2c9503ab86456e0f4b37e31d483ee8b2d0b0e1af
BUG: 1209120
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10137
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:37:32 -07:00
Kotresh HR
85865daa1b extras: Fix stop-all-gluster-processes.sh script
"test -n" command takes single string as argument. The
command was failing with "Too many arguments" when multiple
pids are got.

Change-Id: Icc409082f492c72522168d5e203684f00f52cf1b
BUG: 1204641
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9970
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-06 10:44:35 -07:00
Avra Sengupta
f7a14c0fe5 snapshot/scheduler: Fix the snapshot create command.
The create command being executed was sent with wrong
parameters.

Change-Id: I9b3cf23b3a02cf8309d50bf70439ad02b37f191a
BUG: 1208067
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10114
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-04 10:49:58 -07:00
Kotresh HR
4a339be28a geo-rep: Copy geo-rep hook-script during source install
The hook-script S56glusterd-geo-rep-create-post.sh was not
copying to glusterd working directory when geo-rep is
installed through source. Hence the geo-rep create fails
unless the script is manually copied. This patch addresses
the issue by copying the hook-script during make install.

Change-Id: I185a877ed720e8300f0e888ab481d0c8c23bf815
BUG: 1207201
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/10051
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-04-02 03:06:58 -07:00
Kaleb S. KEITHLEY
fb81ee0196 ganesha-ha: ganesha-ha.sh --status (one-liner) implementation
Change-Id: I17b7f6864dd8c1f89500a4bb89f1c249835e68da
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9974
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-24 13:13:47 -07:00
Niels de Vos
2308c07b9d build: let checkpatch check for a trailing dot
The subject of a patch should not end with a dot (.). It is not common
to have subjects of emails end with a dot, and neither is it common for
patches.

Change-Id: Id090241393aee3ca99df4887bdb2d7a7a8913164
BUG: 1198849
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9940
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ira Cooper <ira@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-23 13:15:32 -07:00
Niels de Vos
61489c1725 build: correctly install the snap_scheduler tools
The current way of installing the snap-scheduler tools breaks the
building of RPMs. The tools should be installed in /usr/sbin and there
is no need to change the attributes/permissions after the installation.

Change-Id: I1b8e206748617fb000d956b1b5da52d126971c29
BUG: 1203557
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9939
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-19 07:46:52 -07:00
Avra Sengupta
7c4461329b snapshot/scheduling: A cron based scheduler for snapshot scheduling
GlusterFS volume snapshot provides point-in-time copy
of a GlusterFS volume. Currently, GlusterFS volume
snapshots can be easily scheduled by setting up 
cron jobs on one of the nodes in the GlusterFS
trusted storage pool. This has a single point failure (SPOF),
as scheduled jobs can be missed if the node running the cron
jobs dies.

The solution to the above problems is addressed in this patch.
The snap_scheduler.py helper script expects the user to install
the argparse python module before using it.

Further details for the same are available at:

http://www.gluster.org/community/documentation/index.php/Features/Scheduling_of_Snapshot

Change-Id: I2c357af5b7d3e66f270d20eef50cdeecdcbe15c7
BUG: 1198027
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9788
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 18:31:54 -07:00
Aravinda VK
7e98a0e0b1 feature/glusterfind: A tool to find incremental changes
Documentation is available in patch:
http://review.gluster.org/#/c/9800/

A tool which helps to get list of modified files or list of all files in
GlusterFS Volume using Changelog or find command.

Usage
=====
glusterfind --help

Create:
-------
glusterfind create --help

The tool creates status file $GLUSTERD_WORKDIR/SESSION/VOLUME/status
and records current timestamp to initiate the session. This timestamp
will be used as start time for next runs.

As part of create also generates ssh key and distributes to all peers.
and enables build.pgfid and changelog using volume set command.

Pre:
----
glusterfind pre --help

This command is used to generate the list of files modified after session
creation time or after last run. To get list of all files/dirs in Volume,
run pre command with `--full` argument.

The tool gets all nodes details using gluster volume info and runs node
agent for each brick in respective nodes via ssh command. Once these node
agents generate the output file, tool copies to local using scp. Merges all
the output files to generate the final output file.

Post:
-----
glusterfind post --help

After consuming the list, this sub command is called to update the session
time based on pre command status file.

List:
-----
glusterfind list --help

To view all the sessions

Delete:
-------
glusterfind delete --help

Delete session.

Known Issues
------------
1. Deleted files will not get listed, since we can't convert GFID to
   Path if file/dir is deleted.
2. Only new name will get listed if Renamed.
3. All hardlinks will get listed.

Change-Id: I82991feb0aea85cb6ec035fddbf80a2b276e86b0
BUG: 1193893
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9682
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 02:54:25 -07:00
Kaleb S. KEITHLEY
d81182cf69 NFS-Ganesha: Install scripts, config files, and resource agent scripts
Resubmitting after a gerrit bug bungled the merge of
http://review.gluster.org/9621 (was it really a gerrit bug?)

Scripts related to NFS-Ganesha are in extras/ganesha/scripts.
Config files are in extras/ganesha/config.
Resource Agent files are in extras/ganesha/ocf

Files are copied to appropriate locations.

Change-Id: I137169f4d653ee2b7d6df14d41e2babd0ae8d10c
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9912
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-17 13:39:44 -07:00
Michael Scherer
0bef7717d3 build: adjust checkpatch for HEAD.
README is called README.md in git HEAD, and we have a directory
heal.

Change-Id: I2e698b95c6924b5b21aa54257fefd6a6698255ee
BUG: 1198849
Signed-off-by: Michael Scherer <misc@zarb.org>
Reviewed-on: http://review.gluster.org/9784
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-05 13:10:44 -08:00
Kotresh HR
f3ad194918 geo-rep: Handle copying of common_secret.pem.pub to slave correctly.
Current Behaviour:
    1. Geo-replication gsec_create creates common_secret.pem.pub file
       containing public keys of the all the nodes of master cluster
       in the location /var/lib/glusterd/
    2. Geo-replication create push-pem copies the common_secret.pem.pub
       to the same location on all the slave nodes with same name.

Problem:
    Wrong public keys might get copied on to slave nodes in multiple
    geo-replication sessions simultaneosly.

     E.g.
      A geo-rep session is established between Node1(vol1:Master) to
      Node2 (vol2:Slave). And one more geo-rep session where
      Node2 (vol3) becomes master to Node3 (vol4) as below.

      Session1: Node1 (vol1) ---> Node2 (vol2)
      Session2: Node2 (vol3) ---> Node3 (vol4)

      If steps followed to create both geo-replication session is as
      follows, wrong public keys are copied on to Node3 from Node2.

      1. gsec_create is done on Node1 (vol1) -Session1
      2. gsec_create is done on Node2 (vol3) -Session2
      3. create push-pem is done Node1 - Session1.
          -This overwrites common_secret.pem.pub in Node2
           created by gsec_create in second step.
      4. create push-pem on Node2 (vol3) copies overwrited
         common_secret.pem.pub keys to Node3. -Session2

Consequence:
      Session2 fails to start with Permission denied because of wrong
      public keys

Solution:
      On geo-rep create push-pem, don't copy common_secret.pem.pub
      file with same name on to all slave nodes. Prefix master and
      slave volume names to the filename.

NOTE: This brings change in manual steps to be followed to setup
      non-root geo-replication (mountbroker). To copy ssh public
      keys, extra two arguments needs to be followed.

      set_geo_rep_pem_keys.sh <mountbroker_user> <master vol name> \
      <slave vol name>
      
      Path to set_geo_rep_pem_keys.sh:
      Source Installation: 
              /usr/local/libexec/glusterfs/set_geo_rep_pem_keys.sh
      Rpm Installatino: 
              /usr/libexec/glusterfs/set_geo_rep_pem_keys.sh

Change-Id: If38cd4e6f58d674d5fe2d93da15803c73b660c33
BUG: 1183229
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9460
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2015-01-21 22:58:41 -08:00
Niels de Vos
10e4add35f build: add a tmpfiles.d config file for /run/gluster
New distrubutions have a /run directory on a volatile tmpfs filesystem.
This causes /run/gluster to be removed with each reboot. A tmpfiles.d
configuration is used to create the directory on boot.

EL5 and EL-6 do not use /run, current Fedora versions do. By checking
%{_tmpfilesdir} in the .spec, we can identify if the distribution uses
tmpfiles.d.

Change-Id: I231e7d6603d573cb905246558e14a51577c0eb56
BUG: 1182934
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-01-19 00:55:31 -08:00
Jan-Hendrik Zab
e679d6417d Stop logrotate from complaining about missing files.
Previously logrotate reported errors for files missing in
"/var/log/glusterfs/geo-replication-slaves/*/*.log". Fixed by reordering
directives in the example config.

Change-Id: I7cdb9e0d82f08aa27d5e26664660204fdeb8e98e
BUG: 1170825
Signed-off-by: Jan-Hendrik Zab <zab@l3s.de>
Reviewed-on: http://review.gluster.org/9264
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
2014-12-11 00:04:36 -08:00
Niels de Vos
fcdac758ad build: only install geo-rep scripts when enabled
When geo-replication is not enabled, the related scripts should not get
installed. EPEL-5 does not support geo-replication, and the installed
but unpackaged scripts cause rebuilding for .el5 to fail.

BUG: 1169005
Change-Id: I1b6a352b73bd1ed1c5b330f54e26e81aed9a5a4e
Reported-by: Lalatendu Mohanty <lmohanty@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9221
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-12-07 06:16:08 -08:00
Aravinda VK
7f7dabd7d0 extras: geo-rep: Customize the generate gfid script to dirs list
generate-gfid-file.sh now accepts dirs list file and generate
gfids only for those dirs list.

Change-Id: Ia78a0a744dc8a079db56c38578cc6fcac2a6fa90
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8540
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-11-26 00:12:18 -08:00
Raghavendra Talur
1800fba112 extras/hookscripts: Fix set behaviour for user.cifs and user.smb
Setting either of user.cifs or user.smb to disable should disable smb
shares when the smb share is already available.

Change-Id: I213ffca9cedc14107daeb30271d1f41dd9d7fcf4
BUG: 1105147
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9042
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-11-11 22:39:05 -08:00
Lalatendu Mohanty
a5d73daabf logrotate: gluster logrotate config should not be global
Issue : Previously glusterfs logrotate config file pollutes
global config. So moved the directives inside the curly braces,
 so they don't pollute the global config state.

Change-Id: I8836893dfcdf457d9c5d766612d687bfce64e2ae
BUG: 1126802
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/8994
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-10-29 10:40:32 -07:00
Meghana Madhusudhan
a7a8a7507c Hooks : Infinite while loop introduced by another change.
A change made to all the hook scripts introduced an
infinite while loop in the script S31ganesha-reset.sh.
It resulted in 100% CPU usage by this script.

Change-Id: If62d8f0e065c6e6511363b8b26eae433f59bc5c3
BUG: 1155489
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8966
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-24 01:16:54 -07:00
Harshavardhana
7808d4b789 Revert "extras: reverse test for '}' vs. following 'else' placement"
This reverts commit 0a8371bdfd.

Change-Id: I946f449ad213cea70fbbd9cd3951f5838b9f82e5
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8927
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2014-10-14 06:43:32 -07:00
Jeff Darcy
0a8371bdfd extras: reverse test for '}' vs. following 'else' placement
The two-line form "}\nelse {" has been more common than the one-line
form "} else {" in our code for years, and IMO for good reason (see
the comment in the diff).

Change-Id: Ic22c76fe76f0d91300daff36e755a18a8db58852
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8888
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-02 07:01:15 -07:00
Jeff Darcy
6e8ad12fba build: remove warnings for recommended style
Specifically:

 * space before function arguments

 * brace around single statement

Ideally we would *reverse* these tests so they warn under the exact
opposite conditions, but that would mean learning the internals of a
script written in a defective language with cryptic variable names and
too few comments.  Life's too short.  For now, just cutting down on some
of the spam (which might obscure more serious issues) should suffice.

BUG: 1120646
Change-Id: I5ec684d0d788a34f29af9b1761743c8860973993
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8813
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-09-23 14:30:13 -07:00
Harshavardhana
2288fec13e extras/checkpatch.pl: update coding guidelines script
- Allow 'quoted string split across lines' since its a
  GlusterFS common practice
- Remove a useless "+" - perl 5.20 complains with following
  warning "Useless use of greediness modifier '+'"

Change-Id: Ibaf276ec84757b3ecc3e6db7f5e720b8e8a12dff
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8811
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-09-23 12:29:17 -07:00
Harshavardhana
c788a7784d extras/checkpatch.pl: linux kernel style patch verification
This is to bring in adherence to coding policy, prior to patch
submission for review.

 - no tabs
 - no whitespace
 - indentation (linux style) etc.

This is in the interest at large for the GlusterFS codebase
to be more cleaner and readable.

./rfc.sh - now supports running this for all patches diverged
from "origin/master" revision.

NOTE: One should take this as a handle for good guidelines and
never use it as a tool for correctness, use common-sense in all
the cases ;-)

Change-Id: Ib9a5ed207cde152cb92b8d38cec83e8ce9ef7f28
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8181
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anders Blomdell <anders.blomdell@control.lth.se>
2014-09-18 12:55:26 -07:00
Justin Clift
7c2c5afb8d osx: LaunchDaemon plist filename should start with org instead of com
Change-Id: I5e06bcc473224667387c555355d7e1e81bf4911b
BUG: 1141659
Reviewed-on: http://review.gluster.org/8734
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:50 -07:00
Justin Clift
926522a3fe osx: Remove legacy extras/MacOSX directory
BUG: 1141682
Change-Id: Ic84171b070985a11b70d4548aa5e507a121d2164
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/8736
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:30 -07:00
Meghana Madhusudhan
9816fe18e8 Hook scripts should exit with correct exit status.
When volume set options other than nfs-ganesha.host and nfs-ganesha.enable
are executed, the hook script S31ganesha-set.sh should exit with
exit status 0. The present behaviour results in an error message in
one of the logs that could be  misleading.

Similarly, hook script S30samba-set.sh should exit with
exit status 0 if samba is not installed. Fixing the issue
with a minor change in the script.

Change-Id: I35d1dc8400bb7043385800ed97adc5321829437f
BUG: 1122978
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8385
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-31 11:05:04 -07:00
Emmanuel Dreyfus
33be39b42f Regression test portability: mktemp
Linux mktemp accepts to run without a template, NetBSD mandates it. Since
the template option has the same syntax, add it everywhere. While there,
also do this in scripts outside of regression testing.

BUG: 764655
Change-Id: I3ec140afbc9009257c81a56d77afcc21fef74cc4
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8432
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:46:44 -07:00
Patrick Uiterwijk
c42339ef09 who-wrote-glusterfs: use the set $GITDM_REPO variable
Change-Id: Ic119f83fff3930e164f3c81df1c9b60d5eb2d99f
BUG: 1131272
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-on: http://review.gluster.org/8495
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-19 23:34:39 -07:00
Kaleb S. KEITHLEY
84cfd657e5 extras/LinuxRPM: error in Makefile.am
Change-Id: I50de95ca6eff09338ce4a6f9f2b42aeccd10cae2
BUG: 1128192
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8444
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2014-08-08 07:23:59 -07:00
Harshavardhana
2ec6ea43f2 build: make GLUSTERD_WORKDIR rely on localstatedir
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-07 01:17:29 -07:00
Meghana Madhusudhan
866a9b9621 gluster vol set nfs-ganesha.enable off fails to unexport volume.
Due to a parameter type change in upstream nfs-ganesha
( v2.1 and above ), gluster vol set <volname> nfs-ganesha.enable
 off doesn't unexport the volume in question if it was already
exported.
A minor change in the hook script would result in the
expected behaviour.

Change-Id: I46f76f3cde6b6ebd7a94d5ee16f05a3648a2840f
BUG: 1124711
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8390
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-05 03:33:40 -07:00
Anders Blomdell
e8a1fc34ad Make RPM's with current git tag
1. clear autom4te.cache
2. autogen.sh
3. configure --with-previous-options

Change-Id: I90c1820d22207d18b1bb367444b21918467baea5
BUG: 1117921
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
Reviewed-on: http://review.gluster.org/8293
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-30 08:07:11 -07:00
Avra Sengupta
f6ddb4675c gluster: Fix the recursive goto outs in the source code.
Added a script check_goto.pl, that when run from
the source code root, will scan all .c files to match
the following pattern:

label:
        if (condition)
            goto label;

On finding such a pattern the script will print the file name
and the line number. There are certain cases where the above
recursive pattern is intended. Hence adding those labels to
ignore-labels. Thanks Vijaikumar Mallikarjuna for the perl
script.

Also fixed all such existing errors

Change-Id: I1b821d0a8c296f16e40faff20bd029bdc880c2e9
BUG: 1119256
Signed-off-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/8307
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-21 10:26:20 -07:00
Meghana Madhusudhan
2e831d70c7 Changing the position of nfs-ganesha.log
Changing the position of ganesha.log from /tmp/ganesha.log
to /var/log/nfs-ganesha/ganesha.nfsd.log

Change-Id: Iff95fbc7fc690f4fdbc1789d84f3e41aaca9045b
BUG: 1116723
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8249
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 23:38:04 -07:00
Harshavardhana
1b74cf9929 porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:20:34 -07:00
Amar Tumballi
d65e8a871a extras: add a script to stop all the glusterfs process
Change-Id: I9f73bf0308625695ed78db06478963d16644852a
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/6270
Reviewed-by: Sachidananda Urs <sacchi@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-17 04:37:21 -07:00
Varun Shastry
17f3667221 extras: bash command completion for gluster
Change-Id: Ifd6e68b0288dc65e41e467b4ad02bfc3bded341f
BUG: 1108767
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/7979
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-13 09:56:39 -07:00
Lalatendu Mohanty
115ecc8da8 Core: Fix issues reported by Cppcheck
Fixed in this patch:

[glusterfs/extras/geo-rep/gsync-sync-gfid.c:105]: (error) Resource leak: fp
[glusterfs/libglusterfs/src/xlator.c:651]: (error) Uninitialized variable: gfid
[glusterfs/libglusterfs/src/xlator.c:652]: (error) Uninitialized variable: gfid
[glusterfs/xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv
[glusterfs/xlators/features/changelog/src/changelog.c:1464]: (error) Possible null pointer dereference: priv
[glusterfs/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c:865]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c:194]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-syncop.c:1408]: (error) Possible null pointer dereference: this
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:7002]: (error) Possible null pointer dereference: path_tokens

Fixed in 3.4 and 3.5 branch (http://review.gluster.org/#/c/7583/ ,
http://review.gluster.org/#/c/7605/ will be backported in a separate patch)

[glusterfs/xlators/mount/fuse/src/fuse-bridge.c:4688]: (error) Uninitialized variable: finh
[glusterfs/xlators/mount/fuse/src/fuse-bridge.c:3081]: (error) Possible null pointer dereference: state
[glusterfs/xlators/cluster/dht/src/dht-rebalance.c:1719]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/cluster/stripe/src/stripe.c:4940]: (error) Possible null pointer dereference: local
[glusterfs/xlators/mgmt/glusterd/src/glusterd-replace-brick.c:915]: (error) Resource leak: file
[glusterfs/xlators/mgmt/glusterd/src/glusterd-replace-brick.c:999]: (error) Resource leak: file
[glusterfs/xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:5297]: (error) Possible null pointer dereference: this
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:6273]: (error) Possible null pointer dereference: this
[glusterfs/xlators/performance/quick-read/src/quick-read.c:586]: (error) Possible null pointer dereference: iobuf
[glusterfs/xlators/nfs/server/src/nfs-common.c:89]: (error) Dangerous usage of 'volname' (strncpy doesn't always null-terminate it).

False positives

[glusterfs/geo-replication/src/gsyncd.c:99]: (error) Memory leak: str
[glusterfs/geo-replication/src/gsyncd.c:395]: (error) Memory leak: argv
[glusterfs/xlators/nfs/server/src/nlm4.c:1199]: (error) Possible null pointer dereference: fde
[glusterfs/xlators/mgmt/glusterd/src/glusterd-geo-rep.c:1659]: (error) Possible null pointer dereference: command
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:7001]: (error) Possible null pointer dereference: path_tokens

Insignificant/Don't care

[glusterfs/contrib/uuid/gen_uuid.c:369]: (warning) %ld in format string (no. 2) requires 'long *' but the argument type is 'unsigned long *'.
[glusterfs/contrib/uuid/gen_uuid.c:369]: (warning) %ld in format string (no. 3) requires 'long *' but the argument type is 'unsigned long *'.
[glusterfs/extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:138]: (error) Possible null pointer dereference: __ptr
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:140]: (error) Possible null pointer dereference: __ptr
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:331]: (error) Possible null pointer dereference: __ptr

Change-Id: I7696ed1a2a9553b79f9714e10210a8d563a5abd8
BUG: 1091677
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/7693
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-12 04:20:34 -07:00
Raghavendra Talur
8a2454d449 extras/hookscripts: When set option disables smb, don't start smb.
When user.smb or user.cifs option is set to disable, we remove the
share options from smb.conf. If smb process is running, a sighup is
required but we should not start the process if its not running.

Change-Id: I1e2163ff209ba858380f7da459ff1dba3cf673f2
BUG: 1105123
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7994
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-06-12 03:57:14 -07:00
Harshavardhana
f0c8be68ca scripts: CTDB lockvol ping-timeout should be 10secs
commit "4044e387dd40e2d12145fd32d5fd715406fcec8e" approach
to this led to deadlocks instead we rely on an old trick at
client side - without any need to modifying the volume globally.

Change-Id: I6e3c6bf9c0a3a0dd99a51b5d2a6c1f050ed2384c
BUG: 1091600
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8007
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-11 23:08:36 -07:00
Meghana M
294b954848 Hooks/nfs-ganesha:Change the hook script to enable new function signature of add export.
Minor changes in the hook script to avoid some
possible confusion when volume set options are used.
Adding a few additional checks to ensure correct behaviour.

Edited a few config parameters that have changed in upstream
ganesha recently.

Change-Id: I85b842cbbd4b35b7f72f3beb60abf6532ddaa8c7
BUG: 1101416
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7890
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-02 22:32:32 -07:00
Avra Sengupta
f6677d1e30 glusterd/geo-rep: Use getent passwd instead of $HOME
$HOME might not be set in the env variables, as is the case
when these scripts are executed using the runner framework.
Hence using getent passwd instead of $HOME

Change-Id: I99f6bcd788d727be534b3040600d66c8dbb7ee92
BUG: 1099041
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7803
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-05-20 03:21:30 -07:00
Emmanuel Dreyfus
618d465295 NetBSD build fixes
- Shell scripts: == is specific to bash and ksh. Use = instead.
- Shell scripts: use sh instead of bash if bash functionnality is not used
- Shell scripts: ${var/search/replace} is specific to bash
- sed: The -i option is specific to GNU sed.
- Makefiles: $< outside of generic rules only work in GNU make.
- xdrproc_t() is not universally defined as variadic. Do not specify third
  argument if it is not used
- NetBSD FUSE specific: only include <perfuse.h> in FUSE client code,
  it harms in other locations
- configure: Search for gettext() in libintl as NetBSD stores it there
- Like MacOS X, NetBSD has unmount(2) and not umount(2) (un vs u)

Some other build issues previously included in this change were
removed:
- __THROW macro, addressed in http://review.gluster.com/#/c/7757/
- getmntent() compat shared with MacOS X, in http://review.gluster.com/#/c/7722/

This patchset adds warning fixes for mount_glusterfs

BUG: 764655
Change-Id: I2f1faf8ff96362d3e2baf237b943df619011f1f4
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/7783
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
2014-05-17 11:53:34 -07:00
Meghana
6a9a52c932 Hooks:Modified S31ganesha-set.sh to enable dynamic exports via NFS-ganesha
Dbus signals have to be sent to add and remove exports on the fly,
 without restarting nfs-ganesha server. Adding those signals in
 the hook script to enable the same.

 Adding another to check to enable IP modification,
 without restarting nfs-ganesha.Adding checks to find the
 configuration file in /etc/glusterfs-ganesha.

 Removing nested volume set options. This introduces
 some issues that will be documented clearly.

Signed-off-by: Meghana <mmadhusu@redhat.com>
Change-Id: I28f7983f2d18529dc813ddc9773b33c6caee1ad4
BUG: 1095656
Signed-off-by: Meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7709
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-16 10:01:36 -07:00
Avra Sengupta
09e9775127 glusterd/geo-rep: Allow gverify.sh and S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Mounting the slave-volume on local node, to perform disk checks
in order to allow gverify.sh to operate for non-root privileged
slave volume

Allowing the hook script S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Modified peer_add_secret_pub.in to accept username as argument
and add the pem keys to the users's_home_dir/.ssh/authorized_keys

Wrote set_geo_rep_pem_keys.sh which accepts username as argument
and copies the pem keys from the user's home directory to
$GLUSTERD_WORKING_DIR/geo-replication/ and then copies the keys
to other nodes in the cluster and add them to the respective
authorized keys. The script takes as argument the user name and
assumes that the user will be present in all the nodes in the
cluster. It is not needed for root.

To summarize:
For a privileged slave user, execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> [root@]<slave_ip>::<slave_vol> create push_pem

For a non-privileged slave user execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> <slave_user>@<slave_ip>::<slave_vol> create push_pem
then on the slave node execute the following as super user:
/usr/local/libexec/glusterfs/set_geo_rep_pem_keys.sh <slave_user>

BUG: 1077452
Change-Id: I88020968aa5b13a2c2ab86b1d6661b60071f6f5e
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7744
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-05-14 10:24:25 -07:00
Meghana M
0088e318c1 cli/hooks : Add volume set options to enable/disable nfs-ganesha support.
1. gluster volume set nfs-ganesha.enable ON/OFF
If the option is set to ON, the volume field in the nfs-ganesha configuartion file is
edited. Gluster-nfs is disabled on that volume and the volume is exported using
nfs-ganesha.

2.gluster volume set nfs-ganesha.host IP
This is used to provide the IP of the nfs-ganesha host.

Note : nfs-ganesha.host MUST be set before using nfs-ganesha.enable ON

The switch from gluster-nfs to nfs-ganesha is mostly done by the hook-scripts
in the post phase of the 'set' option. As a result, gluster volume reset does not
function as it is expected to. By default, nfs-ganesha will be set to off but the
process  will not be killed.

Hence, a few changes have to be made post 'reset' option as well. Those changes
also have been added.

Change-Id: I7fdc14ee49d1724af96eda33c6a3ec08b1020788
BUG: 1092283
Signed-off-by: Meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7321
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-03 07:24:07 -07:00
Raghavendra Talur
f48656b32e extras/hookscripts: Remove %P from smb share path value.
We had added %P in the value for path in smb share definitions to
avoid ctdb errors. However, %P does not work well for windows
clients and they fail to access the share.

Solution for the original problem:
The error messages were being generated by a monitoring script that ctdb
runs. The script reads the path value from testparm and tests if it exists
in the local machine. This particular check does not hold valid for
virtual file system backends like gluster. There is no harm in asking
ctdb to not to check the existence of such backend and can be done by
setting the following config in ctdb.conf:

CTDB_SAMBA_SKIP_SHARE_CHECK=YES.

Change-Id: I91627c8a279126a5cc24c6347847f9bfbad53dd5
BUG: 1068776
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7598
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
2014-05-02 20:42:30 -07:00
Harshavardhana
4044e387dd scripts: CTDB lockvol ping-timeout should be 10secs
Users often forget to update the ping-timeout, perhaps
we should take care of this automatically

Change-Id: I6d14df8aa52665847233cb1760dfd54f41baadec
BUG: 1091600
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7569
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-02 08:52:40 -07:00
Krishnan Parthasarathi
c61bc1f9e5 glusterd: Ping timer implmentation
This patch refactors the existing client ping timer implementation, and makes
use of the common code for implementing both client ping timer and the
glusterd ping timer.

A new gluster rpc program for ping is introduced. The ping timer is only
started for peers that have this new program. The deafult glusterd ping
timeout is 30 seconds. It is configurable by setting the option
'ping-timeout' in glusterd.vol .

Also, this patch introduces changes in the glusterd-handshake path. The client
programs for a peer are now set in the callback of dump_versions, for both
the older handshake and the newer op-version handshake. This is the only place
in the handshake process where we know what programs a peer supports.

Change-Id: I035815ac13449ca47080ecc3253c0a9afbe9016a
BUG: 1038261
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-29 14:23:51 -07:00
Niels de Vos
d2cdc392ac Update references to the maillinglist to gluster-devel@gluster.org
gluster-devel@nongnu.org has moved to gluster-devel@gluster.org. All
occurrences in the current (non legacy) documentation and code have been
adjusted.

Change-Id: I053162e633f7ea14fd3eed239ded017df165147c
BUG: 1091705
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7573
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-04-27 21:29:36 -07:00
Harshavardhana
9819fcedf1 rpcgen: Remove autogenerated files instead build on demand
Avoid modifying autogenerated files and keeping them in
repository - autogenerate them on demand from ".x" files

Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6
BUG: 1090807
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7526
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-25 13:29:25 -07:00
Harshavardhana
a3cb38e3ed build: MacOSX Porting fixes
git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs

Working functionality on MacOSX

 - GlusterD (management daemon)
 - GlusterCLI (management cli)
 - GlusterFS FUSE (using OSXFUSE)
 - GlusterNFS (without NLM - issues with rpc.statd)

Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Dennis Schafroth <dennis@schafroth.com>
Reviewed-on: http://review.gluster.org/7503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-24 14:41:48 -07:00
Krutika Dhananjay
e55f3fe25a Add upgrade scripts for quota
Change-Id: I289662300d32f75e2fc6e789037c3224054a38a5
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7418
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11:38:20 -07:00
Harshavardhana
1dc3331d93 scripts: Use /bin/bash not /bin/sh
If using `/bin/sh` this is what we see

$ ./who-wrote-glusterfs.sh
./who-wrote-glusterfs.sh: 39: shift: can't shift that many

Use `/bin/bash` instead where 'shift' without an argument
is supported.

Change-Id: I2be05f0062eb8456631c1cee859757052f1b6dc7
BUG: 1087771
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7496
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-17 11:20:53 -07:00
Niels de Vos
f7e19ce467 scripts: add new email aliases
Two developers started to use new email addresses, marking them as
aliases. Also assign @gmail.com addresses to the "(unknown)" employer.

Change-Id: Ic5722c1611b003182c0288ba530d6ab275c2ca1b
BUG: 1087771
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7484
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-16 06:38:06 -07:00
Bala.FA
c193996c94 build: set run levels for glusterd init script properly
'chkconfig --add glusterd' does not set run levels for start/stop.
This patch fixes it.

Change-Id: I8962f5207d034b6875353e15eb60c4d08c5a4fe4
BUG: 1086141
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7432
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-12 23:03:16 -07:00
AkshataDM
9565ac3328 Made spelling changes to 19 files
Change-Id: If91cf44578fe0b5176ea01ae5c5962e31606f640
BUG: 1075417
Signed-off-by: AkshataDM <oxta28@gmail.com>
Reviewed-on: http://review.gluster.org/7280
Reviewed-by: Varun Shastry <vshastry@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-16 11:57:21 -07:00
Harshavardhana
3076f75e57 scripts: CTDB hooks should add _netdev for network mounts
Change-Id: I86ad5e9ed291866a8d478768fb447e269f51c39e
BUG: 1075182
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7221
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-11 23:45:14 -07:00
Raghavendra Talur
ecc475d0a5 hook-scripts: Move smb hooks to right place.
Moved the hook-scripts to dirs corresponding to event.
Also, edited S30samba-set.sh to with changes in
other two hook scripts to bring uniformity.

Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2
BUG: 1073468
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7201
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-10 06:38:21 -07:00
Justin Clift
d11d3f877d build: Add missing rpmbuild/BUILD dir for CentOS 5.x
The rpmbuild/BUILD directory isn't created automatically
by the build system on CentOS 5.x. This 1-line patch
adds its creation to the build process.

BUG: 1071504
Change-Id: I90ad70608776cb491f2ba92fb7d6044cff4defcc
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7175
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-01 19:00:08 -08:00
Harshavardhana
fc01b0293b extras/hookscripts: Add %P as default relative root
ctdb in its monitoring script looks for the "path" variable
values at the system level not at share level.

This relative root path, if any should be default for all
volumes, to avoid issues with ctdb when doing subdirectory shares.

Error:
2014/02/21 12:50:34.355754 [41083]: ERROR: samba directory "/foodir" not available

Fix: Add %P in your smb.conf

[gluster-foodir]
...
...
    path = %P/foodir
...
...

Change-Id: If3c110d844ba8301c901dbce40b23cac99d6d55b
BUG: 1068776
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7147
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-24 19:56:31 -08:00
Emmanuel Dreyfus
13f1d250cc Use libglusterfs wrapper to make setxattr portable
BUG: 764655
Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6982
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-02-13 01:10:07 -08:00
Aravinda VK
d4e7dd1d2f spec: geo-rep: Include hooks and upgrade scripts
Added hook script S56glusterd-geo-rep-create-post.sh to
%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/ and upgrade
scripts added to %{_datadir}/glusterfs/scripts/

BUG: 1036539
Change-Id: Id114b827824e55516181ab8f564d419c258be3e2
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/6926
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-10 16:34:02 -08:00
Vijay Bellur
add56c1fd5 tests: Add rpc coverage tests.
1. Moves rpc-coverage.sh from extras/ to tests/basic/
2. Fixes a symlink test

Change-Id: I2fb8f8441434acfd7bd7fff72deedfbd2410d08c
BUG: 764966
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6609
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2014-01-27 02:21:19 -08:00
Niels de Vos
fdc82748a1 build: Install /var/lib/glusterd/groups/virt by default
/var/lib/glusterd/groups/virt is not installed by default, but that
should be the case. It is provided as extras/groups-virt.example.

"make install" should correctly install this file, and the rpm packages
should include it.

Change-Id: I5284306cfc2882e3147bd72f496ad29db906fcb2
BUG: 1053854
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6717
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-21 06:48:35 -08:00
Varun Shastry
c0a14c00bf features/quota: Make grep search more accurately
The hook script was searching the info file for "features.quota" to know the
quota status (enable/disabled). When features.quota-deem-statfs the grep is not
accurate. Fixed this issue.

Change-Id: I4104a93c1c1e0ac9fd7ef7bfef993425ab50e651
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6380
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 21:30:32 -08:00
Varun Shastry
39968c0962 features/quota: Metadata cleanup
Quota and marker uses 'trusted.glusterfs.quota*' and 'trusted.pgfid*' xattrs to
store its configurations and accounting information and also to build the
parent inode chain in case of absense of path.

Problem:
After disabling and then enabling quota back, the xattrs may contain stale data
leading to impaired accounting and thus improper enforcement.

Solution:
Clean up all the quota related xattrs after quota disable.

Marker xlator implements a virtual xattr to cleanup quota and pgfid xattrs. In
this approach glusterd mounts an auxiliary mount and sends the below command to
all the files by crawling the mountpoint.

 #setfattr -n "glusterfs.quota-xattr-cleanup" -v 1 <path/to/file>

Credit:
Krishnan Parthasarathi <kparthas@redhat.com>
Varun Shastry          <vshastry@redhat.com>
Change-Id: I9380eca58a285dc27dd572de1767aac8f2cd8049
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6369
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 02:01:23 -08:00
Louis Zuckerman
efcfb60f87 Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)
Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e
BUG: 1047007
Signed-off-by: Louis Zuckerman <me@louiszuckerman.com>
Reviewed-on: http://review.gluster.org/6611
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-29 23:03:52 -08:00
Ajeet Jha
b198e072cd glusterd/geo-rep: more glusterd and cli fixes for geo-rep.
-> handle option validation cases in reset case.
    -> Creating valid conf path when glusterd restarts.
    -> Reading the gsyncd worker thread status and displaying it.
    -> Displaying status-detail per worker.
    -> Fetch checkpoint info in geo-rep status.
    -> use-tarssh value validation added.

misc: misc geo-rep fixes based on cluster, logrotate etc..
    -> cluster/dht: fix 'stime' getxattr getting overwritten.
    -> cluster/afr: return max of 'stime' values in subvol.
    -> geo-rep-logrotate: Sending SIGHUP to geo-rep auxiliary.
    -> cluster/dht: fix convoluted logic while aggregating.
    -> cluster/*: fix 'stime' min/max fetch logic.

Change-Id: I811acea0bbd6194797a3e55d89295d1ea021ac85
BUG: 1036552
Signed-off-by: Ajeet Jha <ajha@redhat.com>
Reviewed-on: http://review.gluster.org/6405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-12-12 00:16:25 -08:00
Kaleb S. KEITHLEY
f4488e3455 build: FedoraSCM sources are not longer needed to build RPMs
Also some updates to .gitignore

Change-Id: I576af453ca7d1ec1f3db21ee4d8386927988e7db
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-12-06 15:31:54 -08:00
Varun Shastry
50a6e9a740 features/quota: Add the quota config xattr to newly added brick
Issue:
Quota directory limit configuration is stored in the xattrs. When a new brick
is added these 'limit-set' xattrs have to be created to the directory in the
new brick. This is done by the dht directory healing when the directory is
created in the new brick. Since 'root' directory is already created DHT doesn't
heal the limit-set xattr root.

Solution:
When the add-brick command is issued run the below hook script to heal the
'limit-set' xattr. The hook script does the following only if limit is
configured on root.
    1. Create an auxiliary mount.
    2. getxattr 'limit-set' on the root
    3. setxattr the same value on the root
But this script needs the volume to be started to make the auxiliary mount.

To handle the case when the add-brick is issued when the volume was stopped,
symlink is created by the 'master' script to the corresponding location and
these two are by default disabled.

So, a 'master' script is added in the add-brick/pre. When add-brick command is
issued, it enables one of the scripts mentioned above based on the condition,
    if volume is started - enable add-brick/post script
    else                 - enable start/post script
After the actual script completes its job, it disables itself.

Note:
The enabling and disabling of the script is based on the glusterd's logic, that
it only runs the scripts which starts its name with 'S'. So,
    Enable     - symlink the file to 'S'*
    Disable    - unlink the symlink.

Change-Id: I2d3947a4d686c54417ec95f530af3bdd3444f4e2
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6104
Reviewed-by: Brian Foster <bfoster@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-11-26 11:57:11 -08:00
Harshavardhana
6e7817232c group-virt: To minimize 'split-brain' enable quorum under virt profile
Quorum as default is necessary when storing virtual machine images. It
would be necessary to enable both server and client quorum

Currently defaulted values are:
----------------
server-quorum-type=server
quorum-type=auto
----------------

Change-Id: Ic2adb5856ce3c2589476e872e988cae6eeb9b25e
BUG: 1032080
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6340
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-11-22 22:40:28 -08:00
Kaleb S. KEITHLEY
c47408e896 mgmt/glusterd: add option to specify a different base-port
This is (arguably) a hack to work around a bug in libvirt which is not
well behaved wrt to using TCP ports in the unreserved space between
49152-65535. (See RFC 6335)

Normally glusterd starts and binds to the first available port in range,
usually 49152. libvirt's live migration also tries to use ports in this
range, but has no fallback to use (an)other port(s) when the one it wants
is already in use.

Change-Id: Id8fe35c08b6ce4f268d46804bbb6dddab7a6b7bb
BUG: 1018178
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6210
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-31 09:31:21 -07:00
Poornima
f063951d75 extras/hook-scripts: Enable per client logging for gluster shares served by SAMBA
Edited hook scrips to add a variable in the option 'log file', which will be
substituted for client IP.

Change-Id: I50f143bb3114eb00afab2e1237d749804c885ca6
BUG: 1020848
Signed-off-by: Poornima <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/6109
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-22 12:55:37 -07:00
Bala.FA
9228618f9d build: disable logging framework on rhel6
As rsyslog-mmcount is not yet available in rhel6 variant, this patch
disables logging framework on rhel6 and its dependency

BUG: 1018308
Change-Id: I6b7c04640f8d38055e00c697d1017c7a530463d0
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6108
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-18 08:30:08 -07:00
Raghavendra Talur
11bb1fc584 extras/hookscripts: Fix the multiple entries in smb.conf problem.
Problem:
1. Force starts and user.smb sets were adding multiple entries to
the smb.conf file for the same volume.
Make a check for the entry and search with exact name.

2. Again, while deleting the share name from smb.conf search with
exact name so that volumes with names which are substrings of ones to
be deleted don't get deleted.

3. We don't need to use a tmp file while using sed -i, fixed that.

Change-Id: Ie0f7c9d4790ef9a177a043378a761c9ffe1628e5
BUG: 994727
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6043
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Lalatendu Mohanty <lmohanty@redhat.com>
2013-10-08 09:22:00 -07:00
Lalatendu Mohanty
31cacce770 hookscripts: Changes in hook scripts to make it work on all Linux/GNU distribution
Removed the hard coded values for smb.conf, smb logfile location and smbd.pid.
The current hook scripts also work for manully compiled (make, make install)
instance of gluster and Samba. But we have to manually copy the hook scripts
to respective locations.

Change-Id: I14056830fcd2ecb48b3c4df89265f4408c8de3e3
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/5947
Reviewed-by: poornima g <pgurusid@redhat.com>
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-04 17:05:35 -07:00
Aravinda VK
79ba7b3e2e geo-rep: logrotate: Logrotate handling
In existing georep logrotate was implemented by handling SIGSTOP
and SIGCONT, gsyncd was failing to start again after SIGSTOP.
New approach uses WatchedFileHandler in logging, which tracks the
log file changes or logrotate. Reopens the log file if logrotate is
triggered or if same log file is updated from other process.

As per python doc:
http://docs.python.org/2/library/logging.handlers.html:
The WatchedFileHandler class, located in the logging.handlers module,
is a FileHandler which watches the file it is logging to. If the file
changes, it is closed and reopened using the file name.

A file change can happen because of usage of programs such as newsyslog
and logrotate which perform log file rotation. This handler, intended
for use under Unix/Linux, watches the file to see if it has changed
since the last emit. (A file is deemed to have changed if its device
or inode have changed.) If the file has changed, the old file stream
is closed, and the file opened to get a new stream.

Change-Id: I30f65eb1e9778b12943d6e43b60a50344a7885c6
BUG: 1012776
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/5968
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-03 21:26:00 -07:00
Niels de Vos
124d93ed3e extras: add script and config for generating "Who wrote GlusterFS"
This script and configuration can be used to generate statistics similar
to the "Who wrote <linux-version>" series available on http://lwn.net.

Example usage for statistics from the initial branchpoint of 3.4 to the
current development of the release-3.4 branch:

 $ extras/who-wrote-glusterfs/who-wrote-glusterfs.sh \
       v3.4.0alpha...origin/release-3.4

By default the statistics will be calculated over the currently checked
out branch.

Change-Id: Ie7b8b655c50dcb14257e42599e2f89642c8b5b42
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5912
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-29 16:56:23 -07:00
Kaleb S. KEITHLEY
2e4064fe08 glusterd.service (systemd), ensure glusterd starts before local mounts
NOTICE: this patch was accepted onto the release-3.4 branch for 3.4.1,
but this same patch for master is languishing here in review.

Try (emphasis on the try) to ensure that glusterd starts, and in turn
starts glusterfsd before init attempt to mount any gluster (or gluster
NFS) volumes in /etc/fstab.

N.B. Joe Julian says this doesn't fix the problem for him, although it
worked for me in kvm. Lennart Poettering says it should, and we should
file a BZ against systemd if it doesn't. See
https://lists.fedoraproject.org/pipermail/devel/2013-July/185870.html

Change-Id: I4d8061217d8301beb0da485dc63a1984a7c57c37
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
BUG: 1004795
Reviewed-on: http://review.gluster.org/5823
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-20 11:50:15 -07:00
Justin Clift
90ec091755 Fix typo in systemd service definition file
Change-Id: Ia9dac04ad508fbaafbed24b2137b09872a1ca53c
BUG: 1010352
Signed-off-by: Justin Clift <jclift@redhat.com>
Reviewed-on: http://review.gluster.org/5981
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-09-20 11:03:22 -07:00
Venky Shankar
3bfa0dde13 glusterd/gverify.sh: Stops session being created with invalid slave details
create force will fail with proper message, if the ip is not
reachable, or is unable to fetch slave details.

Change-Id: I44a3ba777b37702ffd0e48e9cb46c51e293327d4
BUG: 988314
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5516
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-04 19:29:17 -07:00
Lubomir Rintel
898edbf133 doc: Move glusterd.vol to extras/ directory
It's actually not documentation.

Change-Id: I30c84abc9a31edb2f849dd2d6ff6d3129d87392d
Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com>
Reviewed-on: http://review.gluster.org/5474
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-22 23:59:01 -07:00
Raghavendra Talur
00a73eb528 extras/hookscripts: Add default logfile for glusterfs vfs plugin.
Glusterfs vfs plugin for samba makes call into gfapi which brings
up complete client process stack of gluster. Not having default
log file means not logging client process at all.

This patch adds default logfile and loglevel for vfs plugin.

Change-Id: Ie0fb6bbb445d6f3349fc35c713743094c0f08915
BUG: 999910
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5685
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-08-22 12:49:26 -07:00
Bala.FA
1ea8ee6bc9 log: add logger.conf.example file
This example file can be safely renamed as logger.conf to enable
syslog logging

Change-Id: If49dd6002a046915b2eca330b7a539f4fa1f94fa
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5622
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-14 13:06:31 -07:00
Bala.FA
fc82ae5ddf log: add comments to rsyslog gluster configuration file
Comments are added to rsyslog gluster configuration files to give
clear meanings and example email alerting.

Change-Id: I23577dc3b39bca89696c46ab6252dc5673d0803f
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5621
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-14 13:05:50 -07:00
Bala.FA
e75071a5ee log: add rsyslog gluster configuration file
This patch comes with rsyslog gluster configuration file for fedora
and rhel >= 6.  It disables syslog at rpm build time if targetted
platform is rhel < 6 as there is no rsyslog support.

Change-Id: I95c076874b6891ff08dee1b35980f95529fb0f37
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5543
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-08-13 07:08:21 -07:00
Raghavendra Talur
993001dadf extras/hook-scripts: Don't add multiple entries in smb.conf
When volume is force started, there may be entry in smb.conf
for that volume. Always check for entry before adding one.

Change-Id: I44f893174a993abaa31c24c1a81bb38a58617808
BUG: 994727
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5526
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-08-07 14:56:33 -07:00
Avra Sengupta
5757ed2727 glusterd/cli changes for distributed geo-rep
Commands:
gluster system:: execute gsec_create
gluster volume geo-rep <master> <slave-url> create [push-pem] [force]
gluster volume geo-rep <master> <slave-url> start [force]
gluster volume geo-rep <master> <slave-url> stop [force]
gluster volume geo-rep <master> <slave-url> delete
gluster volume geo-rep <master> <slave-url> config
gluster volume geo-rep <master> <slave-url> status

The geo-replication is distributed. The session will be created, and
gsyncd will be spawned on all relevant nodes, instead of only one
node.

geo-rep: Collecting status detail related data

Added persistent store for saving information about
TotalFilesSynced, TotalSyncTime, TotalBytesSynced

Changes in the status information in socket:
Existing(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;

New(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;SyncTime=0.69978;
TotalSyncTime=2.890044;TotalFilesSynced=6;TotalBytesSynced=143640;

Persistent details stored in
/var/lib/glusterd/geo-replication/${mastervol}/${eSlave}-detail.status

Change-Id: I1db7fc13ffca2e415c05200b0109b1254067f111
BUG: 847839
Original Author: Avra Sengupta <asengupt@redhat.com>
Original Author: Venky Shankar <vshankar@redhat.com>
Original Author: Aravinda VK <avishwan@redhat.com>
Original Author: Amar Tumballi <amarts@redhat.com>
Original Author: Csaba Henk <csaba@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5132
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-26 13:19:18 -07:00
Avra Sengupta
b13c483dca gsyncd: distribute the crawling load
* also consume changelog for change detection.
* Status fixes
* Use new libgfchangelog done API
* process (and sync) one changelog at a time

Change-Id: I24891615bb762e0741b1819ddfdef8802326cb16
BUG: 847839
Original Author: Csaba Henk <csaba@redhat.com>
Original Author: Aravinda VK <avishwan@redhat.com>
Original Author: Venky Shankar <vshankar@redhat.com>
Original Author: Amar Tumballi <amarts@redhat.com>
Original Author: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5131
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-26 13:18:57 -07:00
Niels de Vos
72aef87eed test-ffop: the result of (O_TRUNC|O_RDONLY) is unspecified
On RHEL-6 an open(.., O_TRUNC|O_RDONLY) fails. test-ffop expects this to
succeed, but the behaviour is unspecified according to 'man 2 open':

       O_TRUNC
              If  the  file  already exists and is a regular file and the open
              mode allows writing (i.e., is O_RDWR or  O_WRONLY)  it  will  be
              truncated to length 0.  If the file is a FIFO or terminal device
              file, the O_TRUNC flag is  ignored.   Otherwise  the  effect  of
              O_TRUNC is unspecified.

Change-Id: I76b55419871fc758cbe82532f9b75476a0c14101
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5268
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-10 01:58:11 -07:00
Raghavendra Talur
ac62c953e4 extras/hook-scripts: Set of changes for new samba share method.
New method of creating a share of gluster volume
through samba eliminates the requirement of fuse
mount and changes in fstab.

glusterfs vfs plugin has to be specified as required
vfs object.
Path now is relative to the root of gluster volume.
/ signifies complete volume.

Change-Id: I3d80452cd58513ef59d6a816c1ab62ebc3b76a62
BUG: 953694
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5247
Reviewed-by: José Rivera <jrivera@redhat.com>
Tested-by: José Rivera <jrivera@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-28 09:25:07 -07:00
Kaleb S. KEITHLEY
e216e2e6fc build: sync glusterfs.spec.in with Fedora glusterfs.spec
* fix the hardening fix for shlibs
* use %{__sed} macro
* better short ChangeLog
* fix hard-coded path in extras/systemd/glusterd.service in, use @prefix@

Change-Id: I267244b68a97cbcd6f6ab62fc322c78db45023bb
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5264
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-06-28 09:23:17 -07:00
Kaleb S. KEITHLEY
f7b1245ca2 build: sync glusterfs.spec.in with Fedora glusterfs.spec
* add glusterfs-api and glusterfs-api-devel sub-packages
 * add extras/systemd/glusterd.service. Use it (or extras/init.d/glusterd)
   instead of the Fedora versions.
 * restores ability to build glusterfs RPMs from the dist tarball with
   'rpmbuild {-ts,-tb,-ta} glusterfs-XXX.tar.gz'
 * other minor cleanups mostly to sync with fedora .spec and to build
   from the dist tarball. Any differences will be resolved in the fedora
   .spec in the next release (i.e. beta4 or GA).

(still considering whether to add fedora glusterfsd.{init,service} files
to glusterfs or remove them from fedora.)

BUG: 950083
Change-Id: Ibda3cd57b24ef5c2a27446703e718e5044ec546c
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-06-26 04:36:47 -07:00
Niels de Vos
689618e2fc extras: prevent "glusterd dead but subsys locked"
Commit b5bf14a6 added support for a file under /var/lock/subsys,
Hoewever, killproc does remove the $PIDFILE which cases subsequent
checks on its existence to fail. When glusterd was stopped successfully,
the $PIDFILE has been removed already, there is no need to try to remove
is again.

Upon executing '/sbin/service glusterd status', the message 'glusterd
dead but subsys locked' would be returned because the file under
/var/lock/subsys was not removed.

Bug: 960476
Change-Id: I781fe463e3c5472e42d668155cee4f63d349a568
Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5074
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-05-25 11:41:29 -07:00
Niels de Vos
323fe9ec80 rpm: automatically load the fuse module on EL5
The fuse module needs to be loaded before /dev/fuse can be used. On
RHEL6 and Fedora the module is loaded on demand. RHEL5 needs to load the
module manually.

This change add a script under /etc/sysconfig/modules/ that loads the
fuse module on boot and packages it in the EL5 version of
glusterfs-fuse.

One of the features of GlusterFS is to not depend on additional fuse
userspace. The conditional requires on /usr/bin/fusermount is not
needed, this command is never called in the current version (even though
is it referenced in the sources).

Change-Id: I77028dade54771cb49cea68a517100f73763dc85
BUG: 947830
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5070
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-22 12:20:46 -07:00
Peter Portante
40d026e100 object-storage: final removal of ufo code
See https://git.gluster.org/gluster-swift.git for the new location of
the Gluster-Swift code.

With this patch, no OpenStack Swift related RPMs are constructed.

This patch also removes the unused code that references the
user.ufo-test xattr key in the DHT translator.

Change-Id: I2da32642cbd777737a41c5f9f6d33f059c85a2c1
BUG: 961902 (https://bugzilla.redhat.com/show_bug.cgi?id=961902)
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4970
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-10 11:03:55 -07:00
Niels de Vos
b5bf14a6ab extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys
Without a lockfile under /var/lock/subsys, the glusterd service is not
stopped on shutdown or reboot.

Change-Id: I9dc9b4204c5c39879c22191b2e8a2b81a4f3a58a
BUG: 960476
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4960
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-07 11:44:29 -07:00