summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
Commit message (Collapse)AuthorAgeFilesLines
* tier/glusterd : making new tier detach command throw warninghari gowtham2015-12-152-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glusterd: DEBUG log should not come after resetting client log levelGaurav Kumar Garg2015-12-151-0/+2
| | | | | | | | | | | | | | | | | After resetting diagnostics.client-log-level option still DEBUG log is logging in scrubber and bitrot log file. After resetting any option value of that options goes to default value. This patch will set the default value of client and brick log level to "INFO" log level. Change-Id: I4cf04754dcf5ddc908dae4d9bdf525cfcd6cc2bd BUG: 1252696 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11887 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>
* bitrot: getting correct value of scrub stat'sGaurav Kumar Garg2015-12-141-6/+11
| | | | | | | | | | | | | | | | | | | 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>
* glusterd: Maintain per transaction op-info objectanand2015-12-102-0/+196
| | | | | | | | | | | | | | | | Issues: Since in op-sm transactions a mix of access to global op-info & per transaction op-info objects are used, the correctness of op-info object may go for a toss resulting into incorrect response getting passed back to cli Fix: Use per transaction op-info object Change-Id: Ice023bace3e137dfd8e7b13bd5b53545a79a203f BUG: 1287027 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/12836 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: add pending_node only if hxlator_count is validRavishankar N2015-12-091-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1287503 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12843 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: fix the buildMichael Adam2015-12-091-1/+1
| | | | | | | | | | | | | | Fix the build broken in 6e9f88cfd4c80c6af7260e5e6537cb76b6c0 Change-Id: I0c5cedff980688cb47f3f0e9f4968c23d2f507d3 BUG: 1289869 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12918 Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> 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
| | | | | | | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/12881 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> 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/quota: quota-version conflict in export/import volinfovmallika2015-12-085-11/+12
| | | | | | | | | | | | | | | When exporting/importing voinfo during handshake, quota conf and quota xattr version were using same key 'quota-version' and updated wrong values when importing quota version values. Change-Id: If939d6f5bc4851d4114963877be72dda21834f0f BUG: 1287996 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12865 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>
* tier/glusterd: Check before starting tier daemon during volume startMohammed Rafi KC2015-12-083-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. 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>
* glusterd: Disallow peer with existing volumes to be probed in clusterAtin Mukherjee2015-12-064-4/+27
| | | | | | | | | | | | | | | 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: 1287992 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>
* glusterd: stop daemon services upon peer detach correctlyGaurav Kumar Garg2015-12-032-18/+41
| | | | | | | | | | | | | | | | | | | | | Problem: Currently glusterd is stopping all the daemons service upon peer detach. If user have multi node cluster and if user want to detach any node from the cluster, and detached node having stand alone volume then upon detaching glusterd stopping all the daemon's of the detached node, which is having running volume. Fix: Upon peer detach it should do peer detach cleanup properly and it should stop only those daemon on the node on which it require. Change-Id: I98b8099166f82e235ded6d02261f59a6511a003b BUG: 1287455 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12838 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>
* snapshot/clone : Fix tier pause failure for snapshot cloneAvra Sengupta2015-12-021-13/+0
| | | | | | | | | | | | | | | | | | | | On a tiered volume, snapshot clone fails while trying to pause tier, as we pass volname(snap) to the brick_op_phase module, which tries to look for the snap volume amongst regular volumes, and obviously doesn't find it and fail. Well as snapshot volumes are read only volume, and will not have tiering daemon acting upon them, there is really no need to pause tiereing while taking clone of snapshot volumes. Hence removing the code to pause and resume tiering during clone create. Change-Id: I2266aba589a830a13a806c0d8a56fd8855143ccd BUG: 1279327 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12548 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot: Fix quorum check for cloneAvra Sengupta2015-12-022-95/+267
| | | | | | | | | | | | | | | | | | | snapshot clone was not performing quorum check and was just relying on glusterd server quorum. Wrote glusterd_snap_quorum_check_for_clone(), to perform the same. Also moved common quorum check code from glusterd_snap_quorum_check_for_create(), to glusterd_snap_common_quorum_chk_clone_create() to be shared by both Change-Id: Ib78c709186841780876de8ef7d7c9243b7f67995 BUG: 1276023 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12490 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd:Removing error message in glusterd log during upgradehari gowtham2015-12-021-11/+38
| | | | | | | | | | | | | | 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>
* tier/glusterd : Validation for frequency thresholds and record-countersJoseph Fernandes2015-12-012-34/+295
| | | | | | | | | | | | | | | | | | | | | | | | | 1) if record-counters is set to off check if both the frequency thresholds are non-zero, then pop an error message, with volume set failed. 2) if record-counters is set to on check if both the frequency thresholds are zero, then pop an note, but volume set is not failed. 3) If any of the frequency thresholds are set to a non-zero value, switch record-counters on, if not already on 4) If both the frequency thresholds are set to zero, switch record-counters off, if not already off NOTE: In this fix we have 1) removed unnecessary ctr vol set options. 2) changed ctr_hardlink_heal_expire_period to ctr_lookupheal_link_timeout Change-Id: Ie7ccfd3f6e021056905a79de5a3d8f199312f315 BUG: 1286346 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12780 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd-ganesha xlator parser for ganesha-ha.confCedric Buissart2015-12-011-47/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current method for parsing ganesha-ha.conf is prone to issues : Before the patch : - no double quote leads to segfault e.g. : HA_CLUSTER_NODES=server1,server2 - no check for comments. e.g. : #HA_CLUSTER_NODES="server1,server2" would be used if preceding the real value This is an attempt to a cleaner parser: 1- factorization of parsing code, creating 1 dedicated, more generic parser 2- double quote are no longer mandatory 3- should not segfault 4- lines are no longer limited to 1024 chars Resolves RHBZ 1283211 Change-Id: I75f11461fe1b84915d1c5cfe945b47bd81abc2b1 BUG: 1283211 Signed-off-by: Cedric Buissart <cbuissar@redhat.com> Reviewed-on: http://review.gluster.org/12588 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* quota: vol quota fails when transport.socket.bind-address is set in glusterdMohamed Ashiq2015-11-301-1/+6
| | | | | | | | | | | | | | | | | | When glusterd is binded to specific IP quota fails, since the server is hardcoded to localhost. IP can be assigned in the glusterd part of quota, but IP is not populated in cli part. So Quota makes use of glusterfsd's unix domain socket transport type. Change-Id: Ib03332cc203795456ee6087017cea08eed3d7417 BUG: 1277105 Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/12489 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: glusterfsd to support volfile-server-transport type "unix"Manikandan Selvaganesh2015-11-261-1/+2
| | | | | | | | | | | | | | | | | If glusterfsd uses transport type "unix", 'addrstr' can be empty. So, it may fail to fetch the trusted volfile in this case. This patch allows to fetch volfile even if addrstr is empty. Change-Id: I831c5cd0b07b90ae843ec63f0fad9241d9407f6b BUG: 1279484 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/12757 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/tier: Reset to reconfigured values after detach-tierMohammed Rafi KC2015-11-264-20/+57
| | | | | | | | | | | | | | After detach-tier commit , we have to reset the option reconfigured for tier volume Change-Id: Iae0210259720d6ac14ccc0cc339dc9f54a0c4571 BUG: 1285046 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12736 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* Tiering: change of error message for "v tier <vname> detach status"hari gowtham2015-11-261-0/+8
| | | | | | | | | | | | | | If the volume was not a tiered volume then empty status was being printed instead of an error message. Change-Id: I13ccb16e1562966976a48d9365ced4c8a124de59 BUG: 1284357 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12713 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* cli: Indicate which brick of the replica is the arbiterRavishankar N2015-11-251-0/+6
| | | | | | | | | | | | | Enhances the cli output for arbiter volumes as requested in the BZ. Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: I28cc34d7d19def043d54291cede25a58dbcc5051 BUG: 1285288 Reviewed-on: http://review.gluster.org/12747 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> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: copy snapshot object during duplication of volfileMohammed Rafi KC2015-11-251-0/+2
| | | | | | | | | | | | | | | | When creating duplicate volfile for hot/cold tier, we need to copy the snapshot object in to volfile as it requires to generate snapshot brick volfile. Change-Id: I39ccfa20cd1c16ef2801901e3cd3a31c76f8995d BUG: 1284789 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12734 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
* glusterd: Change volume start into v3 frameworkMohammed Rafi KC2015-11-254-12/+100
| | | | | | | | | | | | | | | | | | As part of volume start, if the volume is of tier type then we need to start tiering daemon also. But before starting tier daemon all the bricks should be started. So by changing volume start into v3 framework, we can do tier start in post validate phase Change-Id: If921067f4739e6b9a3239fc5717696eaf382c22a BUG: 1284372 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12718 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/bitrot : Integration of bad files from bitd with scrub status commandGaurav Kumar Garg2015-11-231-1/+40
| | | | | | | | | | | | | | | | Currently scrub status command is not displaying list of all the bad files. All the bad files are avaliable in the bitd daemon. With this patch it will dispaly list of all the bad file's in the scrub status command. Change-Id: If09babafaf5d7cf158fa79119abbf5b986027748 BUG: 1207627 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12720 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: cli command implementation for bitrot scrub statusGaurav Kumar Garg2015-11-197-10/+553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLI command for bitrot scrub status will be : gluster volume bitrot <volname> scrub status Above command will show the statistics of bitrot scrubber. Upon execution of this command it will show some common scrubber tunable value of volume <VOLNAME> followed by statistics of scrubber statistics of individual nodes. sample ouput for single node: Volume name : <VOLNAME> State of scrub: Active Scrub frequency: biweekly Bitrot error log location: /var/log/glusterfs/bitd.log Scrubber error log location: /var/log/glusterfs/scrub.log ========================================================= Node name: Number of Scrubbed files: Number of Unsigned files: Last completed scrub time: Duration of last scrub: Error count: ========================================================= This is just infrastructure. list of bad file, last scrub time, error count value will be taken care by http://review.gluster.org/#/c/12503/ and http://review.gluster.org/#/c/12654/ patches. Change-Id: I3ed3c7057c9d0c894233f4079a7f185d90c202d1 BUG: 1207627 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10231 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>
* Tiering: Adding space between error meassge for detach-tierhari gowtham2015-11-191-1/+1
| | | | | | | | | | | Change-Id: I730cf7fa6fbfb3842d337cd3d7b8394b9c3876d8 BUG: 1283488 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12657 Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* core : Use correct path in dlopen for socket.soAtin Mukherjee2015-11-191-2/+2
| | | | | | | | | | | | | | 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: 1283485 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>
* mgmt/gluster: Handle tier brick volgenPranith Kumar K2015-11-193-45/+128
| | | | | | | | | | | | | | | | 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. BUG: 1250803 Change-Id: Ibe8f2d4ad5cb350306ab7ca0753e0f9a40b96a26 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>
* glusterd/geo-rep: Adding ssh-port option for geo-rep createKotresh HR2015-11-181-4/+33
| | | | | | | | | | | | | | | | | | | Geo-replication uses default ssh port 22 for setup. i.e., to distribute ssh keys to slaves. In container environments, custom port number might be used. Hence to support custom port number for ssh, option is provided in geo-rep create command to take the same. Change-Id: I0fb61959b1c085342b8e4c21ac4e076fba5462f1 BUG: 1276028 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12504 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* glusterd/afr : Readdirp performance improvementAnuradha Talur2015-11-181-0/+17
| | | | | | | | | | | | | | | Add xlator options to index xlator with xattrs that it needs to keep track of. Change-Id: If818673be5e626f77e65cc3a340f8cdd624179c2 BUG: 1250803 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>
* cluster/ec: Mark self-heal fops as internalPranith Kumar K2015-11-181-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>
* geo-rep: Allow setting config remote_gsyncdAravinda VK2015-11-171-1/+0
| | | | | | | | | | | | | | | | | | Restrictive ssh is not used in containerized environment where networking configuration is "net=host". SSH Pem keys pushed to the slave without gsyncd path in it. (Patch #12459) Actual remote_gsyncd path need to be set to actual path of gsyncd. With this patch, remote_gsyncd is removed from reserved option list. Change-Id: Ia2063e4654e378b62b2414bdad21143c86ad1b9a Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1276028 Reviewed-on: http://review.gluster.org/12472 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tests: spurious failure fix for bug-948686.tAtin Mukherjee2015-11-172-0/+27
| | | | | | | | | | | | | Ensured import volume and volume start doesn't race in volinfo by refcounting volinfo. Change-Id: I7467eccaba9a00fd63ba0121d8157df24d1c00a6 BUG: 1258714 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12329 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/tier make cache mode default for tiered volumesDan Lambright2015-11-172-1/+4
| | | | | | | | | | | | | The default mode for tiered volumes must be cache. The current test mode was for engineering and should ordinarily not be used by customers. Change-Id: I20583f54a9269ce75daade645be18ab8575b0b9b BUG: 1282076 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12581 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
* core: use syscall wrappers instead of direct syscalls - tailKaleb S KEITHLEY2015-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | tail, as in dog chasing its tail. These are the unwrapped syscalls that have crept in (or were missed) in the previous patches. various xlators and other components are invoking system calls directly instead of using the libglusterfs/syscall.[ch] wrappers. If not using the system call wrappers there should be a comment in the source explaining why the wrapper isn't used. Change-Id: If183487de92fc7cbc47d4c5aa3f3e80eae50b84f BUG: 1267967 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12589 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/tier: Disallow detach commit when detach in progressDan Lambright2015-11-161-0/+25
| | | | | | | | | | | | | 1. Check if detach is running, disallow detach commit if so. 2. Cleanup shutdown of tier daemon on detach: do not rerun fix-layout, do not send incorrect status back to glusterd. Change-Id: I97202f748773c1176396a4ffd32a4c7fa9b9c1bc BUG: 1279637 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12560 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: brick failed to startMohammed Rafi KC2015-11-161-1/+3
| | | | | | | | | | | | | | | | | | brick volfiles are generated in post validate, if it is running version higher than GLUSTER_3_7_5, else will be running in syncop. If the code fall back to syncop, and volume is stopped then we were returning the operation with out generating volfiles. Change-Id: I3b16ee29de19c5d34e45d77d6b7e4b665c2a4653 BUG: 1282322 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12552 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>
* tier/ctr: Providing option to record or ignore metadata heatJoseph Fernandes2015-11-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we heat up a file for both data and metadata write. Here we provide a ctr xlator option called "ctr-record-metadata-heat" were the admin can decide on recording metadata heat i.e heatup a file on metadata writes or not. Metadata data operation are a. setattr: explicit changing of atime/mtime using utimes, changing of posix permissions of the file b. rename: Renaming a file, c. unlink, link: adding or deleting hardlinks d. xattrs: setting or removal of xattrs. NOTE: atime, mtime and ctime change through writev, readv, truncate, mknod and create will not be considered here as these fops are data and primary metadata fops. Defaultly "ctr-record-metadata-heat" is off. Admin can switch it on using gluster volume set command. Change-Id: I91157509255dd5cb429cda2b6d4f64582e155e7b BUG: 1279166 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12540 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* build: MKDIR_P is not defined for Makefiles, use mkdir_p insteadNiels de Vos2015-11-101-1/+1
| | | | | | | | | | | Change-Id: Id6d5263eb7b1c53e72a7668e716e9cc4e34b82cd Reported-by: Milind Changire <mchangir@redhat.com> BUG: 1198849 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12553 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mgmt/glusterd: Store arbiter-count and restore itPranith Kumar K2015-11-044-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | Problem: 1) Glusterd doesn't remember about arbiter information of replica volume in store. When glusterd goes down and comes backup, arbiter volumes will become replica volumes. 2) Glusterd doesn't import/export arbiter information to/from the other peers. 3) Volume info doesn't show any arbiter count in the output. Fix: 1) Persist arbiter information in glusterd-store 2) Import/Export arbiter information of the volume 3) Change volume info output to show arbiter count. Change-Id: I2db81e73d2694b01f7d07b08a17b41ad5a55c361 BUG: 1276675 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12475 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* v info for disperse count fails while upgradingHari Gowtham2015-11-041-4/+12
| | | | | | | | | | | | | The upgrade from 3.7.5-3 to 3.7.5-5 causes the type and number of bricks for the cold tier to be printed wrong. Change-Id: Ia45b97c35fef88f9c66e15e5bdb93fd30cb342af BUG: 1277481 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12495 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: move new feature (tiering) enum op to the last of the arrayGaurav Kumar Garg2015-11-031-2/+5
| | | | | | | | | | | | | | | | | | | | Currently new feature tiering have GD_OP_DETACH_TIER and GD_OP_TIER_MIGRATE enum in the middle of the glusterd_op_ enum array. In multi nodes cluster when one of the node upgraded from lower version to higher version and upon executing command can end up in a mismatch in enum ops at the receiver ends causing command execution fail. Fix is to put every new feature glusterd operation enum code to last of the enum array. Change-Id: I640f811065e8c84add624237aa80fed43fde5967 BUG: 1276643 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12473 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd : vol replace-brick fails when transport.socket.bind-address is set ↵Mohamed Ashiq Liyazudeen2015-11-031-1/+6
| | | | | | | | | | | | | in glusterd Change-Id: Id8c29aa46b526bc003a1d7023714b67805e35a99 BUG: 1276386 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/12461 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>
* snapshot: Inherit snap-max-hard-limit from original volumeAvra Sengupta2015-11-022-1/+1
| | | | | | | | | | | | | | | | | | A snapshot should inherit snap-max-hard-limit from the original volume while being created and when being restored to, it should restore the same. Similarly a clone taken from a snapshot should inherit snap-max-hard-limit from the snapshot. Change-Id: If8e90e2ffc10e22086b803ac8e2638a16bcec968 BUG: 1275616 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12437 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot: Don't display snapshot's hard-limit and soft-limit in vol infoAvra Sengupta2015-11-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | The snap-max-hard-limit being displayed in the volume info currently is propagated from system's snap-max-hard-limit as that is a global option common for all volumes, and hence ends up showing the system's snap-max-hard-limit. We should not be displaying snap-max-hard-limit and snap-max-soft-limit in the volume info at all, as these are snap config options and should be set and displayed via snap config command. Modified bug-1113476.t to test the same behaviour. Change-Id: I90891f0cf7fb39fd686787297c7f7cd8c1e7daa1 BUG: 1276018 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* quota: add version to quota xattrsvmallika2015-11-026-8/+45
| | | | | | | | | | | | | | | | | | | | | When a quota is disable and the clean-up process terminated without completely cleaning-up the quota xattrs. Now when quota is enabled again, this can mess-up the accounting A version number is suffixed for all quota xattrs and this version number is specific to marker xaltor, i.e when quota xattrs are requested by quotad/client marker will remove the version suffix in the key before sending the response Change-Id: I1ca2c11460645edba0f6b68db70d476d8d26e1eb BUG: 1272411 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12386 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* debug/io-stats: Add FOP sampling featureRichard Wareing2015-11-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Using sampling feature you can record details about every Nth FOP. The fields in each sample are: FOP type, hostname, uid, gid, FOP priority, port and time taken (latency) to fufill the request. - Implemented using a ring buffer which is not (m/c) allocated in the IO path, this should make the sampling process pretty cheap. - DNS resolution done @ dump time not @ sample time for performance w/ cache - Metrics can be used for both diagnostics, traffic/IO profiling as well as P95/P99 calculations - To control this feature there are two new volume options: diagnostics.fop-sample-interval - The sampling interval, e.g. 1 means sample every FOP, 100 means sample every 100th FOP diagnostics.fop-sample-buf-size - The size (in bytes) of the ring buffer used to store the samples. In the even more samples are collected in the stats dump interval than can be held in this buffer, the oldest samples shall be discarded. Samples are stored in the log directory under /var/log/glusterfs/samples. - Uses DNS cache written by sshreyas@fb.com (Thank-you!), the DNS cache TTL is controlled by the diagnostics.stats-dnscache-ttl-sec option and defaults to 24hrs. Test Plan: - Valgrind'd to ensure it's leak free - Run prove test(s) - Shadow testing on 100+ brick cluster Change-Id: I9ee14c2fa18486b7efb38e59f70687249d3f96d8 BUG: 1271310 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12210 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: fix info file checksum mismatch during upgradeanand2015-10-311-10/+15
| | | | | | | | | | | | | | | | issue: probing a new node(>=3.6) from 3.5 cluster is moving the peer to rejected state. fix: Disperse vol support is added from 3.6 release, so write disperse fields (disperse_count=0 and redundancy_count=0) in vol info file only if cluster version supported. Change-Id: I11d5e2e337b9bbaddc8e52ca7295ba481beb1132 BUG: 1276423 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/12464 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* afr/glusterd: Fix naming issue in tier related changesMohammed Rafi KC2015-10-305-15/+20
| | | | | | | | | | | | | | changing some of the function names added recently as part of the tiering changes. Change-Id: I238831128ee00cdf83f8a80be937d3528d133099 BUG: 1275489 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12431 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* snapshot : copying nfs-ganesha export fileJiffin Tony Thottan2015-10-304-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While taking snapshot, the export file used by the volume should copy to snap directory. So that when restore of snapshot happens, the volume can retain all its configuration for exporting via nfs-ganesha. The export file is stored at "/etc/ganesha/export" in the following format "export.<volname>.conf" The fix handles given cases in the following manner : case a: The nfs-ganesha(global) is ON during snapshot and restore. i.) Volume was exported during snapshot. When we restore snapshot, then volume should be exported back with old configuration file. ii.) Volume was unexported during snapshot. When we restore snapshot, then volume should unexported again. case b: The nfs-ganesha is ON during snapshot and OFF during restore Volume was exported during snapshot. When we restore snapshot, the conf will be copied to corresponding location and if nfs-ganesha enabled again, then volume will be exported. For the clones, export conf file will created in /etc/ganesha/export and then export it via ganesha. Change-Id: Ideecda15bd4db58e991cf6c8de7bb93f3db6cd20 BUG: 1257709 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/12034 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>