6351 Commits

Author SHA1 Message Date
Kasturi Narra
29e183b41b doc: Adding documentation for file-snapshot
Change-Id: I52b70a2fb24f5e3f802f0ce8b1c50102c267e218
BUG: 1086750
Signed-off-by: Kasturi Narra <knarra@redhat.com>
Reviewed-on: http://review.gluster.org/7487
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-21 13:53:06 -07:00
Krishnan Parthasarathi
31c9cd4631 glusterd: pass the right argument for perf subgraph
Change-Id: Ic292dcd8e477066c1079f0f1e170f5153459b029
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/7514
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-21 10:25:51 -07:00
Niels de Vos
20e317011a fuse: prevent READDIR(P) from writing to much data to /dev/fuse
In an environment with mixed architectures (32-bit servers, 64-bit
client), it is possible that the on-wire Reply on a READDIR(P) procedure
contains more direntries than the client can fit in the maximum size
that the fuse-request indicated.

A direntry is a dynamically sized structure, because the structure
contains the name of the entry. The client sends a maximum size in the
READDIR(P) Call to the server, and the server uses this size to limit
the number of direntries to return. In case the server can pack more
direntries in the requested maximum size (due to alignment differences
between the architectures), it can happen that the client unpacks the
list of direntries into a buffer that exceeds the maximum size that was
given in the initial fuse-request.

This change introduces a check for the maximum requested size of the
fuse-response in fuse_readdir_cbk() and fuse_readdirp_cbk(). When the
conversion from gluster-direntries to the fuse-direntry format takes
place, the maximum size is checked, and the 'extra' direntries are
discarded. The next readdir()/getdents() that is done, will fetch the
just discarded direntries again.

In addition to this bugfix, some extra logging in send_fuse_iov() and
send_fuse_data() has been added to help diagnosing similar issues.

Change-Id: If2eecfcdf9c248f3820035601446d2c89ff9d1a1
BUG: 1074023
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7278
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-21 10:25:21 -07:00
Anand Avati
2da51737c4 strfd: memory backed file descriptor
A file descriptor like interface, backed by a string, on which
fprintf() like IO can be performed. Internally the backing string
is grown on demand.

Useful in generating virtual file content on the fly (used in meta)

Change-Id: I60d8751c4c750f3f06aa454a4ccd9909b3ac8ac7
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7508
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-21 09:30:46 -07:00
Anand Avati
11473a6a10 common-utils: new dirent compatible time fmt
Introduce a new time format without "/" and spaces, in order to
be used in (virtual) filenames.

Change-Id: I468be54f1ec7f45265add4c458e19d95567439f7
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7507
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-04-20 18:07:44 -07:00
Anand Avati
81b32ab6e1 fuse: allow xlators to request for direct-io-mode on virtual files
Translators like meta, create virtual files with dynamic content
generated only at the time of open(). Therefore the file size
returned in lookup or stat is 0 (just like files in /proc). However
the VFS does not read beyond the size, and if the size is 0, no
READ ever reaches gluster for that file -- unless direct-io-mode
is enabled.

This patch allows translators to return "direct-io-mode" flag for
such 0-byte virtual files in xdata of open_cbk/create_cbk.

Change-Id: I3fe3312cd96baa4eecfe1247ab7255b4f455f049
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7506
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-04-20 18:07:24 -07:00
Anand Avati
bac02a359f fuse-resolve: loc_wipe() after inode_link()
the inode to be linked may have the last ref. loc_wipe() can
destroy it before inode_link() gets to ref it.

Change-Id: Ic2d44084e6e9c8289f35cae82c8e4575af105398
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7505
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-04-20 18:07:11 -07:00
Anand Avati
a67630b397 defaults: add new symbol default_fops
with members filled with pointers to appropriate default methods

Change-Id: I6cdc43e4f6776e2ad45cd5cbca5642e0c639ffde
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7504
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-04-20 18:06:57 -07:00
Soumya Koduri
99d86b1a1a Added Handle-based ops to get/set/remove extended attributes in the libgfapi.
Change-Id: I1a8e666018d7b93e0bba2d9882935681da909980
BUG: 1089414
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/7308
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-18 13:21:05 -07:00
Niels de Vos
580ac71d3b rdma: correct some spelling mistakes
Change-Id: Ib7018aa8a79d36ab942516457a79039cb3e67355
BUG: 1088849
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7498
Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-17 15:06:05 -07:00
Anand Avati
02ac5fa4b5 cluster/dht: force set dir inode ctx cached time in setattr()
In setattr, the inode times may have been explicitly set "back
in time". In such cases, if the inode ctx times are not force
set, then they continue to be higher and continue serving the
higher/older value in future calls to dht_inode_ctx_time_update()

Change-Id: I9cbfa7cf7c4069b0106d1f462de08c5d59bc91b5
BUG: 1083324
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7378
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11: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
Krutika Dhananjay
c7d59dc008 doc: Upgrade steps for quota
Change-Id: Ib007029f74f52d28e424a15950d46504336bde10
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7419
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11:35:08 -07:00
Niels de Vos
36ae3edd20 mount.glusterfs: return 32 in case of double mounting
The mount.nfs helper returns 32 for this particular error case. It makes
sense for mount.glusterfs to return the same error value.

Change-Id: I628f4c93bc796bb096e91857195ffd3d296eaae9
BUG: 1031973
Reported-by: Deepak C Shetty <deepakcs@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7469
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11:28:35 -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
Jeff Darcy
d6ad57239d doc: add documentation for NUFA feature
Change-Id: I00f1c669d4ebc61f09c50f8de4c893907f6d75c2
BUG: 1086745
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/7489
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-16 10:37:34 -07:00
Jeff Darcy
686ee24a80 doc: add documentation for server-quorum feature
Change-Id: Ifaf5c18a320270a9b98c7b25536281fa42b64ad3
BUG: 1086765
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/7491
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-16 06:40:06 -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
Prashanth Pai
c29a9d63b3 doc: Add doc for network compression xlator
Change-Id: Iaed94f1bfe7c97eade95923759980a1d10805663
BUG: 1086752
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/7479
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>
2014-04-16 06:36:48 -07:00
Krishnan Parthasarathi
a9d4d369ef dict: add dict_set_dynstr_with_alloc
There is an overwhelming no. of instances of the following pattern in
glusterd module.

    ...

    char *dynstr = gf_strdup (str);
    if (!dynstr)
       goto err;
    ret = dict_set_dynstr (dict, key, dynstr);
    if (ret)
       goto err;

    ...

With this changes it would look as below,

   ret = dict_set_dynstr_with_alloc (dict, key, str);
   if (ret)
       goto err;

Change-Id: I6a47b1cbab4834badadc48c56d0b5c8c06c6dd4d
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/7379
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-04-14 09:15:14 -07:00
Kaleb S. KEITHLEY
09d2dcac3a configure: argp-standalone is always built, even when not needed
This patch still configures argp, i.e. creates Makefile in
/contrib/argp-standalone, for the `make dist`, but there's no reason
to compile it when it's not going to be linked into anything.

Change-Id: Id0fcb717b5821d8a4c176e6274339f46b3a4a249
BUG: 1086773
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/7440
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-13 14:34:37 -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
Harshavardhana
493e7c1934 pkg-version: Use /bin/bash instead of /bin/sh
`function` is reserved word only available in /bin/bash,
Using `/bin/sh` with `function` keyword fails on Ubuntu.

Change-Id: Ia0fff8f13ace2a0eb1dac50093ff42294d960814
BUG: 1074919
Reviewed-on: http://review.gluster.org/7439
Reviewed-by: Bala FA <barumuga@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-12 07:59:29 -07:00
Krutika Dhananjay
712541cdef logging: Make logger and log format configurable through cli
Change-Id: Ic4b701a6621578848ff67ae4ecb5a10b5f32f93b
BUG: 1075611
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7372
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 18:00:54 -07:00
Niels de Vos
e73af16885 mount.glusterfs: return an error when mounting failed
When mounting fails, mount.glusterfs incorrectly returns 0 for some
error cases, it should return 1 instead. Also make sure that error
messages are redirected to /dev/stderr and not printed to stdout.

Unfortunately it is not possible with the current test-scripts to test
commands like 'mount -t glusterfs ...'. Any mounting of Gluster volumes
is done directly with the 'glusterfs' command instead.

Change-Id: Ica9d45b6d5ae537de869a1fa0f6c3edab47225d1
BUG: 1031973
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7441
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 17:58:59 -07:00
M S Vishwanath Bhat
d69c1bd9b4 Adding admin-guide for distributed-geo-rep
Change-Id: Icbbc9d3fc14fc1a5ae9550f096eb69dda41e92a4
BUG: 1086796
Signed-off-by: M S Vishwanath Bhat <vbhat@redhat.com>
Reviewed-on: http://review.gluster.org/7437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 17:40:41 -07:00
Niels de Vos
1c079acf4e doc: add documentation for the "Brick Failure Detection" feature
The documentation from the feature page should be included in the
sources.

Change-Id: I4fd67ce1c56afc5236c00de8be9110dfa6bbe91f
BUG: 1086700
Feature-page: http://www.gluster.org/community/documentation/index.php/Features/Brick_Failure_Detection
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7449
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 17:40:12 -07:00
Kaushal M
0e7f8af0db cli,glusterd: Improve detach check validation
This patch improves the validation for the 'peer detach' command.

A check for if volumes exist with some bricks on the peer being detached
validation is added in peer detach code flow (even force would have this
validation).

This patch also gurantees that peer detach doesn't fail for a volume with all
its brick on the peer which is getting detached and there are no other bricks on
this peer.

The following steps need to be followed for removing a downed and unrecoverable
peer.
* If a replacement system is available
  - add it to the cluster
  - use replace-brick to migrate bricks of the downed peer to the new
    peer (since data cannot be recovered anyway use the 'replace-brick
    commit force' command)
  or,
  If no replacement system is available,
  - remove bricks of the downed peer using 'remove-brick'

Change-Id: Ie85ac5b66e87bec365fdedd8352b645bb25e1c33
BUG: 983590
Signed-off-by: Kaushal M <kaushal@redhat.com>
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/5325
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 17:12:10 -07:00
Avra Sengupta
29bccc2ed1 gluster: GlusterFS Volume Snapshot Feature
This is the initial patch for the Snapshot feature. Current patch
includes following features:
* Snapshot create
* Snapshot delete
* Snapshot restore
* Snapshot list
* Snapshot info
* Snapshot status
* Snapshot config

Change-Id: I2f46920c0d61c515f6a60e0f8b46fff886d9f6a9
BUG: 1061685
Signed-off-by: shishir gowda <sgowda@redhat.com>
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7128
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-11 16:29:17 -07:00
Bala.FA
2045c9ea1c build: rearrange spec file elements
This is majorly cleanup wrt spec file elements/definitions.  This
patch fixes to ease adding downstream specific conditions.

BUG: 1074939
Change-Id: I311abf8457417591a0d08569d3f83d73fa63cdc0
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7165
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-04-10 04:53:30 -07:00
Bala.FA
4bacb40fc8 build: set version based on git tag or specific
This patch brings version and release number generated at build time
using git tags or fixed content from VERSION file.

With git tag, version/release number are got from output of
'git describe --tags --match "v[0-9]*"' command.

This behavior can be overriden by having VERSION file with fixed
version/release.  The VERSION file should have text describing version
and release for example something like 'v3.4.0-1'

For testing this patch, its required to remove autom4te.cache
directory to avoid seeing previously set version.

BUG: 1074919
Change-Id: I8f68172e8b389b0ba0846e9adb4b597e67a909aa
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7164
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-04-10 04:52:28 -07:00
Vijay Bellur
8d7dde6b32 cluster/afr: Set right argument order for STACK_WIND_COOKIE
Change-Id: Ia26e17a7147ed825319c7c29880b9cf4ae80a48c
BUG: 1085259
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/7416
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-10 00:00:29 -07:00
Jeff Darcy
aa199093fd glusterd: call runner_end even if runner_start fails
Change-Id: I5eca01a131307ba3be2aed4922eea73025ff284c
BUG: 1081013
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/7360
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-09 01:20:46 -07:00
Pranith Kumar K
19d9a31263 cluster/afr: Mem leak fixes found in valgrind for iozone
Change-Id: I869d191dc3470b2208c17343bbf772f01ef744cb
BUG: 1085511
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7424
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-09 01:17:28 -07:00
Vijay Bellur
cbe454b718 features/locks: Fix a missing assignment in new_entrylk_lock()
Change-Id: If5c03456d61ec930d588b57781fb545eed18e4a2
BUG: 1085220
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/7413
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
2014-04-08 23:40:26 -07:00
Pranith Kumar K
5216e53ded cluster/afr: Init local on txn-frame for zerofill
Change-Id: I516f4fb0237dd0b3e512117bf987cea69f8678b8
BUG: 1084485
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7407
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-08 11:20:49 -07:00
Niels de Vos
8235de1898 rpc: warn and truncate grouplist if RPC/AUTH can not hold everything
The GlusterFS protocol currently uses AUTH_GLUSTERFS_V2 in the RPC/AUTH
header. This header contains the uid, gid and auxiliary groups of the
user/process that accesses the Gluster Volume.

The AUTH_GLUSTERFS_V2 structure allows up to 65535 auxiliary groups to
be passed on. Unfortunately, the RPC/AUTH header is limited to 400 bytes
by the RPC specification: http://tools.ietf.org/html/rfc5531#section-8.2

In order to not cause complete failures on the client-side when trying
to encode a AUTH_GLUSTERFS_V2 that would result in more than 400 bytes,
we can calculate the expected size of the other elements:

    1 | pid
    1 | uid
    1 | gid
    1 | groups_len
   XX | groups_val (GF_MAX_AUX_GROUPS=65535)
    1 | lk_owner_len
   YY | lk_owner_val (GF_MAX_LOCK_OWNER_LEN=1024)
  ----+-------------------------------------------
    5 | total xdr-units

  one XDR-unit is defined as BYTES_PER_XDR_UNIT = 4 bytes
  MAX_AUTH_BYTES = 400 is the maximum, this is 100 xdr-units.
  XX + YY can be 95 to fill the 100 xdr-units.

  Note that the on-wire protocol has tighter requirements than the
  internal structures. It is possible for xlators to use more groups and
  a bigger lk_owner than that can be sent by a GlusterFS-client.

This change prevents overflows when allocating the RPC/AUTH header. Two
new macros are introduced to calculate the number of groups that fit in
the RPC/AUTH header, when taking the size of the lk_owner in account. In
case the list of groups exceeds the maximum possible, only the first
groups are passed over the RPC/GlusterFS protocol to the bricks.
A warning is added to the logs, so that most system administrators will
get informed.

The reducing of the number of groups is not a new inventions. The
RPC/AUTH header (AUTH_SYS or AUTH_UNIX) that NFS uses has a limit of 16
groups. Most, if not all, NFS-clients will reduce any bigger number of
groups to 16. (nfs.server-aux-gids can be used to workaround the limit
of 16 groups, but the Gluster NFS-server will be limited to a maximum of
93 groups, or fewer in case the lk_owner structure contains more items.)

Change-Id: I8410e59d0fd246d601b54b961d3ae9cb5a858c10
BUG: 1053579
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-08 10:50:52 -07:00
Aravinda VK
07df69edc8 geo-rep: fix the code bug introduced due to flake8 refactoring
Sorry for the bug, which got introduced due to code refactoring.
http://review.gluster.org/#/c/7311/

Change-Id: Ide519ca114aa8a7d7624d7af99945c857f069069
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/7417
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-08 10:05:41 -07:00
Poornima G
6567d141c1 gfapi: In glfs_set_volfile_server() remove the port number check.
The documentation for glfs_set_volfile_server() api says that the
port zero is a valid value. Specifying 0 uses the default port
number GF_DEFAULT_BASE_PORT. Hence removing the check for port being
zero.

Change-Id: I942a7fe54a418231a438ab67756537df8f28d2de
BUG: 1084964
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/7409
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-08 01:35:23 -07:00
Justin Clift
aef305334c tests: Increase bug-865825.t wait time for self-heal daemon
BUG: 1084653
Change-Id: I057bbd2e50803344552314b32d2d0e6240bf9604
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7404
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-07 22:52:11 -07:00
Aravinda VK
238d101e55 geo-rep: code pep8/flake8 fixes
pep8 is a style guide for python.
http://legacy.python.org/dev/peps/pep-0008/

pep8 can be installed using, `pip install pep8`

Usage: `pep8 <python file>`, For example, `pep8 master.py`
will display all the coding standard errors.

flake8 is used to identify unused imports and other issues
in code.

pip install flake8

cd $GLUSTER_REPO/geo-replication/
flake8 syncdaemon

Updated license headers to each source file.

Change-Id: I01c7d0a6091d21bfa48720e9fb5624b77fa3db4a
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/7311
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-07 21:56:55 -07:00
Ravishankar N
0c20b17c09 tests/afr: self-heal
Basic functional tests related to self-heal.

arequal-checksum.c is taken from
https://github.com/raghavendrabhat/arequal after consent from all
authors.

Change-Id: I43facc31c61375f4dbe58bbb46238e15df5c9011
BUG: 1080759
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7357
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-07 09:49:16 -07:00
Kaushal M
ef08cf0fb6 feature/barrier: Add statedump support
This patch adds statedump support for barrier. This currently dumps
barrier xlators private information and the queue of barriered fops.

Change-Id: I273eb6e676db02c40c363feeff58a79737dc041e
BUG: 1060002
Reviewed-on: http://review.gluster.org/7136
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-07 08:00:50 -07:00
Varun Shastry
b69c4c843c features/barrier: add barrier translator
gluster feature page:
http://www.gluster.org/community/documentation/index.php/Features/Server-side_Barrier_feature

Change-Id: Ia9f8802a54d1ffbd1cf789b80f5d30819bf65f64
BUG: 1060002
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6928
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-07 00:59:50 -07:00
Krutika Dhananjay
d586ecc0a5 log: Add missing log message from glusterfsd.c to glusterfsd-messages.h
... by retaining GLFS_NUM_MESSAGES as 33 which is its correct value.

Also replace all occurrences of gf_log with gf_msg/gf_msg_debug.

Change-Id: Ibfbe1d645de521e8d59ca406f78b1a8eb08aa7e0
BUG: 1075611
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7371
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-05 11:15:31 -07:00
Kaleb S. KEITHLEY
091c49d85c rpm: fix broken glusterfs-server install of hooks
the %ghost hook directories are no longer ghosts now that files
are installed in them

Change-Id: I6133b891c73d87e4e35dc9c6c7ba7febbc9e2e7f
BUG: 1080970
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/7391
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-05 11:14:48 -07:00
Harshavardhana
b66568b6cb build: move argp-standalone into contrib/ directory
Change-Id: Iedcddf95c3577da644c0aebbb297b04c93f1b6fe
BUG: 1081274
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7352
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-04 21:52:10 -07:00
Justin Clift
d8dd404914 cli: Trivial wording improvement of a comment
Change-Id: Ib569b39bdf0357c30c94c7a1b8d3ff87b811841c
Reviewed-on: http://review.gluster.org/7403
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Justin Clift <justin@gluster.org>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-04 10:39:48 -07:00
Brian Foster
50b33f4050 afr: Simple 1-liner fix for crash in Rackspace
BUG: 1084485
Change-Id: I89ddf10add041638ef70baebbce0ec2807ef4b6d
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7402
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-04 09:48:44 -07:00
Atin Mukherjee
d5072db4c5 cli : Removal of dead code
dead code reported by covscan is removed from cli-cmd-parser.c

Fix for coverity CID: 1195423

Change-Id: Ice1771dc8b3ef47fd2e63b380b12e850dc1d5d95
BUG: 789278
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/7389
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-04-04 06:36:08 -07:00