1109 Commits

Author SHA1 Message Date
Krutika Dhananjay
ceac3b4172 afr, index: Clean up stale directory and file indices in granular entry sh
Specifically when a directory tree is removed (rm -rf)
while a brick is down, both the directory index and the
name indices of the files and subdirs under it will remain.
Self-heal will need to pick up these and remove them.

Towards this, afr sh will now also crawl indices/entry-changes
and call an rmdir on the dir if the directory index is stale.

On the brick side, rmdir fop has been implemented for index xl,
which would delete the directory index and its contents if present
in a synctask.

Change-Id: I8b527331c2547e6c141db6c57c14055ad1198a7e
BUG: 1331323
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14832
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-07-11 23:13:53 -07:00
Sakshi Bansal
bfbadab0d6 tests: fix rebalance timing issue
With a start and stop rebalance, the stop command may fail
as by that time the rebalance process may not come up.
Using the rebalance status commmand to ensure that the rebalance
process is up before stoping rebalance.

Change-Id: I3d5123cd5dfabde2720428455b257d11b980ce21
BUG: 1354372
Signed-off-by: Sakshi Bansal <sabansal@redhat.com>
Reviewed-on: http://review.gluster.org/14885
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-07-11 07:04:56 -07:00
Jeff Darcy
c341a95bd3 tests: miscellaneous improvements
This is a combination of three previous low-impact changes, combined to
reduce patch-pushing burden.

((( GF_INTERACTIVE )))

To use this, just define GF_INTERACTIVE (value doesn't matter as long as
the length is non-zero) before running your test.  It replaces the TEST
alias with one that will prompt you before executing that line.  You can
answer:

  'y' to execute the line

  'q' to exit the test immediately

  anything else to skip this line and continue

This is particularly useful to inspect state in another window while a
test is paused, or to do manual experimentation in the (often complex)
configuration created during a test.

((( CLEANUP.SH )))

tests: add cleanup.sh

Often, a developer might want to run a test up to some point, then bail
out and poke around manually.  That leaves state that needs to be
cleaned up before the next test can run properly.  This patch adds a
trivial script to invoke that cleanup machinery.

Along the way, code in include.rc to find env.rc was changed to be more
robust across arbitrarily deep (or shallow) directory hierarchies.

((( REPLACE EXISTING TAR FILES INSTEAD OF APPENDING )))

We currently use "tar rf" to collect log files from each test.  This
*appends* the new data to whatever's there already, which has two bad
effects when a test is run repeatedly.

 * Ever-increasing size of the tar file.

 * Ever-increasing time to extract logs from the tar file, with each
   copy completely overwriting any previous.

This doesn't seem to be a problem in our regression tests, because the
entire directory is nuked during package removal and reinstallation.
However, when running a test repeatedly during a debug session, the
effects can be quite severe.  This is particularly evident with JBR,
because the "logs" that get archived include large journal files.
Certain other translators, such as changelog and CTR, might be prone to
similar effects.

There's no point to having multiple copies of the logs in each tar file.
As far as I know, nobody ever takes advantage of that.  Therefore, use
"tar cf" to overwrite any existing archive instead of appending.  This
change also handles excluding other .tar files in a portable way.

Change-Id: Iebf77d496a71976c321bbacb49776338a9da586f
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/14874
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-07-11 06:33:38 -07:00
Samikshan Bairagya
807b9a135d glusterd: Don't start bricks if server quorum is not met
Upon glusterd restart if it is observered that the server quorum
isn't met anymore due to changes to the "server-quorum-ratio"
global option, the bricks should be stopped if they are running.
Also if glusterd has been restarted, and if server quorum is not
applicable for a volume, do not restart the bricks corresponding
to the volume to make sure that bricks that have been brought
down purposely, say for maintenance, are not brought up. This
commit moves this check that was previously inside
"glusterd_spawn_daemons" to "glusterd_restart_bricks" instead.

Change-Id: I0a44a2e7cad0739ed7d56d2d67ab58058716de6b
BUG: 1345727
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
Reviewed-on: http://review.gluster.org/14758
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-07-05 04:56:58 -07:00
Atin Mukherjee
9a9f37440c glusterd: spawn daemons from init() on a single or two node setup
Allow glusterd to spawn the daemons at the time of initialization when peer
count is less than 2. This is required if user wants to set up a two node
cluster with out server side quorum and want the bricks to come up on a node
where the other node is down, however the behaviour will be overriden when
server side quorum is enabled.

Change-Id: I21118e996655822467eaf329f638eb9a8bf8b7d5
BUG: 1352277
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/14848
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-07-05 04:51:28 -07:00
Poornima G
01d6b17bac md-cache: Cache gluster-samba metadata
Change-Id: I0a95f4897440c5bf6f54612d9c232e015c8bf983
BUG: 1211863
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14824
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2016-07-05 04:00:50 -07:00
Sakshi Bansal
0cd287189e glusterd: glusterd must store all rebalance related information
Change-Id: I8404b864a405411e3af2fbee46ca20330e656045
BUG: 1351021
Signed-off-by: Sakshi Bansal <sabansal@redhat.com>
Reviewed-on: http://review.gluster.org/14827
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-07-04 05:34:57 -07:00
Sakshi
1b420a3f69 cli: different status output for rebalance fix-layout
Change-Id: I6ded40a1b1cff5c72e5b61fd353db3d8c688efd8
BUG: 1225718
Signed-off-by: Sakshi <sabansal@redhat.com>
Reviewed-on: http://review.gluster.org/10956
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2016-07-03 22:39:17 -07:00
Niels de Vos
e5221d288e nfs: allow hostnames with dashes in exports/netgroups files
Hostnames with dashes (like "vagrant-testVM") are not correctly parsed
when reading the exports/netgroups files. This bacomes obvious when
running ./run-tests-in-vagrant.sh because it causes
tests/basic/mount-nfs-auth.t and tests/basic/netgroup_parsing.t to fail.

The regex for hostname (in exports) and the entry and hostname
(netgroups) parsing does not include the "-" sign, and hence the
hostnames are splitted at it.

BUG: 1350237
Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/14809
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-06-28 13:29:13 -07:00
Arthy Loganathan
5205d42ddf distaf: Modified tier_attach() to get bricks path from available
bricks in server

Added code to get bricks path from available bricks in
server in tier_attach()
Change-Id: I58822f425c6ea8284568d3701807cfcc11f37e3c
BUG: 1350427
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14814
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: M S Vishwanath Bhat <msvbhat@gmail.com>
2016-06-28 07:06:51 -07:00
Arthy Loganathan
a4bdba1ed4 distaf: Modified get_pathinfo() in lib_utils.py
Modified get_pathinfo() in lib_utils.py

Change-Id: I721d3704ec00c20b9678088d79e52e3eedbe4af5
BUG: 1350248
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14802
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: M S Vishwanath Bhat <msvbhat@gmail.com>
2016-06-28 02:15:03 -07:00
Krutika Dhananjay
2ca5388692 features/index: Delete parent dir indices when heal on it is complete
In this patch, the state information about whether a directory
gfid index is present or not is stored in the inode ctx with
values IN and NOTIN. This saves index xl the need to perform
stat() everytime an index_entry_create() is called.

When a brick is restarted these in-memory inode ctx records will
be gone. So when granular entry heal happens after a brick is restarted,
and a post-op is done on the parent, if the state gotten from inode ctx
is UNKNOWN, then index xl does a stat to initialize the state as IN or
NOTIN. Note that this is a one-time operation for the lifetime of the
brick. Such a change also helps avoid calling index_del() in
xattrop_index_action() periodically even when granular self-heal is
disabled or when the volume type is disperse.

Change-Id: Ib92c17350e6531b91ab81477410fe1e7a5856207
BUG: 1331323
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14781
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-06-28 01:13:57 -07:00
Arthy Loganathan
04d95b93f1 Minor fix in distaf_gluster_config.yml file
Change-Id: Ia0609d54b51eed14db229e0fdc92c4530fb97aff
BUG: 1350383
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14813
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-27 04:06:58 -07:00
Shwetha Panduranga
0d280e0b7f Adding simple test "running dd from mount".
Change-Id: Icbb799c401e73b51a7e96b86db78e46f6b0d5813
BUG: 1350258
Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Reviewed-on: http://review.gluster.org/14807
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 21:57:51 -07:00
Shwetha Panduranga
7897e023e6 Servers in yaml file is list of dicts. Hence iterating through servers to get
the 'host' of it.

Change-Id: I361aa88ad21ce30fd57f297795c5f7ff60ccfd2a
BUG: 1350256
Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Reviewed-on: http://review.gluster.org/14805
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2016-06-26 21:41:00 -07:00
Shwetha Panduranga
d2842f1b58 Modifying gluster_base_class and mount_ops to suit the config file changes made
Change-Id: Ic551724dd27fcc2cc618e8de04110752bf5a8786
BUG: 1350017
Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Reviewed-on: http://review.gluster.org/14808
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jonathan Holloway <jholloway@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 21:15:12 -07:00
M S Vishwanath Bhat
eaadde082e Revert "Modifying gluster_base_class and mount_ops to suit the config file changes made"
This reverts commit 09c0b2f3c2534f365bee5a738d1699af36413a25.

BUG: 1350017

Change-Id: Id1b63c98ad827b87ad0a6beb4c7565c45749b134
Reviewed-on: http://review.gluster.org/14803
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: M S Vishwanath Bhat <msvbhat@gmail.com>
Tested-by: M S Vishwanath Bhat <msvbhat@gmail.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 13:15:10 -07:00
Shwetha Panduranga
09c0b2f3c2 Modifying gluster_base_class and mount_ops to suit the config file changes made
Change-Id: I61481c029fdbdd9c966867f195b9dc9046550392
BUG: 1350017
Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Reviewed-on: http://review.gluster.org/14793
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: M S Vishwanath Bhat <msvbhat@gmail.com>
Tested-by: M S Vishwanath Bhat <msvbhat@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 11:31:07 -07:00
Arthy Loganathan
8b53bfab1e distaf: Modified volume_ops library
Modified gluster volume ops library modules

Change-Id: I2ef5ca44f3a4a9844aee48f3688e8617dbbb4fcd
BUG: 1350245
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14801
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 11:19:56 -07:00
Apeksha D Khakharia
931c656d62 distaf: Adding samba_ops library
Change-Id: Icc2b1eefe0f27a67e9f0e50edd41b313bd3cc892
BUG: 1350173
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14798
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: ShwethaHPanduranga
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 11:10:46 -07:00
Apeksha D Khakharia
1569b5138e distaf: minor import changes in ganesha.py
Change-Id: I8bcb9056c1087dce54bc3ed6c967dfb444521236
BUG: 1350188
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14799
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 10:47:55 -07:00
Apeksha D Khakharia
453709554c distaf: adding libraries to get server_brick dictionaries
Change-Id: I9046126739a126ee2d40249919e1fe58adf2fa27
BUG: 1349723
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14788
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
2016-06-26 10:47:29 -07:00
Apeksha D Khakharia
4935dd6744 distaf: modifications to create volume function
Change-Id: Ifba1bc96f1f620b41fd5c61c345e8ac148e9250a
BUG: 1350168
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14797
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-26 06:33:07 -07:00
Ravishankar N
7a1c1e2904 afr:Don't wind reads for files in metadata split-brain
Problem: For a read on  a file in metadata split-brain:
1.lookup_done resets event_generation to zero.
2. readv is issued, goes to inode refresh due to mismatching event_gen.
3. After refresh is successful, we update event_generation, data and
metdata readable.
3. We then call afr_read_txn_refresh_done() which in turn calls
afr_inode_get_readable() but doesn't check for EIO. So afr_readv_wind
is called with local->readable (which is populated with data_readable),
thus winding the read to a brick.
4. Also, further parallel reads that come directly go to the wind path
because there is no inode_refresh needed.

Fix:
1.For any afr_read_txn(), readable must be an intersection of data and metadata
readable.
2.Check for EIO in afr_read_txn_refresh_done().

Change-Id: I22dd221fdfaf96d7aced2f474e28ed1337d69f0e
BUG: 1305031
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/13389
Reviewed-by: Ashish Pandey <aspandey@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-06-24 04:26:01 -07:00
Shwetha Panduranga
beaa5d104a Adding distaf config file for gluster tests.
Change-Id: Id16bc316a202fa373774f380dfd86903516b80ac
BUG: 1336373
Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Reviewed-on: http://review.gluster.org/14357
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Kaushal M <kaushal@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-24 04:13:02 -07:00
Arthy Loganathan
6680b844c5 distaf: Added bitrot_ops and lib utils
Added library functions for gluster bitrot operations and added 
functions in lib_utils.py which are generic across all components 

Change-Id: I877ded038c9f4c1e7aa1a15b035fcd7ebb0da21f 
BUG: 1332885 
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Change-Id: I877ded038c9f4c1e7aa1a15b035fcd7ebb0da21f
Reviewed-on: http://review.gluster.org/14209
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
Smoke: Gluster Build System <jenkins@build.gluster.org>
2016-06-23 05:17:00 -07:00
Apeksha D Khakharia
6109f0a98f distaf: adding libraries to setup CTDB in gluster
Change-Id: Iad3493794cf05262f182334efc8e517e30698e39
BUG: 1339541
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14531
Reviewed-by: Vivek Das <vdas@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: ShwethaHPanduranga
2016-06-23 05:07:12 -07:00
Samikshan Bairagya
a6e551122c Fix opRet value for volume info --xml call on non-existent volume
The opRet field was being assigned to 0 in the XML output when a
gluster volume info --xml call is made on a non-existent volume.
This change assigns a value of -1 to opRet for volume info calls
for non-existent volumes. Other fields like opErrno and opErrstr
are also assigned relevant values

Change-Id: I3920c602328f74252c87bb521f5a43d4bdc7d44d
BUG: 1321836
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
Reviewed-on: http://review.gluster.org/13843
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-06-21 00:11:06 -07:00
Ravishankar N
b5c492dfea cli: fix crash in arbiter keyword parsing
A negative case like `gluster volume create volname arbiter 3 /bricks{1..3}`
must not crash. 'arbiter' keyword is valid only for (3 way) replica volumes.

The .t that is added will crash and create a core *without* the fix when
run but will still pass all TESTs. Since the regression framework fails
the .t if it creates a core,  we can consider it a valid test 'that
fails without the fix'.

Change-Id: Ie2d7ced66025ea3617d30f6f823b22401e6d2fde
BUG: 1346821
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/14738
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-06-17 03:56:37 -07:00
Poornima G
b8ac20e888 gfapi: Fix IO error caused when there is consecutive graph switches
Issue:
Consider a simple situation, where glfs_init() is done, i.e. initial
graph is up. Now perform 2 volume sets that results in 2 client side
graph changes. After this perform some IO, the IO fails with ENOTCON.
The only way to recover this client is i guess another graph switch
or restart.

What actually is happening from code perspective:
Initial graph lets say A, followed by 2 consecutive graph switches
to B and C without any IO those two switches.

- graph_setup (A) as a result of GF_EVENT_CHILD_UP, and
fs->next_subvol = A

- glfs_init() results in fs->active_subvol = A, fs->next_subvol = NULL

- graph_setup (B) as a result of GF_EVENT_CHILD_UP, and
fs->next_subvol = B

- graph_setup (C) as a result of GF_EVENT_CHILD_UP, and
fs->next_subvol = C. It also sees that the previous graph B was never
set as fs->active_subvol, i.e. no IO or anything happened on B, so
can safely send GF_EVENT_PARENT_DOWN (by calling glfs_subvol_done(B)).
This parent down on B, results in child_down(B), which is fine.
But child_down also triggers graph_setup(B).

- graph_setup(B) as a result of GF_EVENT_CHILD_DOWN, and
fs->next_subvol = B, and GF_EVENT_PARENT_DOWN on C as explained
above. This again leads to GF_EVENT_CHILD_DOWN on C.

- graph_setup(C) as a result of GF_EVENT_CHILD_DOWN, and
fs->next_subvol = C, and GF_EVENT_PARENT_DOWN on B as explained
above.

Thus both the graphs B and C are disconnected, and hence the ENOTCON

Solution:
Remove the call to graph_setup() when the event is GF_EVENT_CHILD_DOWN.
It don't see any reason why graph_setup should be called when there is
child_down. Not sure what the original reason was, to have graph_setup
in child_down. git hostory shows the first patch itself had this call.

Change-Id: I9de86555f66cc94a05649ac863b40ed3426ffd4b
BUG: 1343038
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14656
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-06-16 04:57:42 -07:00
Shyam
c04df79dc4 io-stats: Fix io-stat dump to dump at all levels
Previous commit to fix the bug, where io-stat-dump was overwriting
the dump file when the client and a brick was on the same host,
failed to consider the existing behaviour where io-stats can
help generate closely correlated set of stats across clients
and bricks, by triggering the dump using the same command.

This was introduced in commit:
0facb11220aea20a6573b656785922219c9650cf

Further, by limiting the first io-stat to unwind the dump request,
there is no way to trigger other io-stat xlators in the stack to
dump their stat information.

This bug hence is being fixed by this commit keeping the
following in mind,
- We need to trigger io-stat-dump for all instances in the
graph when this attr is set
- We need to write the output to different files, so that
they do not overwrite each others data
- We need to prevent this xattr from being set on the path
that is used to trigger the io-stat-dump information

Change-Id: I31ec380f0d85e10313a9d7b977da0e1ec74638a6
BUG: 1322825
Signed-off-by: Shyam <srangana@redhat.com>
Reviewed-on: http://review.gluster.org/14552
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-06-15 10:38:00 -07:00
Apeksha D Khakharia
a15bd4ad9f distaf: Added libraries to setup nfs-ganesha in gluster through distaf
Change-Id: Ifc4c6aa76f2fc6fb7a2de06c2fc458b0015c6951
BUG: 1337160
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Reviewed-on: http://review.gluster.org/14416
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: M S Vishwanath Bhat <msvbhat@gmail.com>
2016-06-15 05:32:50 -07:00
Arthy Loganathan
2808eac9b6 distaf: Added library functions for gluster tiering operations
Change-Id: I08d77bdc1ca3f804e35b69abe39df2049eb7cf70
BUG: 1334721
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14283
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: karthick
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2016-06-15 04:05:20 -07:00
Kaleb S KEITHLEY
e740b70097 api: use versioned symbols for minor ABI change
No need to expand the API/ABI. E.g., see how glfs_lookupat
changed between 3.7.0 and 3.7.4 IIRC

(I originally argued against versioning the library. I wanted
to just add new functions as they were needed, as was initially
done for glfs_ipc and glfs_ipc_xd in the master branch for 4.0.
But others strongly wanted versioning.)

Having made the decision to use versioning, I believe we should
continue. At least until we have a public decision that we're
no longer going to use versioning.

Change-Id: I0c3b2c1cbb297ae2b2864b647c224922987d74ad
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14717
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-06-14 18:30:21 -07:00
Atin Mukherjee
53cc21c5a5 tests: fix bug-1344407-volume-delete-on-node-down.t
Test was earlier starting the volume which will always make volume delete fail.
so it was actually not validating BZ 1344407

Change-Id: I6761be16e414bb7b67694ff1a468073bfdd872ac
BUG: 1344407
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/14693
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2016-06-12 23:54:15 -07:00
Ravishankar N
8c71749141 afr: Consider ENOSPC and EDQUOT as symmetric errors
Problem:
Since commit 8eaa3506ead4f11b81b146a9e56575c79f3aad7b, in replica 3, if a
brick is down and a create fails on the other 2 brick with EDQUOT, we consider
it an unsymmetric error and hence do not do post-op. So the dirty xattr
remains set on the parent dir, leading to conservative merges during heal when
all bricks are up. i.e. a file deleted on the source might re-appear after heal.

Fix:
Consider ENOSPC and  EDQUOT as symmetric errors since there is no
possibility of partial inode or entry modification operations possible when
quota is enabled. IOW, if quota reports EDQUOT, the no. of bytes written
(or not written) will be the same on all bricks of the replica.
Likewise, the entry operation (create, mkdir...) will either succeed or
not succeed on all bricks.

Change-Id: Iacb1108e9ef4a918e36242fb4a957455133744e9
BUG: 1341650
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/14604
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>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
2016-06-12 22:58:48 -07:00
Jiffin Tony Thottan
2775dc6410 libgfapi/upcall : prepend "glfs_" to callback_arg, callback_inode_arg
Change-Id: I371525775db4f6a4d69beb94baaa53d17b16fb41
BUG: 1344714
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14702
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Jeff Darcy <jdarcy@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
2016-06-10 14:09:32 -07:00
Atin Mukherjee
5016cc548d glusterd: fail volume delete if one of the node is down
Deleting a volume on a cluster where one of the node in the cluster is down is
buggy since once that node comes back the resync of the same volume will happen.
Till we bring in the soft delete feature tracked in
http://review.gluster.org/12963 this is a safe guard to block the volume
deletion.

Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c
BUG: 1344407
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/14681
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-06-10 00:30:57 -07:00
Bipin Kunal
3bd4b15298 nfs: build exportlist with multiple groupnodes
The EXPORT procedure of the MOUNT protocol does not correctly create
structures for the 'groupnodes' in the reply. Each 'groupnode' should be
a single entry in the 'nfs.rpc-auth-allow' volume option. Because the
value is handled as a single string, the encoding of the
groupnode->gr_name fails when the value of the volume option is longer
than 255 characters.

In the error case, encoding the EXPORTS reply fails, and the waiting
'showmount' command will not receive a reply and times out.

Splitting the allowed entries and creating a groupnode for each one
prevents the too long ->gr_name. This is following the structures for
the EXPORTS reply in the MOUNT protocol more correctly as well. Note
that the contents of ->gr_name is expected to be server dependent.

Change-Id: Ibbabad581cc9aa00feb80fbbc851a1b10b28383d
BUG: 1343286
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/14667
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: bipin kunal <kunalbipin@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-06-09 11:40:25 -07:00
Krutika Dhananjay
ab88bad8fe tests: Add a test for conservative merge with granular esh
Change-Id: Ib8ada912451bf80b640d25e6e3a824216d055b5b
BUG: 1332566
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14601
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-06-09 01:28:49 -07:00
Ravishankar N
51e1028373 afr: afr-pending-xattr fallback check
Commit 6e635284a4411b816d4d860a28262c9e6dc4bd6a introduced a comma
separated list of values to be used as AFR's pending changelogs. If
this xlator option is missing in the volfile, fall back to using client
xlator names for constructing the pending changelog names.

Also, since the aforementioned commit was reverted from 3.7 and 3.8
branches, introduce GD_OP_VERSION_3_9_0 and change the op-version for this
feature to GD_OP_VERSION_3_9_0.

Change-Id: I3639b9ab475bd8d9929cc7527d9f4584dee1ad1b
BUG: 1285152
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/14642
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-06-09 01:20:43 -07:00
Pranith Kumar K
04b5fcb82e features/shard: Don't modify readv size
For o-direct reads application sends aligned size which needs to be
sent as is, otherwise o-direct writes where the file-size is not
aligned fails.

Change-Id: I097418ad92eda6c835d7352a3d2e53ea9d8e2424
BUG: 1342298
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/14623
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-06-06 08:12:55 -07:00
Arthy Loganathan
d4b9d7f120 distaf: Added library functions for gluster quota operations
Change-Id: I4968918fc2bf5b67e3415fc7b9beb1b414ca6eb4
BUG: 1332952
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14210
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: M S Vishwanath Bhat <msvbhat@gmail.com>
2016-06-04 11:33:31 -07:00
Poornima G
bc525b0100 glusterd: volgen and volume set changes for leases
Add leases xlator in volgen and also add corresponding volume set options

Change-Id: Ic5de50cdb87eaf6a833e739bc7e08fecbeca3de3
BUG: 1319992
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/11722
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-06-02 21:58:43 -07:00
Arthy Loganathan
851a58733f Added timeout value to wait for rebalance to complete and removed older rebalance library file
Change-Id: I89e2e436ec9306a80a87faab6d6e53f547ce4e42
BUG: 1339166
Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-on: http://review.gluster.org/14515
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: M S Vishwanath Bhat <msvbhat@gmail.com>
2016-06-02 01:39:53 -07:00
Oleksandr Natalenko
cb8f5e01f6 glusterfsd/main: Add ability to set oom_score_adj
Give the administrator a possibility to set oom_score_adj for glusterfs
process. Applies to Linux only.

Change-Id: Iff13c2f4cb28457871c6ebeff6130bce4a8bf543
BUG: 1336818
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reviewed-on: http://review.gluster.org/14399
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-06-01 06:27:10 -07:00
Jiffin Tony Thottan
1126ebcf66 cluster/afr adding test case for http://review.gluster.org/#/c/14553/
Change-Id: I23865343021ae65a36f6abc74d6bd594efd9dc7e
BUG: 1340623
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14561
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@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-05-31 07:01:09 -07:00
Ashish Pandey
c3fdf4d973 cli: Add test for heal info with ssl on
This test has been introduced to check
if we get proper heal info after enabling
management SSL.

Change-Id: I9c7721293b18cc10090b8695e49b5f4c8c766c6c
BUG: 1320388
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-on: http://review.gluster.org/13959
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
2016-05-31 02:34:29 -07:00
Krutika Dhananjay
a45bef14b3 tests: Add more tests for granular entry self-heal feature
Change-Id: I6f14e413c538e392c8ee5bf4bf9f283e8ac792b7
BUG: 1332566
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14542
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-05-30 21:23:55 -07:00
Raghavendra G
4c798e8785 tests/write-behind: move 1279730.t to BAD tests
There is a race condition which is causing the test to fail. For lack
of bandwidth I am moving this test to BAD, though clearly there is
some issue with codebase.

BUG: 1337777
Change-Id: If4f3eff8a5985f37a4dee65d2df29fa7b6bda7ae
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/14443
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-05-30 02:12:18 -07:00