summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: fixing few memory leak in glusterdGaurav Kumar Garg2016-03-105-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12927/ Current glusterd code base having memory leak. This is because of memory allocate by dict_allocate_and_serialize function in "gd_syncop_mgmt_v3_lock" and "gd_syncop_mgmt_v3_unlock" function is not freeing up memory upon exit. Fix is to free the memory after exit of the above function. Thanks Carlos and Roman for finding out the issue and fix. >> Change-Id: Id67aa794c84969830ca7ea8c2374f80c64d7a639 >> BUG: 1287517 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> >> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> >> Reviewed-on: http://review.gluster.org/12927 >> 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> Change-Id: Id67aa794c84969830ca7ea8c2374f80c64d7a639 BUG: 1311377 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> (cherry picked from commit e38bf1bdeda3c7a89be3193ad62a72b9139358dd) Reviewed-on: http://review.gluster.org/13503 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: volume get should pick options from priv->opts tooAtin Mukherjee2016-03-082-18/+52
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13272 As of now volume get was not looking for all the global options maintained in option dictionary in glusterd_conf_t. This patch includes the same. Change-Id: Ib05259a2dcacc4a712cae4217fe4a6553b61da56 BUG: 1315939 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13272 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/13651
* glusterd: avoid setting op-version lower than current cluster op-versionGaurav Kumar Garg2016-03-081-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/13622/ Currently glusterd allow setting a cluster op-version which is lower than current cluster op-version. Though command is successful but it does not set that lower op-version. With this fix it will return error message "Required op-version (requested op-version) should not be lower than current cluster op-version (current cluster op-version)" Change-Id: Ia5b61858ee22a5a26721ec12ab12ff48e1a40c82 BUG: 1315562 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Change-Id: Ia5b61858ee22a5a26721ec12ab12ff48e1a40c82 >> BUG: 1315186 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/13622 >> Smoke: Gluster Build System <jenkins@build.gluster.com> >> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 2d87a981657ee23d00c20813deddeb320e0afa8f) Change-Id: Ie75b2a0c43ab2c5a908f4d3800e1df62770d315b Reviewed-on: http://review.gluster.org/13635 Tested-by: Gaurav Kumar Garg <ggarg@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> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Tier: making detach start fail when brick on hot tier is downhari2016-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | backport of : http://review.gluster.org/#/c/13474/6 Currently detach tier start happens even when a hot brick is down this might lead to data loss. This patch prevents the detach tier start from being executed successfully if a brick in hot tier is down >Change-Id: I3b6047a44bd01b8a6887d41f799f64de6bf075ef >BUG: 1309999 >Signed-off-by: hari <hgowtham@redhat.com> Change-Id: Ica0ae72f8e30156090be43e428545d684bdea36b BUG: 1314617 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13602 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: coverity warning in gluster_copy_nfs_ganesha_file()Kaleb S KEITHLEY2016-03-051-13/+11
| | | | | | | | | | | | | | | | | | | | | fix unused return value from snprintf. Also minor cleanup, including safe handling of truncated output by snprintf, and lstat() -> sys_lstat() backport from mainline: >Change-Id: Ibec8c7e6cc4ef07b6535d01a0719359fa3ef8030 >BUG: 1310755 >Reviewed-on: http://review.gluster.org/13486 Change-Id: Ic893751c5ce83c85b01c311091f2728d4997e599 BUG: 1315009 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13612 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: Vijay Bellur <vbellur@redhat.com>
* cluster/ec: Mark self-heal fops as internalPranith Kumar K2016-03-041-1/+1
| | | | | | | | | | | | | | | | | | >Change-Id: I8ae7af266d3e00460f0cfdc9389a926e5f2fee36 >BUG: 1282761 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/12598 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> BUG: 1283757 Change-Id: Ic20d4ee031265305db1a6ed2cf591ce94b7d0749 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12668 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>
* glusterd: Avoid ret value of glusterd_resolve_brick in retreive brick pathAtin Mukherjee2016-03-031-3/+6
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13588 In glusterd_store_retrieve_bricks() commit a60c39d introduced glusterd_resolve_brick () call to resolve all the bricks which is incorrect since by the time peerinfo list may not be constructed. The requirement here was to get the local brick's uuid populated and match that with MY_UUID. Fix is to overlook the return code of glusterd_resolve_brick() to ensure that the failure in resolving non local bricks are genuine and expected. Change-Id: I22822ae5b4e96fe4eacd50ea5c41e58061557106 BUG: 1314164 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13589 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>
* mgmt/glusterd: Show features.shard option in volume-set-help outputKrutika Dhananjay2016-03-031-1/+2
| | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/13565/ Change-Id: Ief6f62c65dd8cc736edc785ac06af6ee7309862c BUG: 1313339 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13566 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: use string comparison for realpath checks in ↵Atin Mukherjee2016-03-024-13/+51
| | | | | | | | | | | | | | | | | | | | | | | | | glusterd_is_brickpath_available Backport of http://review.gluster.org/13258 glusterd_is_brickpath_available () used to call realpath() for checking the whether the new brick path matches with the existing ones. The problem with this is if the underlying file system is bad for any one of the existing bricks then realpath() would fail and we wouldn't allow to create the new brick even if it should be allowed. Fix is to use string comparison with having a new field real_path in brickinfo to store the absolute path Change-Id: I1250ea5345f00fca0f6128056ebd08750d604f0a BUG: 1312878 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13258 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> Reviewed-on: http://review.gluster.org/13550
* glusterd: display user.* options in volume getAtin Mukherjee2016-02-281-83/+119
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13222 As of now volume get framework doesn't consider user.* xattrs to be displayed. This patch is to include them in volume get output. Please note these options will be only shown for a given volume name, 'all' as a volume name wouldn't consider them displaying. Change-Id: Ifc19e89c612e9254d760deaaef50bc1b4bfe02ce BUG: 1312623 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13222 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13534
* glusterd/rebalance: initialize defrag variable after glusterd restartMohammed Rafi KC2016-02-243-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | During reblance restart after glusterd restarted, we are not connecting to rebalance process from glusterd, because the defrag variable in volinfo will be null. Initializing the variable will connect the rpc Back port of> >Change-Id: Id820cad6a3634a9fc976427fbe1c45844d3d4b9b >BUG: 1303028 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13319 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> (cherry picked from commit a67331f3f79e827ffa4f7a547f6898e12407bbf9) Change-Id: Ieec82a798da937002e09fb9325c93678a5eefca8 BUG: 1311041 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13494 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/snapshot : Remove stale pmap registry entryAvra Sengupta2016-02-241-0/+11
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13420/ Perform a pmap_registry_remove on a stale registry entry from the previous run of snapd, which makes the query callback always return the older port number. Change-Id: I7fc504d2b09d32a9c945ec2c33e0e092a0d186ec BUG: 1309233 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13420 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: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit bfe689d25ecde567a90135b47f31b89d7714aaf4) Reviewed-on: http://review.gluster.org/13457
* Snapshot:wrong logging is usedMohammed Rafi KC2016-02-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Backport of> >Change-Id: I56e5f5696fbbb4290f95adb9b68f9e43ed037ed3 >BUG: 1189473 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/9861 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit 1fd7655ab0795e5aa96cdbfb8c522b222734f4f2) Change-Id: If88fba2678ca831c019f960fd3814e238d365439 BUG: 1311043 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13495 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: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: correct ret code in glusterd_volume_status_copy_to_op_ctx_dictAtin Mukherjee2016-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/12950 This patch is to supress the error log of Failed to aggregate rsp_dict where the above function returns a non zero ret which is not required Change-Id: If331980291bd369690257215333cea175e2042ec BUG: 1310999 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12950 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13490 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: Vijay Bellur <vbellur@redhat.com>
* glusterd: set decommission_is_in_progress flag for inprogress remove-brick ↵Atin Mukherjee2016-02-232-1/+19
| | | | | | | | | | | | | | | | | | | | | | op on glusterd restart Backport of http://review.gluster.org/13323 While remove brick is in progress, if glusterd is restarted since decommission flag is not persisted in the store the same value is not retained back resulting in glusterd not blocking remove brick commit when rebalance is already in progress. Change-Id: Ibbf12f3792d65ab1293fad1e368568be141a1cd6 BUG: 1310972 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13323 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: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13489
* glusterd: volume should not start when server quorum is not metGaurav Kumar Garg2016-02-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/13442 Currently when server quorum is not met then upon executing # gluster volume start [force] command its starting the volume. With this patch if server side quorum is not met then it will prevent starting of the volume. >> Change-Id: I39734b2dcf8e90c3c68bf2762d8350aecc82cc38 >> BUG: 1308402 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/13442 >> Smoke: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Iacb65823fb091e4ac250e436d1cb10103bc24921 BUG: 1310632 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13484 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>
* tier/glusterd: tier daemon not updating the statusMohammed Rafi KC2016-02-222-2/+33
| | | | | | | | | | | | | | | | | | | | | | | Tier process is not updating the status when the process killed mnually. backport of> >Change-Id: Ia5ea903af78ff3582da2242e6058f11c71923fab >BUG: 1294600 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13107 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I208953af5ee7985ad5b01a434ef0c94fefb0af2d BUG: 1295365 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13165 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: Dan Lambright <dlambrig@redhat.com>
* glusterd: check if all bricks are started before performing remove-brickSakshi2016-02-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Due to low severity the patch was not immediately backported. > Backport of http://review.gluster.org/#/c/10954/ > Change-Id: Ie9e24e037b7a39b239a7badb983504963d664324 > BUG: 1225716 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/10954 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: Ifc6088949f3891c28c4941b3377c72b68b68cb29 BUG: 1302528 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13306 Reviewed-by: Gaurav Kumar Garg <ggarg@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> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: validate function for replica volume optionsSakshi2016-02-211-12/+42
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12215/ > Change-Id: I5b4a28db101e9f7e07f4b388c7a2594051c9e8dd > BUG: 1265479 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/12215 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> BUG: 1308414 Change-Id: I1ce7c326da82749f8fd13dff11b803c607c853bb Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13444 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>
* glusterd: check quorum on restart bricksAtin Mukherjee2016-02-173-5/+74
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13236/ While spawning bricks on a glusterd restart the quorum should be checked and brick shouldn't be started if the volume doesn't meet quorum. Change-Id: I21bf9055bdf38c53c81138cc204ba05a9ff6444f BUG: 1305256 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13236 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> Reviewed-on: http://review.gluster.org/13390 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com>
* performance/write-behind: retry "failed syncs to backend"Raghavendra G2016-02-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When sync fails, the cached-write is still preserved unless there is a flush/fsync waiting on it. 2. When a sync fails and there is a flush/fsync waiting on the cached-write, the cache is thrown away and no further retries will be made. In other words flush/fsync act as barriers for all the previous writes. The behaviour of fsync acting as a barrier is controlled by an option (see below for details). All previous writes are either successfully synced to backend or forgotten in case of an error. Without such barrier fop (especially flush which is issued prior to a close), we end up retrying for ever even after fd is closed. 3. If a fop is waiting on cached-write and syncing to backend fails, the waiting fop is failed. 4. sync failures when no fop is waiting are ignored and are not propagated to application. For eg., a. first attempt of sync of a cached-write w1 fails b. second attempt of sync of w1 succeeds If there are no fops dependent on w1 are issued b/w a and b, application won't know about failure encountered in a. 5. The effect of repeated sync failures is that, there will be no cache for future writes and they cannot be written behind. fsync as a barrier and resync of cached writes post fsync failure: ================================================================== Whether to keep retrying failed syncs post fsync is controlled by an option "resync-failed-syncs-after-fsync". By default, this option is set to "off". If sync of "cached-writes issued before fsync" (to backend) fails, this option configures whether to retry syncing them after fsync or forget them. If set to on, cached-writes are retried till a "flush" fop (or a successful sync) on sync failures. fsync itself is failed irrespective of the value of this option, when there is a sync failure of any cached-writes issued before fsync. Change-Id: I6097c0257bfb9ee5b1f616fbe6a0576ae9af369a Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1293534 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13057 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>
* uss: validate USS option features.snapshot-directoryvmallika2016-02-151-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/9209 USS option features.snapshot-directory contains only 'alphanum, -, _, .' starts with dot (.) value cannot exceed 255 characters and throws error for any other argument. > Change-Id: Iad64635206ddf5599351020d99aafb3dd9d17bc1 > BUG: 1168819 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/9209 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Avra Sengupta <asengupt@redhat.com> > Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Change-Id: I1b85d6851a223b51714c0498b457c41db99f5f58 BUG: 1305868 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13409 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: Rajesh Joseph <rjoseph@redhat.com>
* tier/dht : Default value for demote-freq, max files and mbJoseph Fernandes2016-02-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default value for tier-demote-frequency is 3600 sec to avoid frequent demotions. Default value for tier-max-mb is 4000 mb Default value for tier-max-files is 10000 files Backport of http://review.gluster.org/13270 > Change-Id: Ie60951c478a7462c425059699ab82511aa13fa0a > BUG: 1300412 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/13270 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Dan Lambright <dlambrig@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: Ic4458b1b78dc3c6059713f3871e9e2dc8f38b39a BUG: 1306302 Reviewed-on: http://review.gluster.org/13424 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* Revert "glusterd/afr: store afr pending xattrs as a volume option"Pranith Kumar Karampuri2016-02-081-97/+7
| | | | | | | | | | | | This reverts commit 486b07dfc33782d27e3458659cdd6090f496ad35. Change-Id: I2da12ef77fb01c52cae3c3b5547398b6a4d7d17e BUG: 1293536 Signed-off-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13339 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: improve error logs for unsupported clientsv3.7.7Atin Mukherjee2016-02-011-7/+15
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11831 Change-Id: I90be46a7b25cc3efd0e61c9a145852e9027f5f64 BUG: 1302521 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11831 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-on: http://review.gluster.org/13305
* snapd: Do not persist snapd portAvra Sengupta2016-01-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13118/ Currently snapd persists the port it uses to sign-in with glusterd, without checking if that particular port is being used by any other process. As a result, it might erroneously sign out any other process using the same port. Hence forcing snapd to ignore the persisted port, and using a new one while coming up. Change-Id: Ibb9ec3762aac445f03d96e85660585be4ab27bcb BUG: 1294797 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13119 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@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>
* quota: start aux mount from glusterd with inet addressvmallika2016-01-221-8/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13255 With below patches, quota aux mount now uses unix domain socket to connect to glusterd http://review.gluster.org/#/c/12645/ http://review.gluster.org/#/c/12819/ When USS is enabled, snapd protocol client tries to connect to glusterd with inet and fails, because remote-host option by client process is set to UDS file This patch starts the aux client process from glusterd with inet address > Change-Id: I6967043bfd8824658ea39bfd2842591fcc3280fd > BUG: 1299497 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ica512aaf5c2b25f86506bd1e0d7810a8ff1f7632 BUG: 1300243 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13267 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>
* cli: Add arbiter details to volinfo xml outputRavishankar N2016-01-211-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13229 The followig are added: 1. "<arbiterCount>1</arbiterCount>" and "<coldarbiterCount>1</coldarbiterCount>" 2. "<isArbiter>0</isArbiter>" on the brick info, like so: <brick uuid="cafa8612-d7d4-4007-beea-72ae7477f3bb">127.0.0.2:/home/ravi/bricks/brick1 <name>127.0.0.2:/home/ravi/bricks/brick1</name> <hostUuid>cafa8612-d7d4-4007-beea-72ae7477f3bb</hostUuid> <isArbiter>0</isArbiter> </brick> Also fix a bug in gluster vol info where the abiter brick was shown the wrong brick of the cold tier after performing a tier-attach. Change-Id: Id978325d02b04f1a08856427827320e169169810 BUG: 1300174 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13263 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* snapshot: Return before redundant quorum checkAvra Sengupta2016-01-191-0/+3
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13260/ As of today, we don't support creation of snapshot even if one brick is down. Hence the older quorum check is redundant. Returning after performing the check to see if all bricks are up. Change-Id: I35661d05a15be0109aaae51b4fe0d5a8ca4333ad BUG: 1299822 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13261 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: Rajesh Joseph <rjoseph@redhat.com>
* all: reduce "inline" usageKaleb S KEITHLEY2016-01-187-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | There are three kinds of inline functions: plain inline, extern inline, and static inline. All three have been removed from .c files, except those in "contrib" which aren't our problem. Inlines in .h files, which are overwhelmingly "static inline" already, have generally been left alone. Over time we should be able to "lower" these into .c files, but that has to be done in a case-by-case fashion requiring more manual effort. This part was easy to do automatically without (as far as I can tell) any ill effect. In the process, several pieces of dead code were flagged by the compiler, and were removed. backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155, http://review.gluster.org/11769, BUG: 1245331 Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44 BUG: 1283302 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12646 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: Niels de Vos <ndevos@redhat.com>
* glusterd: import/export brickinfo->uuidAtin Mukherjee2016-01-141-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13047/ Given a two node cluster with node N1 & N2, if a dummy node N3 is peer probed, the probed node N3 goes for importing volumes from the probing node (N1), but it still doesn't have information about the other node (N2) about its membership (since peer update happens post volume updates) and hence fail to update its brick's uuid. Post that even though N2 updates N3 about its membership the brick's uuid was never generated. Now as a consequence when N3 initiates a detach of N2, it checks whether the node to be detached has any bricks configured by its respective uuid which is NULL in this case and hence it goes ahead and removes the peer which ideally it shouldn't have (refer to glusterd_friend_contains_vol_bricks () for the logic) Fix is to export brick's uuid and import it at the probed node instead of resolving it. Change-Id: I2d88c72175347550a45ab12aff0ae248e56baa87 BUG: 1297305 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13047 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13210
* glusterd: register rpc notification for unix socketsvmallika2016-01-131-15/+2
| | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13174/ Previously only CLI was using unix socket to connect to glusterd, and there was no need to register rpc callback notifications. Now auxiliary mount process is started with unix socket option. So we need to register rpc notifications for unix sockets as well. Change-Id: Ie52fb97195d78e1fde43ee966174bc4274f68f7e BUG: 1296024 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13181 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Disallow peer with existing volumes to be probed in clusterAtin Mukherjee2015-12-294-4/+27
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/12864 As of now we do allow peer to get added in the trusted storage pool even if it has a volume configured. This is definitely not a supported configuration and can lead to issues as we never claim to support merging clusters. A single node running a standalone volume can be considered as a cluster. Change-Id: Id0cf42d6e5f20d6bfdb7ee19d860eee67c7c45be BUG: 1288963 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12864 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/12888
* glusterd: reduce friend update floodGaurav Kumar Garg2015-12-281-2/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12999/ When in a befriended state, glusterd would broadcast friend updates to all other peers whenver a ACC or LOCAL_ACC event occurred. When a downed glusterd came back up and established connections again, this lead to a flood of friend updates to happen on the order of N^2 (N is the number of peers in the cluster) In larger clusters this was problematic, and could lead to very long times for the cluster to settle down when a peer came back up. Multiple peers coming back up at the same time would compound the problem. Broadcasting of friend updates doesn't have much use in places other that during a peer probe. Instead of broadcasting friend updates on connection re-establishment, updates can just be exchanged between the peers involved in the connection. This patch changes the glusterd friend state-machine to send updates only to the required peer for ACC or LOCAL_ACC events when in befriended state. The number of updates sent now is in the order of N. For a 10 node cluster, the number of updates reduced by 5 times. When creating the 10 node cluster, the updates reduced from ~500 to ~150. When a glusterd restarted, the number of exchanges reduced from ~160 to ~35. >> BUG: 1292749 >> Change-Id: Ib6072090c7069b081d018cdaa3dc878819ab1d18 >> Signed-off-by: Kaushal M <kaushal@redhat.com> >> Reviewed-on: http://review.gluster.org/12999 >> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >> Tested-by: NetBSD Build System <jenkins@build.gluster.org> >> Tested-by: Gluster Build System <jenkins@build.gluster.com> Change-Id: I389de2cc224f0ed627d98ae062209dd4f93e3b19 BUG: 1294410 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/13095 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* core : Use correct path in dlopen for socket.soAtin Mukherjee2015-12-271-2/+2
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/12656 This patch fixes the path for socket.so file while loading the so dynamically. Also for config.memory-accounting & config.transport voltype is changed to glusterd to fix the warning message coming from xlator_volopt_dynload Change-Id: I0f7964814586f2018d4922b23c683f4e1eb3098e BUG: 1283833 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12656 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12670 Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* Tier: "tier start force" command implementationhari gowtham2015-12-224-47/+95
| | | | | | | | | | | | | | | | | | | | | back port of : http://review.gluster.org/#/c/12983/ The start command doesnt restart the tier deamon if the deamon is running at one node. hence to bring up the tierd on the nodes where the deamon is down, the force command is implemented. It skips the check for tierd running. >Change-Id: I0037d3e5ecfe56637d0da201a97903c435d26436 >BUG: 1292112 >Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Idaca442c1a41ded8bf555a6e34eed0ebb9ea4034 BUG: 1293698 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13069 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* ctr/sql: Providing for vol set for sqlcachesize and sqlWALsize and skip ↵Joseph Fernandes2015-12-221-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recording path 1. Providing vol set option for cache size and wal autocheck point so that performance can be tuned. 2. Removed recording of file path in the db. Trimming database columns. Path need not be stored in the db, as PARGFID, GFID, Basename is suffice to derive the path during migration. Backport of http://review.gluster.org/12972 > Change-Id: I2cb590451a6d244bc91fe66c6dbffe2c2059dfb8 > BUG: 1293034 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12972 > Reviewed-by: N Balachandran <nbalacha@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > Tested-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: Ia1c109983ec6ce75ed27b8c08f454f5b6283c31d BUG: 1293659 Reviewed-on: http://review.gluster.org/13067 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* quota: fix backward compatibility of new quota volinfo optionvmallika2015-12-222-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12642/ quota-version features is implemented for 3.7.6 please see below patch for more details: http://review.gluster.org/#/c/12386 As part of this feature, new volume info option 'quota-version' was introduced, this can cause check-sum problem when a one of the node in a cluster is upgraded to 3.7.6 (heterogeneous cluster) So do a OP_VERSION check when storing this option in volume info > Change-Id: Ic5b03a1e3f1236b645a065b1fadee7950307e191 > BUG: 1283178 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I878202dcf5b44dcbbeff0d5b798649363a96e422 BUG: 1283187 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12643 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/afr : Readdirp performance improvementAnuradha Talur2015-12-211-0/+17
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12467/ Add xlator options to index xlator with xattrs that it needs to keep track of. Change-Id: If818673be5e626f77e65cc3a340f8cdd624179c2 BUG: 1287531 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12467 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12848
* cluster/tier: fix tier-max-files bookeeping and helpDan Lambright2015-12-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tier-max-files represents the maximum number of files trasferred by a node in a gives cycle. Fix help message to reflect the "per node" aspect. The code transferred one more file per cycle than the given value. Also change the default values of max file and max bytes to very large values, effectively we will not throttle migration unless the administrator requests it via CLI. This is a backport of 12984. > Change-Id: Ic2949ed3d8c35afe7c9ae4db72195603cfb2e28f > BUG: 1292671 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/12984 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ibb234976f912ff4b20e894f2984c63792acfe814 BUG: 1292945 Reviewed-on: http://review.gluster.org/13004 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* bitrot: getting correct value of scrub stat'sGaurav Kumar Garg2015-12-171-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12776/ When user execute bitrot scrub status command then gluster is not giving correct value of Number of Scrubbed files, Number of Unsigned files, Last completed scrub time, Duration of last scrub. With this patch scrub status will give correct value for all the above fields. >> Change-Id: Ic966f76d22db5b0c889e6386a1c2219afbda1f49 >> BUG: 1285989 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Signed-off-by: Kotresh HR <khiremat@redhat.com> >> Reviewed-on: http://review.gluster.org/12776 >> Tested-by: NetBSD Build System <jenkins@build.gluster.org> >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Venky Shankar <vshankar@redhat.com> Change-Id: Ic966f76d22db5b0c889e6386a1c2219afbda1f49 BUG: 1291546 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> (cherry picked from commit 22827d51c232c44a8f5ac003529d907d93baf7b0) Change-Id: Icef24cce35c8d54ffdfa5282491338318e78780b Reviewed-on: http://review.gluster.org/12966 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tier/glusterd: Only positive values for freq-thresholdsJoseph Fernandes2015-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Fixed error handling for validation for freq-thresholds Backport of http://review.gluster.org/12970 > Change-Id: Ibe3a9752ac0b525b0c8c0d6c4b4e4d694bd91b88 > BUG: 1291603 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12970 > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: I044284b5134a685e505a377028bc9a11563b2665 BUG: 1292359 Reviewed-on: http://review.gluster.org/12992 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* glusterd/afr: store afr pending xattrs as a volume optionRavishankar N2015-12-161-7/+97
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12738/ Problem: When AFR xlator initialises, it uses the name of the client xlators below it for storing the pending changelogs (xattrs). This can be problem when some other xlator is loaded in between AFR and the client. Though that is a trivial 'traverse-graph-till-the-client-and-use-the-name' fix in AFR's init(), there are other issues like when there's no client xlator at all when, say, AFR is moved to the server side. Fix: The client xlator names are currenly unique and stored as brickinfo->brick_ids. So persist these ids as comma separated values in AFR's volume_options and use them as xattr values during init(). Change-Id: Ie761ffeb3373a4c4d85ad05c84a768c4188aa90d BUG: 1291985 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12977 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tier/glusterd : making new tier detach command throw warninghari gowtham2015-12-162-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | back port of : http://review.gluster.org/#/c/12883/ For detach tier, the validation was done using the string "detach-tier" but the new commands used has the string "tier". Making the string use "tier" to compare, creates problem as the tier status and tier detach have the keyword "tier". So tier detach and tier status were separated. and strtok was used to prevent the condition from passing when the volume name has a substring of "tier". (only the second word from the string is got and checked if the feature is tier). Problem: new detach tier command doesnt throw warnings like "not a tier volume" or " detach tier not started" respectively instead it prints empty output. Fix: while validate the volume is checked if its a tiered volume if yes it is checked if the detach tier is started, else a warning is thrown respectively. >Change-Id: I94246d53b18ab0e9406beaf459eaddb7c5b766c2 >BUG: 1288517 >Signed-off-by: hari gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/12883 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I1ac3b6baaec644dbc2025085a7f17abd56ba169d BUG: 1291970 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12976 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tier/glusterd: Check before starting tier daemon during volume startMohammed Rafi KC2015-12-113-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We start tier daemon when volume is started without looking into the previous status. The problem with that if detach-tier is started and then volume force start is actually starting tier daemon. This is also fixes a problem where tier daemon is not starting after detach stop. Back port of> >Change-Id: I15b56a711e12f0e24f5ab123561258bd448621f7 >BUG: 1286974 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/12833 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 28da53e26e88f23f8917810ce0177f2628aa7e9a) Change-Id: I22c9ad0b2bc4488c15978d8bf85d05113e8b886e BUG: 1289898 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12921 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* mgmt/gluster: Handle tier brick volgenPranith Kumar K2015-12-103-45/+128
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12595/ Index xlator watches only some xattrs based on type of volume. i.e. disperse/afr. When the volume becomes tiered then index is not adding these options in the volfile leading to no maintenance of indices. Thus no proactive self-heals. With this fix, we write brick volfiles considering the type of volume they belong to. Change-Id: Ibe8f2d4ad5cb350306ab7ca0753e0f9a40b96a26 BUG: 1283756 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12595 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12847
* glusterd: add pending_node only if hxlator_count is validRavishankar N2015-12-091-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12843/ Fixes a regression introduced by commit 0ef62933649392051e73fe01c028e41baddec489 . See BZ for bug description. Problem: To perform GLUSTERD_BRICK_XLATOR_OP, the rpc requires number of xlators (n) the op needs to be performed on and the xlator names are populated in dictionary with xl-0, xl-1... xl-n-1 as keys. When Volume heal full is executed, for each replica group, glustershd on the local node may or may not be selected to perform heal by glusterd. XLATOR_OP rpc should be sent to the shd running on the same node by glusterd only when glustershd on that node is selected at least once. This bug occurs when glusterd sends the rpc to local glustershd even when it is not selected for any of the replica groups. Fix: Don't send the rpc to local glustershd when it is not selected even once. Change-Id: I2c8217a8f00f6ad5d0c6a67fa56e476457803e08 BUG: 1284863 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12905 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd:Removing error message in glusterd log during upgradehari gowtham2015-12-091-11/+38
| | | | | | | | | | | | | | | | | | | | | | | | back port of : http://review.gluster.org/#/c/12766/ when one of the gluster node is upgraded to 3.7 from a lower version and a mixed cluster is formed, tier related error messages are displayed in the glusterd log which are removed >Change-Id: I8d0fc43ce049990a6a52306317ea1298a0a91390 >BUG: 1282461 >Signed-off-by: hari gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/12587 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: Id4df935795e145c5d98350b67b5a9d94419df558 BUG: 1287597 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12851 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: fix the buildMichael Adam2015-12-091-1/+1
| | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12918/ Fix the build broken in 6e9f88cfd4c80c6af7260e5e6537cb76b6c0 Change-Id: I0c5cedff980688cb47f3f0e9f4968c23d2f507d3 BUG: 1288484 Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12922 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com>
* quota: copy quota_version value in func glusterd_volinfo_dupvmallika2015-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12881/ quota_version is a new variable introduced for quota xattr versioning feature. quota_version was not copied when creating duplicate volinfo in function 'glusterd_volinfo_dup' so any feature like snapshot/tiering using glusterd_volinfo_dup will get the default value of quota_version instead of the correct number and can cause a problem > Change-Id: I7b0f418002d49aa7210e2e741e65ee5b2593e6a6 > BUG: 1288474 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I971d3a4a08805a363bc4ab3c7343afb39916a3cf BUG: 1288484 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12882 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>