32 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Kaleb S. KEITHLEY
84f5e4b354 glusterfs.spec.in: resync with Fedora glusterfs.spec
Resync with Fedora's glusterfs.spec, being careful to preserve recent
additions to the glusterfs.spec.in such as the package-config for -devel
and the OCF sub-package

To build a set of RPMs:
 % ./autogen.sh
 % ./configure --enable-fusermount
 % make dist
 % cd extras/LinuxRPM && make glusterrpms

Updated rpm.t, hopefully build system has all the dependencies to build UFO

BUG: 819130
Change-Id: I1b1c161337ad780cf7d3ab401fa1b10648f38cbd
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4454
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 19:32:02 -08:00
Kacper Kowalik (Xarthisius)
779004dbcd Respect autotools docdir variable
Change-Id: If20d0806a925b880e0ba9bbc66604cae6c51ce6b
BUG: 859861
Signed-off-by: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>
Reviewed-on: http://review.gluster.org/3971
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-07 16:38:06 -08:00
Niels de Vos
06d4cced24 build: include OCF resource agents by default and package them
This change introduces a glusterfs-resource-agents sub-package that
contains the Open Cluster Framework (OCF) Resource Agents (RA). It also
changes the build infrastructure to include the RA by default, making
them available for anyone who is interested in using them with a OCF
compatible Hight-Availability solution like Pacemaker.

Build the RPMs without RA:
$ make dist && rpmbuild -ta --without ocf *.gz

Build the RPMs with RA (default):
$ make dist && rpmbuild -ta *.gz

There is no need to run ./autogen.sh from within the .spec, the whole
autotools infrastructure is included in the 'make dist' tarball already.

This also adds a test-case which builds the rpms with mock for the
latest two EPEL releases.

Change-Id: I12ef5f30f466868825352376156fb4e56b135c58
BUG: 869559
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4130
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2012-12-12 10:58:45 -08:00
Filip Pytloun
6d58cb0476 RHEL init script: ability to overwrite options from sysconfig
Change-Id: I15df0aef73e097a9ccfb00e2d4cae81d3a5a82fc
BUG: 885739
Signed-off-by: Filip Pytloun <filip.pytloun@gooddata.com>
Reviewed-on: http://review.gluster.org/4290
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2012-12-12 07:36:26 -08:00
Krishnan Parthasarathi
5ec55a34c9 Added virt group file - template for 'group' set
- This sample file contains the set of volume options
  that are associated with volumes that would be used to
  store VMs.

- To enable the set of options present in this file one must
  do the following,
  - # cp extras/group-virt.example /var/lib/glusterd/groups/<group-name>
    # gluster volume set <volume-name> group <group-name>

Change-Id: I8848d3d222ce114900db885aeef2f20c83ece28c
BUG: 851237
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4232
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-12-11 16:42:14 -08:00
Florian Haas
61c1d77f22 Add OCF compliant resource agents for glusterd and volumes
These resource agents plug glusterd into Open Cluster Framework
(OCF) compliant cluster resource managers, like Pacemaker.

The glusterd RA is fairly trivial; it simply manages the glusterd daemon
like any upstart or systemd job would, except that Pacemaker can
do it in a cluster-aware fashion.

The volume RA is a bit more involved; It starts a volume and monitors
individual brick's daemons in a cluster aware fashion, recovering bricks
when their processes fail.

Note that this does NOT imply people would deploy GlusterFS servers
in pairs, or anything of that nature. Pacemaker has the ability to
deploy cluster resources as clones, meaning glusterd and volumes would be
configured as follows in a Pacemaker cluster:

primitive p_glusterd ocf:glusterfs:glusterd \
	op monitor interval="30"
primitive p_volume_demo ocf:glusterfs:volume \
	params volname="demo" \
	op monitor interval="10"
clone cl_glusterd p_glusterd \
	meta interleave="true"
clone cl_volume_demo p_volume_demo \
	meta interleave="true" ordered="true"
colocation c_volume_on_glusterd inf: cl_volume_demo cl_glusterd
order o_glusterd_before_volume 0: cl_glusterd cl_volume_demo

The cluster status then looks as follows (in a 4-node cluster; note
the configuration above could be applied, unchanged, to a cluster
of any number of nodes):

============
Last updated: Fri Mar 30 10:54:50 2012
Last change: Thu Mar 29 17:20:17 2012 via crmd on gluster02.h
Stack: openais
Current DC: gluster03.h	- partition with quorum
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558
4 Nodes configured, 4 expected votes
8 Resources configured.
============

Online: [ gluster02.h gluster03.h gluster04.h gluster01.h ]

 Clone Set: cl_glusterd [p_glusterd]
     Started: [ gluster02.h gluster03.h gluster04.h gluster01.h ]
 Clone Set: cl_volume_demo [p_volume_demo]
     Started: [ gluster01.h gluster02.h gluster03.h gluster04.h ]

This is also a way of providing automatic glusterd and brick recovery
in systems where neither upstart nor systemd are available.

Change-Id: Ied46657bdfd2dd72dc97cf41b0eb7adcecacd18f
BUG: 869559
Signed-off-by: Florian Haas <florian@hastexo.com>
Reviewed-on: http://review.gluster.org/3043
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-24 17:46:48 -07:00
Vijay Bellur
36db38a572 build: Install glusterfs-logrotate as config file
Change-Id: I8255eb4249503eac0add87444da934256faffc01
BUG: 860037
Reviewed-on: http://review.gluster.org/3973
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-25 22:22:06 -07:00
Niels de Vos
4ba54d10f0 extras: install clear_xattrs.sh
The script was not installed by default, this breaks building the RPM
packages since Change-Id Iba695a6d19389fbc1776da5e939d67318916aadf.

Change-Id: I4fb982cb5217dc7b3ec3c7a664dd3997a2e05170
BUG: 812214
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.com/3659
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-12 09:27:25 -07:00
Krishnan Parthasarathi
fdcbf065a9 glusterfs.spec: Added hook-scripts in server rpm
Change-Id: Idd0ed2a72ea9ec947eaf142b889730e8d4be63c1
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3211
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-23 05:31:02 -07:00
Amar Tumballi
44fca3bae2 add 'logrotate' config file to the package
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2053 (We need to support the standard *nix 'logrotate' for server and client log files.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2053
2011-05-04 06:00:58 -07:00
Raghavendra G
476b672347 extras: scripts to cleanup xattrs stored by quota.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>

BUG: 2664 (Quota: recreating the volume on same bricks shows similar info as for earlier one using "list")
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2664
2011-04-07 11:40:05 -07:00
Amar Tumballi
08ca1d3c78 removed some of the stale scripts
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 2393 ('gluster-volgen' and 'gluster-defrag' scripts are stale, but present in AMI)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2393
2011-02-10 22:18:01 -08:00
Vijay Bellur
be4dee16c1 Changes for Dynamic Volume Management
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1196 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1196
2010-07-22 23:10:38 -07:00
Amar Tumballi
654a720eed proper way to do defrag of a mountpoint
Usage: "glusterfs-defrag <MOUNTPOINT>"

there are new features added to distribute with this patch:

* bash# getfattr -n trusted.distribute.linkinfo <file>
  Gives output in the format "<hostname>:<directory>", if there is a
  linkfile present, where hostname is server, directory is backend
  directory where the actual linkfile is present.

* bash# getfattr -n trusted.glusterfs.pathinfo <path>
  Gives layout information if directory, and info about actual
  location of file in backend servers, in the form of
  'hostname:directory'. (TODO: should extend it to all xlators)

* bash# getfattr -n trusted.distribute.fix.layout <path>
  scales out the directory layout in distribute, so when new
  servers are added, layouts are fixed to include them.

* removed 'scale-n-defrag.sh' as its no more required.

* changed 'defrag.sh' to have a feature to specify target bricks,
  so defrag happens to only those nodes. moved the file to
  'glusterfs-defrag', which now gets installed to '${prefix}/bin'

* storage/posix:
  takes new option 'hostname' so it can resolve to same hostname
  given during 'gluster volume create'.
  with 'trusted.glusterfs.pathinfo' posix returns the value in
  'hostname:real_path' format.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1073 ('gluster defrag <VOLNAME>' fails in mainline)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1073
2010-07-14 14:44:26 -07:00
Pavan Sondur
e66adead70 extras: Add script to be used before using quota translator.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 569 (Memory leak in quota translator)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=569
2010-03-09 00:24:57 -08:00
Pavan Sondur
a6a1f596a4 extras: Add defrag scripts to the repository
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 478 (Add defrag scripts into glusterfs)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=478
2010-01-19 05:56:39 -08:00
Harshavardhana Ranganath
057c071403 Volgen supporting multidisks and booster configuration for nfs and cifs
Signed-off-by: Harshavardhana <harsha@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 396 (Volgen multiple export directory support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=396
2009-11-26 03:04:22 -08:00
Pavan Sondur
ef078a3359 Add glusterfs-volgen to master, change fusermount options and other changes to rpm spec file.
The patch has the following changes:
* Rename glusterfs-volgen.py and include it in the rpm spec file
* Enable fusermount by default. Change fusermount configure option from disable to enable.
* Remove BDB from configure.ac, essentially removing it from the normal build.
* Remove all dependencies on fuse in the rpm spec file.

Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 343 (Placeholder bug for adding volgen into rpm, bdb makefile changes, etc)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=343
2009-11-11 23:18:19 -08:00
Pavan Sondur
7e66ba43d7 Add glusterfs-volgen to master
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 343 (GlusterFS volume generator - 'volgen')
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=343
2009-10-28 06:40:36 -07:00
Anand V. Avati
adb56cb5e0 backend-xattr-sanitize.sh: script added to extras/
Run the script as:

sh$ ./backend-xattr-sanitize.sh /data/export0

and it will remove all the known stale xattrs on the backend files and dirs
2009-05-07 15:12:09 +05:30
Anand V. Avati
d886ceb9cb minor build fix - set EXTRA_DIST to point to MacOSX/Portfile instead of Portfile 2009-04-23 11:09:37 +05:30
Amar Tumballi
093141a749 added migration script from unify based setup to distribute based setup
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-18 11:15:23 +05:30
Harshavardhana
24f80a408c Removed unncessary EXTRA_DIST entries and updated benchmarking directory
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-28 00:06:33 +05:30
Vikas Gorur
77adf4cd64 Added all files 2009-02-18 17:36:07 +05:30