summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* features/bit-rot: check for both inmemory and ondisk stalenessRaghavendra Bhat2015-06-152-19/+138
| | | | | | | | | | | | | | | | | | | | | * Let bit-rot stub check both on disk ongoing version, signed version xattrs and the in memory flags in the inode and then decide whether the inode is stale or not. This information is used by one shot crawler in BitD to decide whether to trigger the sign for the object or skip it. NOTE: The above check should be done only for BitD. For scrubber its still the old way of comparing on disk ongoing version with signed version. * BitD's one shot crawler should not sign zero byte objects if they do not contain signature. (Means the object was just created and nothing was written to it). Change-Id: I6941aefc2981bf79a6aeb476e660f79908e165a8 BUG: 1224611 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/10947 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : Return corect return valueMeghana Madhusudhan2015-06-151-1/+3
| | | | | | | | | | | | | | | When any of the nodes in the trusted pool is not listed in the cluster node list, it receives a wrong return value. And commit fails on that host. Fixing the same. Change-Id: Ib208dae7497800cc48b7f7a77f5e708f6c11e676 BUG: 1231257 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11205 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha : Clean up cib state completelyMeghana Madhusudhan2015-06-151-23/+1
| | | | | | | | | | | | Clean up cluster state on all the machines during tear down. Change-Id: If9ca65b6ca8790ac97311f33359e28558e90c557 BUG: 1228415 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11231 Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* quota: don't log error when disk quota exceededvmallika2015-06-151-6/+9
| | | | | | | | | | | | | | When disk quota exceeded, quota enforcer logs alert message, so no need to log error message as this can fill up the log file Change-Id: Ia913f47bc0cedb7c0a9c611330ee5124d3bb6c9d BUG: 1229609 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11135 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* protocol/client : porting log messages to new frameworkManikandan Selvaganesh2015-06-159-505/+1346
| | | | | | | | | | Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb BUG: 1194640 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/10042 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/bitrot: tuanble object signing waiting time value for bitrotGaurav Kumar Garg2015-06-159-11/+201
| | | | | | | | | | | | | | Currently bitrot using 120 second waiting time for object to be signed after all fop's released. This signing waiting time value should be tunable. Command for changing the signing waiting time will be #gluster volume bitrot <VOLNAME> signing-time <waiting time value in second> Change-Id: I89f3121564c1bbd0825f60aae6147413a2fbd798 BUG: 1228680 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11105
* glusterd: subvol_count value for replicate volume should be calculate correctlyGaurav Kumar Garg2015-06-152-2/+54
| | | | | | | | | | | | | | | | | | glusterd was crashing while trying to remove bricks from replica set after shrinking nx3 replica to nx2 replica to nx1 replica. This is because volinfo->subvol_count is calculating value from old replica count value. Change-Id: I1084a71e29c9cfa1cd85bdb4e82b943b1dc44372 BUG: 1230121 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11165 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* handshake,locks,mountbroker,syncop/glusterd:New logging frameworkNandaja Varma2015-06-144-174/+318
| | | | | | | | | | Change-Id: If491a6945b7a0afa10165ff9f9874a244aece36f BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9864 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Porting messages to new logging framework.Nandaja Varma2015-06-149-44/+77
| | | | | | | | | | Change-Id: I56ced6fca0246c230cc389132c47a0f60472ed0c BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9836 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>
* tests: test cluster lock in heterogenious clusterAtin Mukherjee2015-06-141-0/+30
| | | | | | | | | | Change-Id: I421f50aeb89213d036b4b40f20a8e0d6bd78d60b BUG: 1229825 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11143 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>
* features/quota: port QUOTA messages to new logging frameworkSusant Palai2015-06-146-322/+594
| | | | | | | | | | | Change-Id: I5e3df8860ea35bce14a802391be9b22ad64f1ad4 BUG: 1075611 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/7574 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* upcall: prevent busy loop in reaper threadNiels de Vos2015-06-141-0/+5
| | | | | | | | | | | | | | | | http://review.gluster.org/10342 introduced a cleanup thread for expired client entries. When enabling the 'features.cache-invalidation' volume option, the brick process starts to run in a busy-loop. Obviously this is not intentional, and a process occupying 100% of the cycles on a CPU or core is not wanted. Change-Id: I453c612d72001f4d8bbecdd5ac07aaed75b43914 BUG: 1200267 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11198 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* handler, messages/glusterd: Porting to new logging frameworkNandaja Varma2015-06-132-216/+428
| | | | | | | | | | Change-Id: If67230445678dd895d69f18c9982c3f0fda62dbd BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9910 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>
* tools/glusterfind: print message for good casesMilind Changire2015-06-131-6/+16
| | | | | | | | | | | | Added messages for printing status of good or default cases for 'create', 'list', 'post' and 'delete' commands Change-Id: Ie983bff7f5a66f118de06c225166ff6bee870438 BUG: 1230017 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/11208 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Buffer overflow causing crash for glusterdSusant Palai2015-06-131-2/+2
| | | | | | | | | | | | | | | | | | | Problem: In GLUSTERD_GET_DEFRAG_PROCESS we are using PATH_MAX (4096) as the max size of the input for target path, but we have allocated NAME_MAX (255) size of buffer for the target. Now this crash is not seen with source install, but is seen with RPMS. The reason is _foritfy_fail. This check happens when _FORTIFY_SOURCE flag is enabled. This option tries to figure out possible overflow scenarios like the bug here and does crash the process. Change-Id: I26261be85936d2e94a526fdcaa8d3249f8af11c3 BUG: 1228093 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11090 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* gverify: Adding StrictHostKeyChecking=no for ssh verificationM S Vishwanath Bhat2015-06-121-1/+1
| | | | | | | | | | | | | | | | | | | Before actually checking the compatibility between master and slave, gverify checks if there is a passwordless ssh connection between master to slave. So if the entry of the slave was not present in 'known_hosts' file in master gverify used to complain that passwordless ssh has not been setup. This used to happen even if there is a passwordless ssh between master to slave. This patch fixes the above problem by using StrictHostKeyChecking=no while doing ssh to slave. Change-Id: I953c278e411ad6bc1dd1966ea6d895b05f890492 BUG: 1228696 Signed-off-by: M S Vishwanath Bhat <vbhat@redhat.com> Reviewed-on: http://review.gluster.org/11106 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* spec/geo-rep: Add rsync as dependency for georeplication rpmAravinda VK2015-06-121-0/+4
| | | | | | | | | | | | If rsync is not installed, Geo-rep will go faulty on started. Added rsync as dependency for georep rpm Change-Id: I49614957ccde47645185a65191d6d7baf1cc826c Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1231205 Reviewed-on: http://review.gluster.org/11201 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/ec: Prevent Null dereference in dht-renamePranith Kumar K2015-06-122-1/+20
| | | | | | | | | | Change-Id: I3059f3b577f550c92fb77c6b6b44defd0584cd2e BUG: 1230647 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11178 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tools/glusterfind: ignoring deleted filesMilind Changire2015-06-122-24/+43
| | | | | | | | | | | | | | | | | | | OSError and IOError exceptions were being thrown if files were deleted after session was created and a subsequent glusterfind pre was attmepted. glusterfind now detects this scenario and safely ignores these changes to the file-system. We also avoid recording deleted file paths into database in the case where gfid to path resolution cannot be performed for deleted files. Also, we now turn on volume option to capture delete paths. Change-Id: Iaf3883463f5e64643497bd77229ad80a9b2d5da5 BUG: 1228111 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/11194 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* features/changelog: Do htime setxattr without XATTR_REPLACE flagKotresh HR2015-06-122-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | HTIME_KEY marks the last changelog rolled over. The xattr is maintained on .glusterfs/changelog/htime/HTIME.TSTAMP file. On every rollover of the changelog file, the xattr is updated. It is being updated with XATTR_REPLACE flag as xattr gets created during changelog enable. But it is once found that the xattrs on the file is cleared and is not reproduced later on. This patch protects that case, if it happens by setting xattr without XATTR_REPLACE flag in failure case. The reason behind doing this in failure case is not to mask the actual cause of xattrs getting cleared. This provides the log message if the original issue still exists but the consequential effects are fixed. Also changed the log messages to depict the events happened during changelog enable. Change-Id: I699ed09a03667fd823d01d65c9c360fa7bc0e455 BUG: 1230015 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11150 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* glusterd/geo-rep : porting log messages to a new frameworkManikandan Selvaganesh2015-06-122-381/+763
| | | | | | | | | | | Change-Id: I1f1b99822c2b301d68eaf392af4bbb475151e2c5 BUG: 1194640 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/9952 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tools/glusterfind: Cleanup session dir after deleteAravinda VK2015-06-122-1/+20
| | | | | | | | | | | | | | | | | Sessions directories are created in /var/lib/glusterd/glusterfind/<SESSION>/<VOLUME>, only <VOLUME> dir is created since same session name can exists for two volumes. Now cleanup is added, <SESSION> dir will be removed if <SESSION> contains only one Volume. Change-Id: I236393659e63eb98342570e0255739f4adea4491 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1230111 Reviewed-on: http://review.gluster.org/11157 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: Validate use_meta_volume optionAravinda VK2015-06-121-0/+10
| | | | | | | | | | | Added validation for use_meta_volume option. Change-Id: I64cd9cb4bf383c7267638cab3837fd0cf89071c7 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1230090 Reviewed-on: http://review.gluster.org/11156 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com>
* tools/glusterfind: Cleanup glusterfind dir after a volume deleteAravinda VK2015-06-123-1/+71
| | | | | | | | | | | | | | | | | | If `glusterfind delete` command was not run before volume delete, stale session directories exists in /var/lib/glusterd/glusterfind directories. Also shows these sessions in `glusterfind list` When Volume is deleted, Post hook will be run which cleans up the stale session directories BUG: 1225465 Change-Id: I54c46c30313e92c1bb4cb07918ed2029b375462c Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/10944 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* sm/glusterd: Porting messages to new logging frameworkNandaja Varma2015-06-122-294/+524
| | | | | | | | | | | Change-Id: I391d1ac6a7b312461187c2e8c6f14d09a0238950 BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9927 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> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/qemu-block: Add comment about root_inode handlingPranith Kumar K2015-06-121-1/+2
| | | | | | | | | | | | | This is handling the comment on 3.7 backport http://review.gluster.com/11047 Change-Id: I253a8e0bfebde63f25c839efd55ed3cc30e6cd9b BUG: 1226276 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11076 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Poornima G <pgurusid@redhat.com>
* libglusterfs: Fixing insecure temp file coverity issueNandaja Varma2015-06-122-2/+30
| | | | | | | | | | | | | Coverity CID: 1124835 Change-Id: I7e87f2b3bad35cf8a9c64c8502de23662d9f677f BUG: 789278 Signed-off-by: Nandaja Varma <nvarma@redhat.com> Reviewed-on: http://review.gluster.org/9565 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Sakshi Bansal Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* common-ha: handle long node names and node names with '-' and '.' in themKaleb S. KEITHLEY2015-06-112-12/+8
| | | | | | | | | | | | | | | sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple and elegant solution for reading config params, but bash variable names do not allow '-' and '.' in them. Also fix incorrect path in shared volume mount Change-Id: I40140e5da0903221efd316de94dce40229263e15 BUG: 1225572 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11035 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* common-ha : Clean up persistent cib statemeghana2015-06-111-1/+2
| | | | | | | | | | | | | | | Pacemaker saves old configurations in the directory, "/var/lib/pacemaker/cib". It's good to clean up this directory during teardown so that old data doesn't show up the next time. Change-Id: If0f413ba2da599dd6672b51e60e1d35e674d576b BUG: 1228415 Signed-off-by: meghana <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11093 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tools/glusterfind: Fix GFID to Path conversion for dirAravinda VK2015-06-111-1/+1
| | | | | | | | | | | | | For Directories, GFID to Path conversion was fine, but wrong filter was used while updating to db. Change-Id: Id588adbb25ff5fd357f8cc2d5485bd2eb4a52b65 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1230127 Reviewed-on: http://review.gluster.org/11158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: ignore symlink and harlink errors in geo-repSaravanakumar Arumugam2015-06-111-11/+15
| | | | | | | | | | | | | | Ignore logging in case of symlink and hardlink creation errors, as these are safe errors with respect to geo-replication. Change-Id: I3b863fb03ae23dbea907e4dd9477ff85feecad70 BUG: 1225571 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/10957 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tools/glusterfind: verifying volume is onlineMilind Changire2015-06-111-0/+14
| | | | | | | | | | | | Volume needs to be online (Started) to perform meaningful operations i.e. for "create" and "pre". This is now verified. Change-Id: I207cf1f5e30be0f67a776b866349b59d70a13984 BUG: 1225564 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/10955 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* tier/dht: Fixing non atomic promotion/demotion w.r.t to frequency periodJoseph Fernandes2015-06-111-40/+59
| | | | | | | | | | | | | | | | | | | | | This fixes the ping-pong issue i.e files getting demoted immediately after promition, caused by off-sync promotion/demotion processes. The solution is do promotion/demotion refering to the system time. To have the fix working all the file serving nodes should have thier system time synchronized with each other either manually or using a NTP Server. NOTE: The ping-pong issue can re-appear even with this fix, if the admin have different promotion freq period and demotion freq period, but this would be under the control of the admin. Change-Id: I1b33a5881d0cac143662ddb48e5b7b653aeb1271 BUG: 1218717 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11110 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/tier: account for reordered layoutsDan Lambright2015-06-113-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a tiered volume the cold subvolume is always at a fixed position in the graph. DHT's layout array, on the other hand, may have the cold subvolume in either the first or second index, therefore code cannot make any assumptions. The fix searches the layout for the correct position dynamically rather than statically. The bug manifested itself in NFS, in which a newly attached subvolume had not received an existing directory. This case is a "stale entry" and marked as such in the layout for that directory. The code did not see this, because it looked at the wrong index in the layout array. The fix also adds the check for decomissioned bricks, and fixes a problem in detach tier related to starting the rebalance process: we never received the right defrag command and it did not get directed to the tier translator. Change-Id: I77cdf9fbb0a777640c98003188565a79be9d0b56 BUG: 1214289 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Joseph Fernandes <josferna@redhat.com> Reviewed-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11092
* utils/glusterd: Porting to new logging framworkNandaja Varma2015-06-113-324/+686
| | | | | | | | | | | | Change-Id: Iacb30eb675693bcdb3ef9de8e7f43892c5d79f6d BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9967 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* features/changelog: Avoid setattr fop logging during renameSaravanakumar Arumugam2015-06-114-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a file is renamed and the (renamed)file's Hashing falls into a different brick, DHT creates a special file(linkto file) in the brick(Hashed subvolume) and carries out setattr operation on that file. Currently, Changelog records this(setattr) operation in Hashed subvolume. glusterfind in turn records this operation as MODIFY operation. So, there is a NEW entry in Cached subvolume and MODIFY entry in Hashed subvolume for the same file. Solution: Avoid logging setattr operation carried out, by marking the operation as internal fop using xdata. In changelog translator, check whether setattr is set as internal fop and skip accordingly. Change-Id: I21b09afb5a638b88a4ccb822442216680b7b74fd BUG: 1230007 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/11137 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/marker : Pass along xdata to lower translatorSachin Pandit2015-06-111-1/+3
| | | | | | | | | | | | | | | The problem was in marker xlator, where during rename a NULL value is passed during STACK_WIND. Marker needs to pass the xdata un-modified to next translator if marker does not rely on that. Change-Id: I9e47e504fd241263987645abfed7ca13c0d54a80 BUG: 1228492 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/11089 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* build: improve detection of new OpenSSL featuresNiels de Vos2015-06-112-3/+4
| | | | | | | | | | | | | | | | | | Building on Mac OS X revealed that the current check for CRYPTO_THREADID_set_callback() availability in OpenSSL is not correct. There also does not seem to be a guarantee that TLSv1_2_method() is available when TLS1_2_VERSION is #define'd. Change-Id: I21508065fc181a1c74bee4fd6d23bb5bdf7cea7a BUG: 1222317 Original-author: Kaleb KEITHLEY <kkeithle@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11140 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared ↵Avra Sengupta2015-06-111-0/+33
| | | | | | | | | | | | | | | | | storage is available If shared storage is not accessible, create a flag in /var/run/gluster/ So that when /etc/cron.d/glusterfs_snap_cron_tasks is available again, the flag will tell us, to reload /etc/cron.d/glusterfs_snap_cron_tasks Change-Id: I41b19f57ff0b8f7e0b820eaf592b0fdedb0a5d86 BUG: 1218573 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11139 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/tier: glusterd crashed with detach-tier commit forceMohammed Rafi KC2015-06-113-2/+16
| | | | | | | | | | | | | | | glusterd crashed when doing "detach-tier commit force" on a non-tiered volume. Change-Id: I884771893bb80bec46ae8642c2cfd7e54ab116a6 BUG: 1228112 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11081 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Joseph Fernandes Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/ec: Wind unlock fops at all costPranith Kumar K2015-06-102-8/+45
| | | | | | | | | | | | | | | | | Problem: While files are being created if more than redundancy number of bricks go down, then unlock for these fops do not go to the bricks. This will lead to stale locks leading to hangs. Fix: Wind unlock fops at all costs. Change-Id: I50a87e8b4d6d2dde5bf7405b82e3aeecd95ad00e BUG: 1220348 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11152 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* logging: log "Stale filehandle" on the client as DebugNiels de Vos2015-06-101-2/+5
| | | | | | | | | | | | | | | | | | | There are valid use-cases where a "Stale filehandle" is expected. One of these is deleting a file through NFS-Ganesha. When the "filename" is deleted, Ganesha will stat the file-handle to update its attributes. The file-handle would still be valid in the case where there are hardlinks. There is no need to log "Stale filehandle" as Warning. It is perfectly fine to have this logged as Debug. Change-Id: Ib9006d95a5d1f7dd394bf5d5994ad70740ad4ab2 BUG: 1228731 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11107 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* snapshot/scheduler: Check if GCRON_TASKS exists beforeAvra Sengupta2015-06-101-0/+4
| | | | | | | | | | | | accessing it's mtime Change-Id: I873c83d21620527b20d7de428d11582c5499d1af BUG: 1228613 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11138 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* changetimerecorder : Porting to new logging frameworkMohamed Ashiq2015-06-107-126/+703
| | | | | | | | | Change-Id: I66e7ccc5e62482c3ecf0aab302568e6c9ecdc05d BUG: 1194640 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/10938 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes
* gfdb/libglusterfs : Porting to a new logging frameworkMohamed Ashiq2015-06-105-272/+352
| | | | | | | | | | Change-Id: I61874561fdf2c175d2b3eec0c85c25f12dc60552 BUG: 1194640 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/10819 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes
* glusterd: coverity fix for string overflowSakshi Bansal2015-06-103-5/+8
| | | | | | | | | | | | | | | | | Coverity CID: 1222523 Coverity CID: 1210990 Coverity CID: 1229877 Coverity CID: 1229876 Coverity CID: 1124855 Change-Id: Iba615724909216f923074cb4585940b919d02166 BUG: 789278 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/9555 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Dereference after null checkarao2015-06-101-5/+12
| | | | | | | | | | | | | | | | | | CID: 1124588 CID: 1124589 CID: 1124590 CID: 1124591 Either the null pointer is dereferenced before the null check or the check for null is unnecessary Change-Id: I87c6b09a4b89c33afd402866e6e249fefb1330f0 BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9636 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* tier/volume set: Validate volume set option for tierMohammed Rafi KC2015-06-103-10/+99
| | | | | | | | | | | | | | | | Volume set option related to tier volume can only be set for tier volume, also currently all volume set i for tier option accepts a non-negative integer. This patch validate both condition. Change-Id: I3611af048ff4ab193544058cace8db205ea92336 BUG: 1216960 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10751 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Joseph Fernandes
* snapshot/scheduler: Handle OSError in os. callbacksAvra Sengupta2015-06-091-8/+8
| | | | | | | | | | | | | Handle OSError and not IOError in os. callbacks. Change-Id: I2b5bfb629bacbd2d2e410d96034b4e2c11c4931e BUG: 1218060 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11087 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* libglusterfs: Enabling the fini() in cleanup_and_exit()anand2015-06-091-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem 1 : glusterd was crashing due to race between clean up thread and rpc event thread. Scenario: As we can observed, X thread is in the process of exiting the process. It has already run the exit handlers, which cleanup things that require cleaning up. This includes liburcu resources. By the time Y thread called rcu_bp_register(), the liburcu resources have been cleaned up. rcu_bp_register() tries to access these non-existent resources, which leads to the segmentation fault. Note1: Crash happen when the process is almost at the point of stopping(exiting), it doesn't have any serious impact to functionality apart from creating the core dump file and the log message. Fix .Do proper clean up before calling exit(). Note2: Other xlator have clean up issues,so only glusterd clean up function invoked. Note3: This patch also solve the selinux issue. Problem 2 : glusterd runs as rpm_script_t when it's executed from the rpm scriptlet,files created in this context are set as rpm_script_t, so glusterd unable to access these files when it runs in glusterd_t context. Fix: Fini clean up the files while glusterd exiting, so files are recreated by glusterd while starting with proper SElinux context label. Change-Id: Idcfd087f51c18a729bdf44a146f9d294e2fca5e2 BUG: 1209461 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/10894 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>