summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* geo-rep: Pause and Resume feature for geo-replicationAravinda VK2014-05-097-71/+162
| | | | | | | | | | | | | | | | Changelog consumption/processing now happens in seperate process group than monitor. When monitor process group gets SIGSTOP all worker process, ssh, rsync will be paused except the changelog processing. When it gets SIGCONT it resumes its operation. Changelog agent runs as RepceServer, geo-rep worker communicates with changelog agent using RepceClient. Change-Id: I35c333e4d8b13d03a7808aed601960eef23cfa04 BUG: 1093602 Signed-off-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/7322
* geo-rep: Changelog History consumption more fixesAravinda VK2014-05-093-12/+14
| | | | | | | | | | | Number of parallel threads to process changelog history is made configurable via sync_jobs Change-Id: Idcd8e655d9df540cfa48648b9e98af941f95e9d0 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/7660 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* geo-rep: Loading libgfchangelog.so only while running geo-repAravinda VK2014-05-093-5/+6
| | | | | | | | | | | | | | | | | In source install, libgfchangelog is installed in /usr/local/lib When glusterd runs /usr/local/libexec/glusterfs/python/gsyncd --version it fails to find library without LD_LIBRARY_PATH. This patch avoids loading library when it is run from glusterd during start. BUG: 1096026 Change-Id: I59912227ac27ff4877d947a7c8f1fe2e8c5be06e Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/7713 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* mgmt/glusterd: delete oldest snapshot upon exceeding soft-limitRaghavendra Bhat2014-05-083-8/+118
| | | | | | | | | | Change-Id: I2d6ebae3ced1910f2dee43eeb9fc430e9f31073f BUG: 1061685 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7587 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: volume gets deleted if restore failsRajesh Joseph2014-05-081-0/+8
| | | | | | | | | | | | | | | If the restore command fails in pre-validate phase then main volume gets deleted. Fix: Perform cleanup only when pre-validate passes. Change-Id: I7128c8582c3dd166a5683babb7e136ad0b56f0ac BUG: 1061685 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/7665 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Don't release big_lock before completing snapshot creationVijaikumar M2014-05-083-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Releasing the big-lock can cause problem like deadlock or memory corruption. Same happened with bug 1091926 where glusterd on node-2 entered a commit phase and released a big-lock. The originator node received timeout for the commit phase and triggered a post-validate cleanup to the node-2. Now node-2 continued to work with the object that are alreday cleaned-up and resulted in a crash. Solution is to not to release big-lock in the commit phase of snapshot creation. Change-Id: I571194fdb0b0ecc91bd13f2a9fc92fe4338d14dc BUG: 1091926 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Execute lvm snapshots in parallelVijaikumar M2014-05-085-73/+248
| | | | | | | | | | | | | | | | | Back-end LVM Snapshot is executed parallely as synop task This helps is gaining performance when there are more bricks in a node. This patch also removes unwanted logs printed in snapshot cleanup Change-Id: I3174cb4547ebb670eca37a98eb9d75ecb0672a90 BUG: 1061685 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7461 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snapshot: Add brick-count suffix for the LVM snapshotVijaikumar M2014-05-085-278/+245
| | | | | | | | | | | | | | | | When there are more than one brick created from the same LVM volume group, there will be a conflict with the LVM snapshot name we use. Solution is to add a brick-count suffix to the LVM snapshot name Change-Id: I7258e69fe0b50e86b81c66ab1db523ab3c7cbae0 BUG: 1091934 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7581 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* runtime: Disable optimization for OSX versions < 10.9Harshavardhana2014-05-081-8/+12
| | | | | | | | | | | | | | | Optimization flags has led to segfaults at wrong locations throughout gluster code for versions < 10.9 Assuming this to be a compiler bug, disable optimization flags Change-Id: Ia2dc983dc5bb06935f03b68c07688ce41255d7da BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7656 Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org>
* Update Maintainers to reflect recent changesVijay Bellur2014-05-081-0/+11
| | | | | | | | | Change-Id: I8dc3347d88942473810c2b4c9d52a69ecb6129e8 BUG: 1040351 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7689 Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
* cluster/afr: Remove stale index in self-heal codepathPranith Kumar K2014-05-084-5/+45
| | | | | | | | | Change-Id: I635fc0fa955b33590f1c5b4dfec22d591ea8575c BUG: 1032894 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6592 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfchangelog: memory accounting intializationVenky Shankar2014-05-081-0/+3
| | | | | | | | | | | Needed as memory accounting turned ON by default now. Without this, GF_{CALLOC,MALLOC} calls assert. Change-Id: Ie54a6efb61871e70d4f7c796d9c86a867051e2e0 BUG: 1094708 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/7698 Reviewed-by: Kotresh HR <khiremat@redhat.com>
* mgmt/glusterd: Prevent spurious brick restartsPranith Kumar K2014-05-083-23/+44
| | | | | | | | | Change-Id: I7ee5d18b926d6c31e3e4ea2f5fbe9050c8e1dee8 BUG: 959986 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4954 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* mgmt/glusterd: Perform Pending quorum actions after OpPranith Kumar K2014-05-081-0/+7
| | | | | | | | | Change-Id: I2bb67b5fb4a6f6dac892ef3206e7a79706018a6e BUG: 959986 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4955 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: Use a calloc-ed copy of txn_id for glusterd_do_replace_brickAvra Sengupta2014-05-082-3/+29
| | | | | | | | | | | | | | | As glusterd_do_replace_brick() is spawned through gf_timer_call_after(), by the time it's called the event is freed, and the txn_id is lost. Hence using a calloc-ed copy, which will be freed as a part of rb_ctx dict. Change-Id: I3e309fe1a7ba96ad1d1ce01f4d2aa18178f59244 BUG: 1095097 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7686 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* mgmt/glusterd: quorum check before taking the snapshotRaghavendra Bhat2014-05-075-23/+667
| | | | | | | | | | | | | | | | | | | | without force option: quorum fails if glusterds are not in quorum. If glusterd are in quorum, then volume quorum (i.e quorum of the bricks) is checked. volume quorum fails even if one of the bricks are down. with force option: even though the glusterds are not in quorum, and some bricks are down, the quorum check of the volume (i.e bricks) is done and if the volume quorum is met, snapshot is taken. Change-Id: I06971e45d5cf09880032ef038bfe011e6c244268 BUG: 1061685 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7463 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: NFS server wrongly started with `DEBUG` log-levelHarshavardhana2014-05-071-2/+1
| | | | | | | | | | | | | | Disable DEBUG Change-Id: I011231ba3df4a42f892f1305867bfc74bb101269 BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7654 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* gsyncd / geo-rep: Initialize default memory accountingVenky Shankar2014-05-061-4/+11
| | | | | | | | | | | | | | | | commit 7fba3a8 enables memory accounting by default. Since geo-replication binary (gsyncd) does not declare a memory accounting function, call like GF_{CALLOC,MALLOC} result int asserts. This patch initializes default memory accounting. Change-Id: I9ad1de8bca6745a9899a006a863a7cfeef73d52f BUG: 1094708 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/7683 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd : Port glusterd sync log messages to gf_msg APIAtin Mukherjee2014-05-064-33/+67
| | | | | | | | | Change-Id: Ic3ed2c96d8fc3a15fedaa80517a2c79c0c858963 BUG: 1075611 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/7652 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: port network failure log messages to gf_msg APIKrishnan Parthasarathi2014-05-063-11/+33
| | | | | | | | | Change-Id: I23df6d179e9d66a71721e9844a34c5b96586f90f BUG: 1075611 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7462 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: Port server quorum messages to the gf_msg APIKaushal M2014-05-065-6/+84
| | | | | | | | | | Change-Id: I84716cc07f3cbd8c1b2825a5676d6693fed6fade BUG: 1075611 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/7578 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* rpc: don't stop sending ping packets to an active server.Krishnan Parthasarathi2014-05-062-40/+35
| | | | | | | | | | | | | - Removed an unnecessary ref on rpc_clnt object. - Removed saved_frames_delete function, which was unused. Change-Id: Ie8a9c4bb20c1fd59744b64b56eb043eca095e5e3 BUG: 1094655 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7678 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: Allow bumping up the cluster op-versionKaushal M2014-05-062-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | This patch allows a user to bump up the cluster op-version by doing # gluster volume set all cluster.op-version <OP-VERSION> The op-version will be bumped only if - all the peers in the cluster support it, and - the new op-version is greater than the current cluster op-version This set operation will not do any other change other than changing and saving the cluster op-version in the glusterd.info file. It will NOT, - change any existing volume - add the option to the global options list - fix the cluster op-version to the given version, it can be bumped up by other volume set commands. Change-Id: I084b4fcc45e79dc2ca7b7680d7bb371bb175af39 BUG: 1092592 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/7603 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/snashot: Perform missed snap createsAvra Sengupta2014-05-065-145/+599
| | | | | | | | | | | | | | | | | | | | | | | | | When a brick is started, and the glusterfsd process requests for volfile, the brick_name is sent in the req dict. In glusterd, after fetching the spec the brick_name is looked up in the missed_snap_list, and any missing snap creates on the same brick are performed. After this, the glusterd responds back with the specfile. Also collate brick data from the node's hosting the bricks during restore. In case the data is absent, the local node's data is used. This is needed to ensure that, during a restore we collect the information created when a missed snap create is performed. Change-Id: I47cefdeba96f2702be810965734cf0fac61d3d2d BUG: 1061685 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7551 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Fetch brick mount_dirs during brick create.Avra Sengupta2014-05-0612-118/+462
| | | | | | | | | | | | | | | | | Fetch the mount directory path for a brick, during volume create, add-brick, and replace-brick. When a snap-create is missed, use this mount directory information to create the brick path for the missed snap brick. Change-Id: Iad3eec96a32cf340f26bdf3f28e2f529e4b77e31 BUG: 1061685 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7550 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* meta: print in json for stack/frames, cmdline and versionHarshavardhana2014-05-056-134/+162
| | | | | | | | | | | | | - Follow formatting rules based on RFC4627 - http://www.ietf.org/rfc/rfc4627.txt - Add checks for json in regression test meta.t Change-Id: I480d32ce042b202d3ed8939623c629a03b458551 BUG: 1089216 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7653 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* meta: export process state dumpAnand Avati2014-05-0532-22/+436
| | | | | | | | | | | | Various parts of process state dump are exposed through most appropriate virual files/dirs Change-Id: Iff30f8ea76552f2f6d9c98def688c5ec4bc6f2af BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7542 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* meta: (re-)Implement Meta translatorAnand Avati2014-05-0541-1745/+2731
| | | | | | | | | | | | | | | | | The meta translator exposes details about glusterfs itself in the form of a virtual namespace. Loading the translator on the client side creates the meta virtual view under $mntpoint/.meta by default. The directory is not listed (even with ls -a) and can be accessed by doing a "cd /mnt/.meta" Change-Id: I5ffdf39203841a9562a8280a1f79dc76d4dded5d BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7509 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* mem-accounting: enable memory accounting by defaultAnand Avati2014-05-053-23/+3
| | | | | | | | | | | | | | | | memory accounting are constant time operations which involve a few pointer dereferences and integer increments (no loops or searches etc.) benefits of having memory usage info outweigh the minor accounting overheads Change-Id: If9bc6db5ffd0e00f0fd64b2f6eed094bf3543996 BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7543 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* mem-accounting: store type string and print in metaAnand Avati2014-05-053-11/+15
| | | | | | | | | Change-Id: Ied1de473c72967110b54f033768f7ac60bf66edc BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7541 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* statedump: strfd based APIsAnand Avati2014-05-052-8/+151
| | | | | | | | | | | | Expose strfd based APIs for extracing various types of xlator state information. Change-Id: Ibbb6594b6fb31206bc6a1b1ea6514ed41889583b BUG: 1089216 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7540 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* mgmt/gluster: Use fsync instead of O_SYNCPranith Kumar K2014-05-056-45/+40
| | | | | | | | | | | | | | | | | Glusterd uses O_SYNC to write to temp file then performs renames to the actual file and performs fsync on parent directory. Until this rename happens syncing writes to the file can be deferred. In this patch O_SYNC open of temp file is removed and fsync of the fd before rename is done. Change-Id: Ie7da161b0daec845c7dcfab4154cc45c2f49d825 BUG: 908277 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7370 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs.spec: Add missing files in %files sectionPranith Kumar K2014-05-041-0/+13
| | | | | | | | | | | Thanks to Niels for all the help in finding RCA. Change-Id: I5678c53a5c04de18ccd676fbaf5bf8b0c77c9c14 BUG: 1080970 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7645 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* changelog: in C99 `inline` shouldn't be part of function definitionHarshavardhana2014-05-032-5/+6
| | | | | | | | | | | | | | | | | - C99 standard dictates that `inline` should be used only to hint function implementation not as a definition - http://clang.llvm.org/compatibility.html#inline This also leads to run time issues as 'undefined symbols' - Remember to use adding explicit headers when using an external function Change-Id: I66a9030da7ac38ded6e0b6a977182be977382fa2 BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7655 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* glusterd/snapshot: umount2 on OSX/NetBSD is unmountHarshavardhana2014-05-031-9/+21
| | | | | | | | | | Change-Id: I8de4d47bb2a54b915243ea029cce2585fba34876 BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7651 Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Allow symlink parent for snap_mount_folderHarshavardhana2014-05-031-1/+1
| | | | | | | | | | | | If '/var' is a symlink which is on OSX, 'glusterd' initialization fails which is not necessary fix it. Change-Id: I83adc16cfc0e0deaa18acf74ba99299ba4a21d60 BUG: 1061685 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7558 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/server: Validate outstanding-rpc-limitSantosh Kumar Pradhan2014-05-033-7/+11
| | | | | | | | | | | | | | | server.outstanding-rpc-limit by passes validation enforcement of gluster as protocol/server ignores any keys starting with rpc (rpc* wildcard). Which also causes a side effect, i.e. help text gets displayed as NULL. Change-Id: I925e028529d671e1e29a0c7ff7e625fdb49a1be4 BUG: 1091364 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/7562 Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd : Volname, brickpath & volfpath length validationAtin Mukherjee2014-05-0310-24/+152
| | | | | | | | | | | | | | | | | | | | | | | | While creating a volume and adding a brick validation for _POSIX_PATH_MAX is done on absolute pathname instead of relative pathname due to which a brickpath having less than _POSIX_PATH_MAX may also fail the validation if the directory length is greater than (_POSIX_PATH_MAX -strlen(brickpath/volume name). Also this fix addresses one cli response message correction which says the volume file is too long instead of brick path is too long (when brickpath length validation doesn't fail and vol file length validation fails.) It is also important to note that with the current design of volfile naming, it can not be guranteed that volname and brickpath can have max of _POSIX_PATH_MAX characters. Change-Id: I1283d1f9dea96ae797620002c8723719f26a866d BUG: 1085330 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/7420 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: handle postvalidate carefully when prevalidate failsRaghavendra Bhat2014-05-033-24/+59
| | | | | | | | | | | | | | * Also changed the order of peers retrieval and snapshot retrieval upon glusterd start, so that the snapshot bricks can be properly resolved while cleaning up the snapshots. Change-Id: I120704e4412a9cadb8d90a9b7969f2b4a1196bc5 BUG: 1061685 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7494 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* barrier : fsync call over NFS should be barriered when barrier is enabledAtin Mukherjee2014-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | barrier_fsync was not getting hit when fsync call is issued from the application over NFS mount. Investigation reveals that NFS doesn't send an explicit fsync call to the glusterfs server, however NFS converts it with a stable write with O_DSYNC flag, so for a fsync call over NFS mount point, barrier feature always needs to check for writev and its correspoding flags. So to meet all the coditions of write with O_SYNC and fsync getting blocked when barrier is enabled the check has been modified with following: if (!((flags | fd->flags) & (O_SYNC | O_DSYNC))) Point to be noted here is we need to check both fd's flag and the explicit flag as for NFS write fd->flags is 0. Bug ID : 1091902 Change-Id: Ifd5377fca2cc93bb72158dd525b2aab8b4164ca8 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/7633 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* barrier : barrier O_SYNC write incorrect flag checkAtin Mukherjee2014-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | barrier_writev function was doing the following check to determine whether its a O_SYNC write or not: if (!(flags & O_SYNC)) The problem here is this flag is not fd's flag and gfapi write does not copy open call fd's flag into write flag because of which O_SYNC writes were not getting barriered even if barrier was enabled. The check has been modified as: if (!(fd->flags & (O_SYNC | O_DSYNC))) Change-Id: I07b23852d150b81c7317100ca6d22d082ad897cd BUG: 1090488 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/7549 Reviewed-by: Varun Shastry <vshastry@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli/hooks : Add volume set options to enable/disable nfs-ganesha support.Meghana M2014-05-0313-3/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. gluster volume set nfs-ganesha.enable ON/OFF If the option is set to ON, the volume field in the nfs-ganesha configuartion file is edited. Gluster-nfs is disabled on that volume and the volume is exported using nfs-ganesha. 2.gluster volume set nfs-ganesha.host IP This is used to provide the IP of the nfs-ganesha host. Note : nfs-ganesha.host MUST be set before using nfs-ganesha.enable ON The switch from gluster-nfs to nfs-ganesha is mostly done by the hook-scripts in the post phase of the 'set' option. As a result, gluster volume reset does not function as it is expected to. By default, nfs-ganesha will be set to off but the process will not be killed. Hence, a few changes have to be made post 'reset' option as well. Those changes also have been added. Change-Id: I7fdc14ee49d1724af96eda33c6a3ec08b1020788 BUG: 1092283 Signed-off-by: Meghana <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/7321 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/snapshot: Restore cleanupRajesh Joseph2014-05-026-29/+518
| | | | | | | | | | | | | | | If restores fails for some reason then we should revert the restore operation. To do so we take the backup of vols folder before doing a restore and if the restore fails then we revert the changes done. Change-Id: I97f72aec3a34fc122bf137beb336e94db3a04dff BUG: 1061685 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/7548 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* extras/hookscripts: Remove %P from smb share path value.Raghavendra Talur2014-05-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | We had added %P in the value for path in smb share definitions to avoid ctdb errors. However, %P does not work well for windows clients and they fail to access the share. Solution for the original problem: The error messages were being generated by a monitoring script that ctdb runs. The script reads the path value from testparm and tests if it exists in the local machine. This particular check does not hold valid for virtual file system backends like gluster. There is no harm in asking ctdb to not to check the existence of such backend and can be done by setting the following config in ctdb.conf: CTDB_SAMBA_SKIP_SHARE_CHECK=YES. Change-Id: I91627c8a279126a5cc24c6347847f9bfbad53dd5 BUG: 1068776 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7598 Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* storage/posix: do not dereference gfid symlinks before ↵Xavier Hernandez2014-05-023-8/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | posix_handle_mkdir_hashes() Whenever a new directory is created, its corresponding gfid file must also be created. This was done first calling MAKE_HANDLE_PATH() to get the path of the gfid file, then calling posix_handle_mkdir_hashes() to create the parent directories of the gfid, and finally creating the soft-link. In normal circumstances, the gfid we want to create won't exist and MAKE_HANDLE_PATH() will return a simple path to the new gfid. However if the volume is damaged and a self-heal is running, it is possible that we try to create an already existing gfid. In this case, MAKE_HANDLE_PATH() will return a path to the directory instead of the path to the gfid. To solve this problem, every time a path to a gfid is needed, a call to MAKE_HANDLE_ABSPATH() is made instead of the call to MAKE_HANDLE_PATH(). Change-Id: Ic319cc38c170434db8e86e2f89f0b8c28c0d611a BUG: 859581 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/5075 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Differentiate rebalance status and remove-brick status messagesggarg2014-05-024-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | previously when user triggred 'gluster volume remove-brick VOLNAME BRICK start' then command' gluster volume rebalance <volname> status' showing output even user has not triggred "rebalance start" and when user triggred 'gluster volume rebalance <volname> start' then command 'gluster volume remove-brick VOLNAME BRICK status' showing output even user has not run rebalance start and remove brick start. regression test failed in previous patch. file test/dht.rc and test/bug/bug-973073 edited to avoid regression test failure. now with this fix it will differentiate rebalance and remove-brick status messages. Signed-off-by: ggarg <ggarg@redhat.com> Change-Id: I7f92ad247863b9f5fbc0887cc2ead07754bcfb4f BUG: 1089668 Reviewed-on: http://review.gluster.org/7517 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/snapshot: Activation and De-activation of snapshotJoseph Fernandes2014-05-029-67/+601
| | | | | | | | | | | | | | | | | | | | | Previously, snapshots by default were activated on creation and there was no option to activate or deactivate them on demand. This will allow the user to activate and deactivate on demand. The CLI goes as follows 1) Activate the snap using a command "gluster snapshot activate <snapname> [force]" 2) Deactivate the snap using a command "gluster snapshot deactivate <snapname>" Note: Even now the snapshot will be activated during creation. Change-Id: I0946d800780f26c63fa1fcaf29aabc900140448f BUG: 1061685 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/7476 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/snapshot: Move read-only xlator to client graphRajesh Joseph2014-05-021-2/+16
| | | | | | | | | | | | | | | read-only xlator is moved from server graph to client graph so that AFR & DHT healing can take place at server Change-Id: I140ec962330c59d3b44f9bc8084a1544a1fd6c54 BUG: 1061685 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/7582 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: avoid repetitive logging of disconnect messagesKrishnan Parthasarathi2014-05-021-3/+6
| | | | | | | | | | | | | | NFS/SHD process disconnecting from glusterd, when the respective service are down, would lead to repeated logging of disconnect related messages, owing to the rpc reconnect logic in glusterfs(d). This patch addresses that by logging the disconnect only on the first disconnect event. Change-Id: I4008d2436721f4ba093270df4ccb3fc885f22ca0 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7468 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* scripts: CTDB lockvol ping-timeout should be 10secsHarshavardhana2014-05-021-0/+9
| | | | | | | | | | | | | | | Users often forget to update the ping-timeout, perhaps we should take care of this automatically Change-Id: I6d14df8aa52665847233cb1760dfd54f41baadec BUG: 1091600 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7569 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>