6813 Commits

Author SHA1 Message Date
Emmanuel Dreyfus
6ff2fd2e05 Do not call rpc_transport_unref() on NULL trans
rpc_clnt_disable() sets rpc->conn->trans to NULL, hence we should not
call rpc_transport_unref() afterwards. I moved it before the
rpc_clnt_disable() call, but I am not sure it should be called at all,
perhaps it should just go away.

BUG: 764655
Change-Id: I488d0207494e3a3fad52e64e67b2e740b236b864
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8393
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2014-08-04 02:09:29 -07:00
Atin Mukherjee
36a6652f5d glusterd: Bump max op version
Change-Id: Ic66a0a751233ebbcb65d13f7e3265a046fae9a0b
BUG: 1125431
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/8397
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-08-03 22:08:22 -07:00
Vijaikumar M
8080a5555e glusterd/snapshot: Inherit the mount options of a original brick
when creating snapshots

When creating a snapshot a LVM is created at the backend and is mounted
under /var/run/gluster/snaps/... However, this mount does not inherit
the mount options for the original brick acting as the parent for the
snap.

If the snap is restored, this could lead to performance degredations,
functional limitations, or in extreme scenarios even potential data
loss.

Change-Id: I67d70fd83430d83dacc5380c6c928e27fb9c9e1b
BUG: 1125180
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8394
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-03 07:28:52 -07:00
Xavier Hernandez
f3204a06eb cluster/ec: Fix incorrect management of NFS requests
Some operations, specially those comming from NFS, do not use a
regular fd and use an anonymous fd (i.e. a previous open call has
not been sent). Any context information created during open or
create will not be present on these fd's, so we simply return NULL
for contexts of those fd.

Also it seems that NFS can send write requests with a very big
buffer (higher that the default value of 128 KB). Some changes
have been made to correctly handle these large buffers.

Change-Id: I281476bd0d2cbaad231822248d6a616fcf5d4003
BUG: 1122417
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8367
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-02 00:23:24 -07:00
Xavier Hernandez
d9fbc85189 ec: Test volume mount point in a better way
An 'ls -a1' on an empty volume seems to return 3 entries instead
of the expected 2 ('.' and '..') in the build servers. I changed
the test to a simple 'stat', which is enough and more reliable.

Change-Id: I12d0f47394ad378b40fc9b86507cdb3543f99970
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8313
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 23:48:47 -07:00
Xavier Hernandez
410c15a1fb tests: Avoid test bug-884597.t to loop infinitely
If some unexpected error happens while this test is trying to
create a linkto file, an infinite loop is generated and the test
never ends.

This patch limits the number of retries it can do to find that
file.

Change-Id: Ie556c509116109ead99c78d671b2669b4428faac
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8318
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 23:32:26 -07:00
Meghana Madhusudhan
41e2384181 nfs-ganesha dumps core when Pynfs tests OPDG1O and OPDG11 are run.
Assgining -1 to ret if fd_create fails. The tests somehow
enter an error case 'if' block (this will be a separate bug fix),
before glfd is created. Need an addiitional check to see
if glfd exists before entering the 'else' block in 'out'.

glfs_h_creat was missing a similar check, adding that in
this bug fix.)

Change-Id: I3b69540c53e8169538848b9e7f23ffc8ef0ac189
BUG: 1121062
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8333
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 23:30:18 -07:00
Emmanuel Dreyfus
61e2ed9d17 Regression test portability: system-specific cleanup
Add NetBSD system-specific cleanup code
Define killall as pkill when it is missing.

BUG: 764655
Change-Id: I3a1cfa3029fd60ede334a670fc115c211700063d
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8290
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-01 22:26:01 -07:00
Kotresh H R
d09f69e76f geo-rep/libgfchangelog: Create working dir during changelog_register if not present.
Earlier, xysnc's register was being called first,
which was creating working directory before calling
changelog_register. Now it is history crawl first.
Hence working directory would not have been created.
Create it in gf_changelog_register itself if it is
not already created.

Change-Id: Ief3f2b87deaf5da16c135b64be1be42e0a7647f3
BUG: 1125843
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8399
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 17:23:57 -07:00
Zhang Huan
b12ee8fbaf storage/posix: fix issue in posix_fsync
Fix the issue that posix_fsync does not correctly return and save
 error code in op_errno when call to sys_fdatasync fails.

Change-Id: Id0b62cfa009dbb52c8a0992abd5c46330fa0a8c0
BUG: 1125814
Signed-off-by: Zhang Huan <zhhuan@gmail.com>
Reviewed-on: http://review.gluster.org/8398
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 16:38:18 -07:00
Pranith Kumar K
590006d824 doc: mem-pool documentation
Change-Id: I9bc454c92a078de5e3a30372a50c6f2cbdcd6c21
BUG: 1118309
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8343
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-01 00:54:08 -07:00
Venkatesh Somyajulu
966997992b cluster/dht: Modified logic of linkto file deletion on non-hashed
Currently whenever dht_lookup_everywhere gets called, if in
dht_lookup_everywhere_cbk, a linkto file is found on non-hashed
subvolume, file is unlinked. But there are cases when this file
is under migration. Under such condition, we should avoid deletion
of file.

When  some other rebalance process changes the layout of parent
such that dst_file (w.r.t. migration) falls on non-hashed node,
then may be lookup could have found it as linkto file but just
before unlink, file  is under migration or already migrated
In such cased unlink can be avoided.

Race:
-------
If we have two bricks (brick-1 and brick-2) with initial file "a"
under BaseDir which is hashed as well as cached on (brick-1).

Assume "a"  hashing gives 44.

                              Brick-1              Brick-2

Initial Setup:               BaseDir/a             BaseDir
                             [1-50]                [51-100]

Now add new-brick Brick-3.

1. Rebalance-1 on node Node-1 (Brick-1 node) will reset
the BaseDir Layout.

2. After that it will perform
a)  Create linkto file on  new-hashed (brick-2)
b)  Perform file migration.

1.Rebalance-1 Fixes the base-layout:
                 Brick-1             Brick-2           Brick-3
                 ---------         ----------         ------------
                 BaseDir/a            BaseDir           BaseDir
                  [1-33]              [34-66]           [67-100]

2. Only a) is     BaseDir/a          BaseDir/a(linkto)   BaseDir
   performed                         Create linktofile

Now rebalance 2 on node-2 jumped in and it will perform
step 1 and 2-a.

After (rebal-2, step-1), it changes the layout of the BaseDir.
                    BaseDir/a     BaseDir/a(link)    BaseDir
                    [67-100]           [1-33]        [34-66]

For  (rebale-2, step-2), It will perform lookup at Brick-3 as w.r.t new
layout 44 falls for brick-3. But lookup will fail.
So  dht_lookup_everywhere gets called.

NOTE: On brick-2 by rebalance-1, a linkto file was created.

Currently that linkto files gets deleted by rebalance-2 lookup as it
is considered as stale linkto file.  But  with patch if rebalance is
already in progress or rebalance is over,  linkto file will not be
unlinked. If rebalance is in progress fd will be  open and if rebalance
is over then linkto file wont be set.

Change-Id: I3fee0d28de3c76197325536a9e30099d2413f079
BUG: 1116150
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8345
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-31 22:46:34 -07:00
Xavier Hernandez
9de6d8b555 ec: Add -msse2 option to avoid fedora/rawhide compilation errors
This solves a compilation error on some compiler versions.
To avoid compilation issues on non-Intel architectures, patch
http://review.gluster.org/8366/ has already been merged. It
disables ec on those architectures.

These modifications are temporary patches until a proper
solution for bug #1125166 is ready.

Change-Id: I74d0b79e84601cc4f86ad08ce0f8102b99a79a68
BUG: 1125168
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8395
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-31 09:08:33 -07:00
Anders Blomdell
a278c2aece Symlink mtime changes when rebalancing
Added mtime preservation for special files during rebalance.

Change-Id: If04921d4d66853fde8b4d8a3ab748790864f8f42
BUG: 1122443
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
Reviewed-on: http://review.gluster.org/8383
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-07-31 09:07:59 -07:00
Krishnan Parthasarathi
93a4558ddd client/rpc: Add ping and msgs stats
This can be seen as below,

># cat $META/graphs/active/vol-client-0/private |grep ping_msgs_sent
ping_msgs_sent = 2

># cat $META/graphs/active/vol-client-0/private |grep "^msgs_sent"
msgs_sent = 13

where $META is /<fuse-mountpt>/.meta

Change-Id: I2107ec2b045bac701377760635e18758adb943a3
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/8285
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-07-31 09:03:56 -07:00
Emmanuel Dreyfus
72d2143c78 Regression test portability: run-test.sh
- Check for pidof(8) presence. It may not be present on non Linux systems
- Add a -f flag to run-tests.sh to bypass utility presence checks

Submit again because of spurious regression test failure

BUG: 764655
Change-Id: Iee6282c686c63a01808543054f8e5a3b5b79fca2
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8279
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-07-30 17:53:22 -07:00
Niels de Vos
60f2e231bb build: fix compile issue in unittest on EPEL-5
When building the current master branch on EPEL-5, the following error
is observed:

      CC     dht_layout_unittest-dht_layout_mock.o
    unittest/dht_layout_mock.c:77:2: error: no newline at end of file
    make[5]: *** [dht_layout_unittest-dht_layout_mock.o] Error 1
    make[5]: *** Waiting for unfinished jobs....

EPEL-5 has this gcc:

    $ gcc --version
    gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)

The fix is simple enough, dht_layout_unittest-dht_layout_mock.c should
have a line ending.

BUG: 1124858
Change-Id: I8ca7a1699fd1c35694073b9577f94ae525854713
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/8392
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
2014-07-30 08:28:04 -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
Raghavendra G
bb385390a9 nfs/drc: Fix memory corruptions
* A wrong memory allocator was used to (de)allocate nodes (not data in
them) of rb tree. This patch uses default allocator, since that suits
our purpose.
* Fix reference counting of client, though hitting the codepath
containing this bug is highly unlikely.

Change-Id: I7692097351d6e54288fee01da5af18e761fd0e8c
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
BUG: 1067256
Reviewed-on: http://review.gluster.org/7816
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-07-30 06:54:00 -07:00
Krutika Dhananjay
73fc66fb2d cluster/afr: Improve inodelk/entrylk failure log messages
Change-Id: Ie792875546b4f8e11ebf870a6e63aaf5cb221976
BUG: 1121920
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8344
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-07-30 04:36:28 -07:00
Vijaikumar M
9f41712d06 glusterd: Error msg for snapshot status for no existing snaps
should be aligned with error messages of info and list

When a snapshot operation like status, info, list
performed on a non-existing snapshot.
For Status error message is displayed as 'Snap not found'
For List and Info error message is displayed as 'Snapshot does not exist'
Have the consistant error message all the places

Change-Id: I7b241217dba62fda844481731a6858e4ecb12897
BUG: 1119641
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8309
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-30 02:39:37 -07:00
Rajesh Joseph
8732ee5319 glusterd/snapshot: Proper err msg for snapshot create command
problem: Snapshot command fails if one or more bricks are not thinly
provisioned. But the error message is a generic error message which
is confusing to the user.

fix: Provide correct error message in case of failure.

Change-Id: Iad247f966423a8f73ef6da57cab7ed6cddc05861
BUG: 1123646
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/8377
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-30 02:35:02 -07:00
Atin Mukherjee
7d74792d22 cli : glusterd getspec usage correction
gluster system getspec asks to input volume-id instead of volume name

Change-Id: I0baef9c937fc8948477aa65c8f98916b28c1e484
BUG: 1121870
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/8342
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-30 02:31:34 -07:00
Nithya Balachandran
df770496ba dht: fix rename race
Additional check to check if we created the linkto
file before deleting it in the rename cleanup function

Change-Id: I919cd7cb24f948ba4917eb9cf50d5169bb730a67
BUG: 1117851
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/8338
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-30 02:19:17 -07:00
Raghavendra G
45fbf99cb6 storage/posix: removing deleting entries in case of creation failures
The code is not atomic enough to not to delete a dentry created by a
prallel dentry creation operation.

Change-Id: I9bd6d2aa9e7a1c0688c0a937b02a4b4f56d7aa3d
BUG: 1117851
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8327
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-30 02:17:52 -07:00
Sachin Pandit
b56719fc47 doc : man page and admin-guide for newly introduced snapshot delete option.
Change-Id: Iab5e7f63d673a2040e8d83ab7280121ff468836e
BUG: 1112613
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8378
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-29 22:52:13 -07:00
Atin Mukherjee
67a6f402d4 libgfapi : glfs_create()/glfs_h_creat()/glfs_open()/glfs_h_open() should set
fd->flags before syncop_open()

glfs_create() and glfs_open() do not set fd->flags before calling syncop_open().
This patch addresses this problem and ensure the flags are set in fd before
invoking syncop_open()

Change-Id: I9ef3243b1de610e1dd1a3e37b66fc2f763a865f9
BUG: 1096047
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/7999
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-07-28 23:35:17 -07:00
Emmanuel Dreyfus
a95444c95c Regression test portability: ps
ps aux is truncated to the terminal width on NetBSD, Use ps auxww to
avoid that

BUG: 764655
Change-Id: I28a2fc23e2823dd6524a72da30111b86fc4bfa7b
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8281
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-07-28 17:41:42 -07:00
Emmanuel Dreyfus
38bae1bcf9 Regression test portability: hostname
The --fqdn option to hostname is Linux only
This is resubmission of the same patch. I assume the regression test
is a test bug

BUG: 764655
Change-Id: I6437124186435f10d1ee6a847e2593554d633716
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8282
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-07-28 17:40:49 -07:00
Kotresh H R
195594585e tests/bug-961307.t: echo output string in case of failure for easy debug.
Change-Id: I5bb5d7f2d9380da3247588e8eff10b559e17ff3f
BUG: 1122533
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8362
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-07-27 13:38:31 -07:00
Anders Blomdell
f8496dab2f Allow gluster to be used with linux automounter
Added (ignored) -n option to mount.glusterfs command

Change-Id: I9209da215d38507cd9d01b1e9af4aecff4414f83
BUG: 1123004
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
Reviewed-on: http://review.gluster.org/8373
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
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-07-27 13:37:36 -07:00
Krutika Dhananjay
3e7c3b2512 rpc,glusterd: Set ret to 0 after call to rpc_clnt_submit()
This is to guard against a double STACK_DESTROY in the event that
rpc_clnt_submit() failed and returned -1 anytime after sending the
request over the wire. in which case the stack could be destroyed
twice: once in the callback function of the request and once in
the error codepath of some of the callers of glusterd_submit_request().
This bug was introduced in http://review.gluster.org/#/c/8257/

Change-Id: I18a345db6eafc62ba312743201ced7d3f8697622
BUG: 1116243
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8301
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-27 13:36:46 -07:00
Pranith Kumar K
7b7f853333 doc: How to generate and read statedump
Thanks to Poornima G's help with iobuf
Section explanation.

Change-Id: I17737fdbd1f402914f7e67fb4047f5c26ea5c36c
BUG: 1118309
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8288
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-27 13:35:51 -07:00
Emmanuel Dreyfus
5986d22e62 Attempt to fix cmockery2 build
The current code assumes cmockery2 is installed in default paths.
Use PKG_MODULES_CHECK to find it using pkg-config if it is not. If
not found by pkg-config, try AC_CHECK_LIB.

There are also some build flag adjustement so that local overrides
do not loose the required -I flags.

This includes and enhance http://review.gluster.org/8340/

BUG: 764655
Change-Id: Ide9f77d1e70afe3c1c5c57ae2b93127af6a425f9
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8365
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-27 11:57:24 -07:00
Sachin Pandit
35c6ca05d8 feature/snapshot : Interface to delete all snapshots belonging
to a system as-well-as to a particular volume.

Problem :
With the current design we can only delete a single snapshot.
And the deletion of volume which contains snapshot is not allowed.
Because of that user might be forced to delete all the snapshots
manually before he is allowed to delete a volume.

Solution:
Following is the interface with which user can delete
all the snapshots of a system or belonging to a particular volume.

        Syntax : gluster snapshot delete all

        *To delete all the snapshots present in a system

        Syntax : gluster snapshot delete volume <volname>

        *To deletes all the snapshot present in a volume specified.

========================================================================
Sample Output:

Case 1 : Deleting a single snapshot.
[root@snapshot-24 glusterfs]# gluster snapshot delete snap1
Deleting snap will erase all the information about the snap. Do you still want to continue? (y/n) y
snapshot delete: snap1: snap removed successfully

-----------------------------------------------------------------
Case 2 : Deleting all the snapshots in a Volume.
[root@snapshot-24 glusterfs]# gluster snapshot delete volume vol1
Volume (vol1) contains 9 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: snap2: snap removed successfully
snapshot delete: snap3: snap removed successfully
snapshot delete: snap4: snap removed successfully
snapshot delete: snap5: snap removed successfully
.
.
.

-----------------------------------------------------------------
Case 3 : Deleting all the snapshots in a system.
[root@snapshot-24 glusterfs]# gluster snapshot delete all
System contains 4 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: snap7: snap removed successfully
snapshot delete: snap8: snap removed successfully
snapshot delete: snap9: snap removed successfully
snapshot delete: snap10: snap removed successfully
========================================================================

Change-Id: Ifec8e128ab2011cbbba208376b9c92cfbe7d8d71
BUG: 1112613
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8162
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-25 03:23:44 -07:00
Sachin Pandit
fb730072c2 doc : man page for snapshot commands
This patch also contains few modifications in admin documentation.

Change-Id: I7bc2a88e6cbcfe81dcfafc2956f5b7c5524b0f0b
BUG: 1122399
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8357
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-24 23:46:07 -07:00
Ravishankar N
c57895242f glusterd: update volinfo->subvol_count during remove-brick operation.
Problem:
In glusterd_op_remove_brick(), volinfo->subvol_count was getting updated only if
the replica count was reduced due to which subvol_matcher_verify() gave false
errors under certain scenarios (see bug description).

Fix:
updated subvol_count for every remove-brick operation.

Change-Id: Id72691e2bda1c624cd7d8cae92f6bf32c101a6d3
BUG: 1120647
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8326
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-24 23:29:01 -07:00
Harshavardhana
88eb28678c glusterd: Avoid spurious WARNING 'op_ctx modification failed'
This patch fixes by wrapping this whole scenario and skips
op_ctx modification for necessary commands.

Change-Id: I3ecec19caefdc699d9a2dabfb456a89758ae4aa4
BUG: 1066529
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8337
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-24 21:08:53 -07:00
ndarshan
54cfb7dab4 cli: Xml output for geo-replication status command.
This patch adds xml output for geo-replication status
and status detail command.
sample:
--------------------------------------------------------------
  <geoRep>
    <volume>
      <name>master</name>
      <sessions>
        <session>
        <session_slave>:2a301d66-b9d2-44b4-b827-d680d67123eb:ssh://XXXXXXXXXX::slave</session_slave>
          <pair>
            <master_node>localhost.localdomain</master_node>
            <master_node_uuid>2a301d66-b9d2-44b4-b827-d680d67123eb</master_node_uuid>
            <master_brick>/root/master_b1</master_brick>
            <slave>ssh://XXXXXXXXXXX::slave</slave>
            <status>faulty</status>
            <checkpoint_status>N/A</checkpoint_status>
            <crawl_status>N/A</crawl_status>
          </pair>
        </session>
      </sessions>
    </volume>
  </geoRep>
-------------------------------------------------------------

Change-Id: Ia19dbe751c3ab1ec7cb8923cdd6c8b99c374072f
BUG: 1121518
Signed-off-by: ndarshan <dnarayan@redhat.com>
Reviewed-on: http://review.gluster.org/8089
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-24 05:05:53 -07:00
Vijaikumar M
ddd132a3b2 glusterd/snapshot: Print correct error message on cli
for snapshot operation performed on a cluster with
op-version less than 30600

Currently we get error message as  on cli 'Another transaction is in progress
Please try again after sometime' when a snapshot operation is performed
on a cluster with op-version less than 30600.
We need to print the correct error message in this case.

Change-Id: I5f144428d928393c3796bde96ce6e3a40fca8141
BUG: 1122816
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8371
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-24 05:03:37 -07:00
Kaushal M
6328019bd1 cli: Fix no libxml compilation for snapshot status
BUG: 1122186
Change-Id: Ib887f2194258e85d40f65a758b6a963a17911395
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/8363
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2014-07-24 03:04:38 -07:00
Sachin Pandit
00bcf8e80b cli/snapshot : Dont display the snapshot hard-limit, soft-limit
and auto-delete value in gluster volume info.

Problem : Even though snap-max-hard-limit, snap-max-soft-limit and
auto-delete values were not set explicitly, It was getting showed
in the output of gluster volume info.

Solution : Check if the value is already present in dictionary
(That means, it is set), If value is not present then consider
the default value,

NOTE : This patch doesn't solve the problem where the values
which is set globally are being displayed in gluster volume info

Change-Id: I61445b3d2a12eb68c38a19bea53b9051ad028050
BUG: 1113476
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8191
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-24 03:03:53 -07:00
Aravinda VK
f4110bed92 geo-rep: minimize xsync crawl usage and set upper limit to xsync crawl
For effective handling of deletes and renames use history crawl
as much as possible. History crawl will run in loop till it syncs
all data before live changelog time.

When it uses xsync crawl(fallback when changelog not available, or
very first crawl) it sets upper limit to crawl.

After completing History crawl, it checks actual end time returned
by history api to compare with register time, if actual end is less
than register time then run history crawl one more time.

If first turn history processing time is less than the CHANGELOG
ROLLOVER TIME then sleep for the difference, After sleep if it is
guaranteed that rollover will happen and switches to live changelog
consumption without switching to xsync. This sleep is only when
history processing completed < CHANGELOG_ROLLOVER_TIME and sleep
only after the first turn, So will not affect the performance.

BUG: 1112238
Change-Id: I644ef24b07e42e81cec96a025ebd21244a555ec0
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8151
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-07-23 20:36:02 -07:00
Venky Shankar
8a24b1487d features/changelog: Capture "correct" internal FOPs
This patch fixes changelog capturing internal FOPs in a cascaded
setup, where the intermediate master would record internal FOPs
(generated by DHT on link()/rename()). This is due to I/O happening
on the intermediate slave on geo-replication's auxillary mount with
client-pid -1. Currently, the internal FOP capturing logic depends
on client pid being non-negative and the presence of a special key
in dictionary. Due to this, internal FOPs on an inter-mediate master
would be recorded in the changelog. Checking client-pid being
non-negative was introduced to capture AFR self-heal traffic in
changelog, thereby breaking cascading setups. By coincidence,
AFR self-heal daemon uses -1 as frame->root->pid thereby making
is hard to differentiate b/w geo-rep's auxillary mount and self-heal
daemon.

Change-Id: Ib7bd71e80dd1856770391edb621ba9819cab7056
BUG: 1122037
Original-Author: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8347
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-23 16:15:21 -07:00
Emmanuel Dreyfus
1706151a42 Disable Erasure Code xlator if MMX is missing
Erasure Code xlator requires MMX instruction set.
Disable building it if MMX is missing.

BUG: 764655
Change-Id: Id9fe87db33e00c5630c1f3633ebd50fc4ebaec4d
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8366
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-23 16:13:38 -07:00
Kaushal M
f86d3facd3 Bump op-version for 3.7.0
Change-Id: I4542edeca140bc2252d765b5cfc2e24d1d90cdb1
BUG: 1122398
Reviewed-on: http://review.gluster.org/8354
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-23 08:13:44 -07:00
Harshavardhana
b1cf59bf13 porting: include compat-errno.h for errno's
disperse module fails to compile since
ENODATA is non-existent on FreeBSD/Darwin

Use errno conversion in compat-errno.h to avoid
build issues.

Change-Id: I8203b7195c198c77202bde9bbec1813a487f923a
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8320
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2014-07-22 09:50:58 -07:00
Varun Shastry
56ffb16474 features/marker: Fill loc->path before sending the control to healing
Problem:
The xattr healing part of the marker requires path to be present in the loc.
Currently path is not filled while triggering from the readdirp_cbk.

Solution:
Current patch tries to fill the loc with path.

Change-Id: I5c7dc9de60fa79ca0fe9b58d2636fd1355add0d3
BUG: 1118591
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/8296
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2014-07-22 08:56:52 -07:00
ndarshan
5e1872c464 cli: Xml output for geo-replication config command
This patch adds xml output for geo-replication config
command.
sample:
---------------------------------------------------------------------
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <geoRep>
    <config>
      <parameter1_name>value</parameter1_name>
      <parameter2_name>value</parameter2_name>
      ...
      ...
      ...
    </config>
  </geoRep>
</cliOutput>
---------------------------------------------------------------------

Change-Id: Iac0451983ae5d0e65b95604eb1c29b968e1ee22f
BUG: 1121518
Signed-off-by: ndarshan <dnarayan@redhat.com>
Reviewed-on: http://review.gluster.org/8270
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-22 00:24:50 -07:00
Xavier Hernandez
464ff8f759 ec: Fixed coveriry scan issues
CID list:

  1226163 Logically dead code
  1226166 Missing break in switch
  1226167 Missing break in switch
  1226168 Missing break in switch
  1226169 Missing break in switch
  1226170 Missing break in switch
  1226171 Missing break in switch
  1226172 Missing break in switch
  1226173 Missing break in switch
  1226174 Missing break in switch
  1226175 Missing break in switch
  1226176 Missing break in switch
  1226177 Missing break in switch
  1226178 Data race condition
  1226179 Data race condition
  1226180 Data race condition
  1226181 Thread deadlock
  1226182 Uninitialized pointer read
  1226183 Uninitialized pointer read
  1226184 Read from pointer after free

Change-Id: I4d33aa42289371927175c43bb29e018df64fb943
BUG: 789278
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8317
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-21 18:39:46 -07:00