summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mount/fuse: adding a setxattr filter pass for geo-rep create.v3.5.0beta2Ajeet Jha2014-01-271-0/+2
| | | | | | | | | | | | Adding filter pass for setxattr when key is "glusterfs.gfid.newfile". This was blocking creates at slave volume. Change-Id: I61455abd8688c52ac6894b5a04ba050076117ea3 BUG: 1054199 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6811 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/geo-rep: more glusterd and cli fixes for geo-rep.Ajeet Jha2014-01-2716-478/+646
| | | | | | | | | | | | | | | | | | | | | | | | | | -> handle option validation cases in reset case. -> Creating valid conf path when glusterd restarts. -> Reading the gsyncd worker thread status and displaying it. -> Displaying status-detail per worker. -> Fetch checkpoint info in geo-rep status. -> use-tarssh value validation added. misc: misc geo-rep fixes based on cluster, logrotate etc.. -> cluster/dht: fix 'stime' getxattr getting overwritten. -> cluster/afr: return max of 'stime' values in subvol. -> geo-rep-logrotate: Sending SIGHUP to geo-rep auxiliary. -> cluster/dht: fix convoluted logic while aggregating. -> cluster/*: fix 'stime' min/max fetch logic. Change-Id: I811acea0bbd6194797a3e55d89295d1ea021ac85 BUG: 1036552 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6405 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6810 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gsyncd / geo-rep: geo-replication fixesAjeet Jha2014-01-276-269/+769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -> "threaded" hybrid crawl. -> Enabling metatadata synchronization. -> Handling EINVAL/ESTALE gracefully while syncing metadata. -> Improvments to changelog crawl code. -> Initial crawl changelog generation format. -> No gsyncd restart when checkpoint updated. -> Fix symlink handling in hybrid crawl. -> Slave's xtime key is 'stime'. -> tar+ssh as data synchronization. -> Instead of 'raise', just log in warning level for xtime missing cases. -> Fix for JSON object load failure -> Get new config value after config value reset. -> Skip already processed changelogs. -> Saving status of each individual worker thread. -> GFID fetch on slave for purges. -> Add tar ssh keys and config options. -> Fix nlink count when using backend. -> Include "data" operation for hardlink. -> Use changelog time prefix as slave's time. -> Process changelogs in parallel. Change-Id: I09fcbb2e2e418149a6d8435abd2ac6b2f015bb06 BUG: 1036539 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6404 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6809 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: more changelog fixes.Ajeet Jha2014-01-278-38/+212
| | | | | | | | | | | | | | | | -> log additional records. -> include FOP number for metadata. -> prevent crash if inode is not found in a fop. Change-Id: I9edd4b71819ebd68c6a2b4150ae279c471d129da BUG: 1036536 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6403 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/6808 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Treat ESTALE on nameless lookup as ENOENTPranith Kumar K2014-01-273-1/+42
| | | | | | | | | Change-Id: I635fc0fa955b33590f1c5b4dfec22d591ea8575c BUG: 1032894 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6593 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/gfid-access: fix lookup on .gfid/<parent>/bnameVenky Shankar2014-01-273-0/+58
| | | | | | | | | | | | | | | In gfid translator, lookup was not handling the case when the lookup is sent on .gfid/<parent>/bname. In this case, we flip with fake inode of the parent with the real inode in loc and send it downwards. Change-Id: I639ff1dce10ffc045da419e333d455e208b6a0f0 BUG: 1057881 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/6795 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6807
* features/gfid-access: populating inode during virtual_lookup_cbk.Ajeet Jha2014-01-272-5/+6
| | | | | | | | | | | | Setting appropriate ia_type and gfid for the inode, obtained during virtual_lookup_cbk of a directory by doing an "inode_link". Change-Id: I9582570c82e70ff5f1d4e441f9e9868ef82e9dc6 BUG: 1054199 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6806 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfid-access: fix the issue of entry creation with wrong gfidAmar Tumballi2014-01-271-6/+39
| | | | | | | | | | | | | | | | | | * dict_set was happening with a string instead of 'uuid_t' causing entry creations to happen with wrong gfid * revalidate was causing excessive ESTALE logs as lookup was happening on '.gfid/' path itself causing server to become clueless Change-Id: I3b76ce7fdec9c2ff785be21f506f859f489f80f0 BUG: 1054199 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/6520 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfid-access: do chown() after creating the new entries.Amar Tumballi2014-01-272-8/+73
| | | | | | | | | | | | | | changing the 'frame->root->uid' on the fly is not a good idea as posix-acl xlator on brick process would fail the op. Change-Id: I996b43e4ce6efb04f52949976339dad6eb89bede Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 847839 Reviewed-on: http://review.gluster.org/5833 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6801 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/compress: rename "compress" option to "network.compression"Niels de Vos2014-01-263-33/+38
| | | | | | | | | | | | | | | | Prevent mistaking the "compress" options for storage (at rest) compression. The cdc-xlator is implemented to support compressing of network traffic (READ and WRITE FOPs). URL: http://www.gluster.org/community/documentation/index.php/Features/On-Wire_Compression_+_Decompression Master-Change-Id: I9fedf4106dcb226d135ab92e4b533aff284881d7 Master-Reviewed-on: http://review.gluster.org/6765 Change-Id: Ib882af855b36df93fac46236c349c33dd4c3ced4 BUG: 1053670 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6773 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* cluster/afr: Treat FOOL condition as split-brain for entry self-healPranith Kumar K2014-01-251-0/+48
| | | | | | | | | | Change-Id: I44c942d5f949ea812d66184f868471522db17027 BUG: 1057846 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6789 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol: pass the size of the data in the WRITE on-wire FOPNiels de Vos2014-01-242-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Capturing GlusterFS traffic with tcpdump and displaying it in Wireshark shows that the size of all WRITEs are 0 bytes. It seems that the attribute is not used, and the size is calculated an other way. Even if the size attribute is not used (yet), it should be set correctly to prevent confusing while debugging network traffic with Wireshark or other tools. Note that the on-wire format is not being changed with this patch. The size is already part of the structure that is exchanged between the client and server. Change-Id: I4a1729a8e154a6fed4f8baa10ef3009d4df040cf Master-Change-Id: I9d67fe17bf203672116dea4948328e2af4004677 Master-Reviewed-on: http://review.gluster.org/6766 BUG: 1057264 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6768 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
* locks: set @lock->frame = NULL when lock is grantedAnand Avati2014-01-222-3/+5
| | | | | | | | | | | | This way disconnect cleanup code can differentiate which locks are granted vs blocked. Change-Id: I2a835c6865b6c804231d852953ea84eeccef35a3 BUG: 849630 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6762 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Create /var/run/gluster at install timeEmmanuel Dreyfus2014-01-221-0/+3
| | | | | | | | | | | This is a backport of I67c33984a797bc92c7035724695c5ef2bbdf5267 BUG: 764655 Change-Id: I9b202bd8ede20dbf2f55af2361492f5d242547b2 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6760 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Make sure gf_defrag_migrate_data is not optimizedPranith Kumar K2014-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Problem: Whenever there syncop_xxx() is used inside a synctask and gcc optimizes it when compiled with -O2 there is a problem where 'errno' would not work as expected. Fix: Until http://review.gluster.com/6475 is reviewed and merged we are making sure the function is not going to be optimized. Change-Id: I504c18c8a7789f0c776a56f0aa60db3618b21601 BUG: 1040356 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6481 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6745 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: Closed the logfile fd and initialize to NULL in glfs_finiPoornima G2014-01-203-3/+38
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6552 Currently if logfile is closed and other threads call gf_log after glfs_fini() is executed, it may lead to memory corruption. Adding gf_log_fini() which closes the logfile and initializes the logfile to NULL, thus any further logging happens to stderr. Also added gf_log_globals_fini() which should be filled in the future to release all the logging resources. BUG: 1030228 Change-Id: I90f7fb744b05bc6bd14c61fe143c0814896991e2 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6552 Reviewed-on: http://review.gluster.org/6731 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Addition of new child elements under brick in volume info xml.ndarshan2014-01-171-0/+10
| | | | | | | | | | | | | | | Added new child elements; name and hostUuid under brick in volume info xml where name and host uuid of the bricks are stored, This does not break backward compatibility as the old value under brick is not removed. Change-Id: I95b690d90fc5df40aa62bc76621afa18f7c6073b Signed-off-by: ndarshan <dnarayan@redhat.com> Reviewed-on: http://review.gluster.org/6604 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/6721 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* locks: various fixesAnand Avati2014-01-1410-627/+386
| | | | | | | | | | | | | | | | - implement ref/unref of entry locks (and fix bad pointer deref crashes) - code cleanup and deleted various data types - fix improper read/write lock conflict detection in entrylk - fix indefinite hang of blocked locks on disconnect - register locks in client_t synchronously, fix crashes in disconnect path Change-Id: Id273690c9111b8052139d1847060d1fb5a711924 BUG: 849630 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6695 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libgfapi : Fixing some NULL pointer dereferencing issues.Lalatendu Mohanty2014-01-141-4/+8
| | | | | | | | | | | | | | | | | | 1. Fixing dereferencing null pointer "gio" 2. Checking "frame" before calling STACK_DESTROY (frame->root) Backport of patch : http://review.gluster.org/#/c/6313/ Change-Id: If2ce8804a8e9f3f99f71a8c0d13900afb5635072 Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/6313 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/6688
* build: the main glusterfs package should not provide glusterfs-libsNiels de Vos2014-01-071-2/+3
| | | | | | | | | | | | | | | Because of this incorrect provides, there is no requirement to update glusterfs-libs. Most users will get a newer glusterfs-libs when updating anyway, but users that manually select RPMs for updating my skip the package, which will break their system. Change-Id: If7d73236c21de07ff7fbe32e4ba2e84910ffb98d BUG: 950083 Fedora-BUG: 1048489 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6643 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* protocol/server: Change log message severityv3.5beta1Vijay Bellur2014-01-031-2/+2
| | | | | | | | | | | Change-Id: Ia6aaf8a106c26fa7118c86fadb6805d2877bb6ee BUG: 849630 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6610 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/6615 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterd: Save/restore/sync rebalance dictKaushal M2014-01-031-0/+6
| | | | | | | | | | | | | | | | | | | | | A dictionary was added to store additional information of a rebalance process, like the bricks being removed in case of a rebalance started by remove-brick. This dictionary wasn't being stored/restored or synced during volume sync, leading to errors like a volume status command failing. These issues have been fixed in this patch. The rebalance dict is now stored/restored and also exported/imported during volume sync. Also, this makes sure that the rebalance dict is only create on remove-brick start. This adds a bricks decommissioned status to the information imported/exported during volume sync. BUG: 1040809 Change-Id: I46cee3e4e34a1f3266a20aac43368854594f01bc Signed-off-by: Kaushal M <kaushal@redhat.com> Backport-of: http://review.gluster.org/6492 Reviewed-on: http://review.gluster.org/6524 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Use linkat() instead of link() for portability sakeEmmanuel Dreyfus2014-01-022-2/+3
| | | | | | | | | | | | | | | | | | This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f POSIX does not says wether link(2) on symlink should link on symlink itself or on target. Linux use symlink, most other systems use target. Using linkat(2) allows the behavior to be specified, so that the behavior is portable. Also fix configure test for NetBSD linkat(2), which ceased to work. BUG: 764655 Change-Id: Ifcabda5e81b15cd80982bcfc05afda4c9e5370ef Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6612 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Use linkat() instead of link() for portability sakeEmmanuel Dreyfus2014-01-023-1/+26
| | | | | | | | | | | | | | | | | | This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f POSIX does not says wether link(2) on symlink should link on symlink itself or on target. Linux use symlink, most other systems use target. Using linkat(2) allows the behavior to be specified, so that the behavior is portable. Also fix configure test for NetBSD linkata(2), which ceased to work. BUG: 764655 Change-Id: I7cf9e62ea19c7eb356935c11b480cf637c83126b Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6594 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: Remove duplicate GET_STATE callPranith Kumar K2014-01-011-2/+0
| | | | | | | | | BUG: 952029 Change-Id: I4aa87ffe70f2b56182666981956d7d1d62048e2f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6580 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)Louis Zuckerman2014-01-013-9/+10
| | | | | | | | | | Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e BUG: 1047007 Signed-off-by: Louis Zuckerman <me@louiszuckerman.com> Reviewed-on: http://review.gluster.org/6611 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6621
* bd: Check for capabilities for creating thin lvM. Mohan Kumar2014-01-011-0/+7
| | | | | | | | | | | | Check capabitlies of the volume before trying to create thin LV. BUG: 1028672 Change-Id: Ie4e2281265e193458ccd16736960daf69d3e1b29 Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/6590 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* crypt: On calloc failure follow goto statementHarshavardhana2013-12-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | At -------------------------------------------- 1423 if (local->vec.iov_base == NULL) { -------------------------------------------- This condition being true leads to NULL pointer to be passed into `memcpy` later at ---------------------------------------------------- 1432 memcpy((char *)local->vec.iov_base + copied, ---------------------------------------------------- Avoid this by clean exit through a goto statement with in the conditional. Change-Id: I95260767f96107aa96191b18db10908ddda82ee6 BUG: 1030058 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6617 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Change errno to op_errnoVenkatesh Somyajulu2013-12-291-1/+1
| | | | | | | | | | | | Changed errno to op_errno Change-Id: I357987af352cf1d9abda4188d392f17d10b12aec BUG: 1037501 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6541 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: fix day in the %changelogHarshavardhana2013-12-271-2/+2
| | | | | | | | | | | This fixes `warnings` during build tests `rpm.t` Change-Id: I5609f1ab674ed0829e4d5ac049e4ca5d4f4b1a21 BUG: 1000019 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6585 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* test: Modified bug-1037501.t scriptVenkatesh Somyajulu2013-12-271-76/+109
| | | | | | | | | Change-Id: I6d49d8a66a6dc68619005e731969010b013cb834 BUG: 1037501 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6598 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: rebalance to ref volinfo before startingKrishnan Parthasarathi2013-12-232-5/+11
| | | | | | | | | | | Backport of http://review.gluster.org/6522 Change-Id: Ib316897dcbd0748bfb3bfcda186b9fe30c07f80f BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: make volinfo a refcnt'ed object.Krishnan Parthasarathi2013-12-236-6/+55
| | | | | | | | | | | | | | Backport of http://review.gluster.org/6521 Add glusterd_volinfo_remove(..) which removes @volinfo from the list of volumes in the cluster and performs an unref on @volinfo Change-Id: I5f546ca58f61bc334ab1bab4c51c4a21e1f66161 BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6569 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: ignore failure to stop a stopped service.Krishnan Parthasarathi2013-12-231-0/+12
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6525 kill(2) returns -1 with errno set to ESRCH when the pid of the process being killed doesn't exist. Failing glusterd_brick_stop on a stopped brick could result in volume-stop failing, in commit phase. This fix prevents that from happening. Change-Id: I00f46fa06e489a671efbb8e4119f545f8ccea329 BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6568 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fix stopping of stale rebalance processesKrishnan Parthasarathi2013-12-231-102/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6531 Trying to stop rebalance process via RPC using the GD_SYNCOP macro, could lead to glusterd crashing. In case of an implicit volume update, which happens when a peer comes back up, the stop function would be called in the epoll thread. This would lead to glusterd crashing as the epoll thread doesn't have synctasks for the GD_SYNCOP macro to make use of. Instead of using the RPC method, we now terminate the rebalance process by kill(). The rebalance process has been designed to be resistant to interruption, so this will not lead to any data corruption. Also, when checking for stale rebalance task, make sure that the old task-id is not null. Change-Id: I54dd93803954ee55316cc58b5877f38d1ebc40b9 BUG: 1044327 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6567 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc,glusterd: Use rpc_clnt notifyfn to cleanup mydataKrishnan Parthasarathi2013-12-237-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5512 rpc: - On a RPC_TRANSPORT_CLEANUP event, rpc_clnt_notify calls the registered notifyfn with a RPC_CLNT_DESTROY event. The notifyfn should properly cleanup the saved mydata on this event. - Break the reconnect chain when an rpc client is disabled. This will prevent new disconnect events which can lead to crashes. glusterd: - Added support for RPC_CLNT_DESTROY in glusterd_brick_rpc_notify - Use a common glusterd_rpc_clnt_unref() function throught glusterd in place of rpc_clnt_unref(). This function correctly gives up the big-lock before performing the unref. Change-Id: I93230441c5089039643fc9f5632477ef1b695348 BUG: 962619 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6566 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Save/restore/sync rebalance dictKrishnan Parthasarathi2013-12-233-77/+208
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6492 A dictionary was added to store additional information of a rebalance process, like the bricks being removed in case of a rebalance started by remove-brick. This dictionary wasn't being stored/restored or synced during volume sync, leading to errors like a volume status command failing. These issues have been fixed in this patch. The rebalance dict is now stored/restored and also exported/imported during volume sync. Also, this makes sure that the rebalance dict is only create on remove-brick start. This adds a bricks decommissioned status to the information imported/exported during volume sync. Change-Id: I56fed23dc2de80a96648055fe705e9c3ffd55227 BUG: 1040809 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6565 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Improve rebalance handling during volume syncKrishnan Parthasarathi2013-12-232-10/+200
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6334 Glusterd will now correctly copy existing rebalance information when a volinfo is updated during volume sync. If the existing rebalance information was stale, then any existing rebalance process will be termimnated. A new rebalance process will be started only if there is no existing rebalance process. The rebalance process will not be started if the existing rebalance session had completed, failed or been stopped. Change-Id: I68c5984267c188734da76770ba557662d4ea3ee0 BUG: 1036464 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6564 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* dht: Set status to FAILED when rebalance stops due to brick going downKrishnan Parthasarathi2013-12-233-5/+9
| | | | | | | | | | | Backport of http://review.gluster.org/6435 Change-Id: I98da41342127b1690d887a5bc025e4c9dd504894 BUG: 1038452 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6563 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Aggregate tasks status in 'volume status [tasks]'Krishnan Parthasarathi2013-12-235-22/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6230 Previously, glusterd used to just send back the local status of a task in a 'volume status [tasks]' command. As the rebalance operation is distributed and asynchronus, this meant that different peers could give different status values for a rebalance or remove-brick task. With this patch, all the peers will send back the tasks status as a part of the 'volume status' commit op, and the origin peer will aggregate these to arrive at a final status for the task. The aggregation is only done for rebalance or remove-brick tasks. The replace-brick task will have the same status on all the peers (see comment in glusterd_volume_status_aggregate_tasks_status() for more information) and need not be aggregated. The rebalance process has 5 states, NOT_STARTED - rebalance process has not been started on this node STARTED - rebalance process has been started and is still running STOPPED - rebalance process was stopped by a 'rebalance/remove-brick stop' command COMPLETED - rebalance process completed successfully FAILED - rebalance process failed to complete successfully The aggregation is done using the following precedence, STARTED > FAILED > STOPPED > COMPLETED > NOT_STARTED The new changes make the 'volume status tasks' command a distributed command as we need to get the task status from all peers. The following tests were performed, - Start a remove-brick task and do a status command on a peer which doesn't have the brick being removed. The remove-brick status was given correctly as 'in progress' and 'completed', instead of 'not started' - Start a rebalance task, run the status command. The status moved to 'completed' only after rebalance completed on all nodes. Also, change the CLI xml output code for rebalance status to use the same algorithm for status aggregation. Change-Id: Ifd4aff705aa51609a612d5a9194acc73e10a82c0 BUG: 1027094 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> http://review.gluster.org/6230 Reviewed-on: http://review.gluster.org/6562 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: More checks in rebalance status outputKrishnan Parthasarathi2013-12-233-5/+19
| | | | | | | | | Change-Id: Ibd2edc5608ae6d3370607bff1c626c8347c4deda BUG: 1031887 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6561 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: For entry self heal, mark all source bricksVenkatesh Somyajulu2013-12-192-13/+269
| | | | | | | | | | | | | | | | | | | | | | | Problem: Whenever a new brick is added into a replicate volume, all source bricks are not marked as source. Only one of them is marked as source. Here marked as source refers to adding extended attribute at the backend of a file corresponding to the newly added brick. As well as source bricks should point to the newly added brick so that heal can be triggered. Fix: All source bricks will now point to newly added bricks and heal can be triggered based on the extended attributes. Change-Id: Ia7cf118270fecc429bdecddbcb9201f23fedc7a1 BUG: 1037501 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6419 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gNFS: Client cache invalidation with bad fsidSantosh Kumar Pradhan2013-12-174-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Problem: Couple of issues are seen when NFS-ACL is turned ON. i.e. i) NFS directory access is too slow, impacting customer workflows with ACL ii)dbench fails with 100 directories. 2. Root cause: Frequent cache invalidation in the client side when ACL is turned ON with NFS because NFS server getacl() code returns the wrong fsid to the client. 3. This attr-cache invlaidation triggers the frequent LOOKUP ops for each file instead of relying on the readdir or readdirp data. As a result performance gets impacted. 4. In case of dbench workload, the problem is more severe. e.g. Client side rpcdebug output: =========================== Dec 16 10:16:53 santosh-3 kernel: NFS: nfs_update_inode(0:1b/12061953567282551806 ct=2 info=0x7e7f) Dec 16 10:16:53 santosh-3 kernel: NFS: nfs_fhget(0:1b/12061953567282551806 ct=2) Dec 16 10:16:53 santosh-3 kernel: <-- nfs_xdev_get_sb() = -116 [splat] Dec 16 10:16:53 santosh-3 kernel: nfs_do_submount: done Dec 16 10:16:53 santosh-3 kernel: <-- nfs_do_submount() = ffffffffffffff8c Dec 16 10:16:53 santosh-3 kernel: <-- nfs_follow_mountpoint() = ffffffffffffff8c Dec 16 10:16:53 santosh-3 kernel: NFS: dentry_delete(clients/client77, 20008) As per Jeff Layton, This occurs when the client detects that the fsid on a filehandle is different from its parent. At that point, it tries to do a new submount of the new filesystem onto the correct point. It means client got a superblock reference for the new fs and is now looking to set up the root of the mount. It calls nfs_get_root to do that, which basically takes the superblock and a filehandle and returns a dentry. The problem here is that the dentry->d_inode you're getting back looks wrong. It's not a directory as expected -- it's something else. So the client gives up and tosses back an ESTALE. Which clearly says that, In getacl() code while it does the stat() call to get the attrs, it forgets to populate the deviceid or fsid before going ahead and does getxattr(). FIX: 1. Fill the deviceid in iatt. 2. Do bit more clean up for the confusing part of the code. NB: Many many thanks to Niels de Vos and Jeff Layton for their help to debug the issue. Change-Id: I44d8d2fa3ec7fb33a67dfdd4bbe2c45cdf67db8c BUG: 1043737 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6526 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs: Free IP address string in gf_is_local_addr()Vijay Bellur2013-12-171-2/+5
| | | | | | | | | | | | Change-Id: Ib113de269134c907aa2f35459e2764c142b94477 BUG: 1032122 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6433 Tested-by: Lukáš Bezdička <lukas.bezdicka@gooddata.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6462 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* mount.glusterfs: Provide backward compatibility for "backup-volfile-servers"Harshavardhana2013-12-151-0/+22
| | | | | | | | | | | | | | | | | | In commit "b610f1be7cd71b8f3e51c224c8b6fe0e7366c8cf" we deprecated "backupvolfile-server" and provided a new option for specifying multiple backup servers. This resulted in existing `fstab` entries invalid and leading to mount failure. Provide backward compatibility to avoid this regression. Change-Id: Ic20671bbe2a0df36b6110ffa928396f808eb76e5 BUG: 1039643 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6485 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: Merge glusterfs.spec changes from FedoraKaleb S. KEITHLEY2013-12-152-127/+111
| | | | | | | | | | | | | | sync with FedoraSCM glusterfs.spec N.B. the %doc hack for clear_xattrs.sh doesn't work in the CentOS 5 mock builds of the rpm.t regression test, thus I'm leaving that out for now Change-Id: I3dce7ad2f850e7255b40b3fab0a2b0e44c724e83 BUG: 1039965 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6474 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* doc: Upgrade steps for quotaKrutika Dhananjay2013-12-111-0/+79
| | | | | | | | | Change-Id: I6701cba911665cfefa1984c0441701a3354635d6 BUG: 969461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6438 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Add upgrade scripts for quotaKrutika Dhananjay2013-12-112-0/+79
| | | | | | | | | Change-Id: Ic636517ecece069019d798b4e90323d71afc35aa BUG: 969461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6437 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs: Explicitly open /dev/stderr logfileBharata B Rao2013-12-111-3/+1
| | | | | | | | | | | | | | | | | | From: Bharata B Rao <bharata@linux.vnet.ibm.com> Currently if stderr is specified as logfile, /dev/stderr isn't opened but stderr is directly used. However libgfapi closes the logfile (and hence stderr) from glfs_fini() which results in stderr becoming unavailable for the application that links to libgfapi. Prevent this unexpected behaviour for the application by explicitly opening /dev/stderr like it is done for any other logfile. Change-Id: I76b754598a2acf40b91ff0461726c5918e278c84 BUG: 1038924 Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-on: http://review.gluster.org/6477 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: create rpc obj for rebalance only if absentv3.5.0qa3Krishnan Parthasarathi2013-12-053-38/+15
| | | | | | | | | Change-Id: Iff305023577ff92a8f43f24dafcf201f86805769 BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6424 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>