summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* protocol: coverity fixesBhumika Goyal2018-08-224-12/+6
| | | | | | | | Fixes CID: 1389388 1389320 1274113 1388881 1388623 1124801 1124795 Change-Id: Ia72abc0560c959b0298f42e25abdfc5523755569 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* Fix physical memory detection on NetBSDEmmanuel Dreyfus2018-08-211-1/+11
| | | | | | | | | | | | | | | | NetBSD has two sysctl for physical memory detection: hw.physmem and hw.physmem64. Only the later is 64-bit proof, and it has been available for years. That fix is important because it cause recent glusterfs to refuse mounting fileystems when there is too much RAM, with an error loading the quick-read xlator [quick-read.c:838:check_cache_size_ok] 0-gfs-quick-read: Cache size 134217728 is greater than the max size of 0 Change-Id: I957a1ff1d7018fe2f9d47384a28708e6cbdf710a Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Fixes: bz#1619475
* cluster/dht: coverity fixesN Balachandran2018-08-212-12/+14
| | | | | | | | | Fixes 1133997, 1370910, 1382387, 1382444, 1394635 Change-Id: Ie63ad47abd5519b9b9536da26b61ed4c9eaf2c75 updates: bz#789278 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* features/sdfs: Minor improvementsVijay Bellur2018-08-211-3/+3
| | | | | | | | | | | | | | | | Addresses: CID 1389688: Prevent op_errno from being -ve in sdfs_rename() CID 1389286: Check for retval from loc_copy() to avoid logically dead code and Initializes op_errno to ENOMEM in sdfs_link() Change-Id: I12e17a98faa5887da94a33ba9ca775e8e0fef359 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* Revert "performance/write-behind: better invalidation in readdirp"Raghavendra G2018-08-213-36/+24
| | | | | | | | | | | This reverts commit 4d3c62e71f3250f10aa0344085a5ec2d45458d5c. Traversing all children of a directory in wb_readdirp caused significant performance regression. Hence reverting this patch Change-Id: I6c3b6cee2dd2aca41d49fe55ecdc6262e7cc5f34 updates: bz#1512691 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: fix gcc warningsRavishankar N2018-08-213-187/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and also changed char array initialization to from {0,} to "". gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC) on Fedora 28. Sample warnings: glusterd-utils.c:7234:41: warning: ‘.hostname’ directive output may be truncated writing 9 bytes into a region of size between 1 and 1024 [-Wformat-truncation=] snprintf (key, sizeof (key), "%s.hostname", base_key); ^~~~~~~~~ glusterd-utils.c:7234:9: note: ‘snprintf’ output between 10 and 1033 bytes into a destination of size 1024 snprintf (key, sizeof (key), "%s.hostname", base_key); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glusterd-snapshot.c:3090:65: warning: ‘/’ directive output may be truncated writing 1 byte into a region of size between 0 and 4095 [-Wformat-truncation=] snprintf (snap_path, sizeof (snap_path) - 1, "%s/%s", ^ glusterd-snapshot.c:3090:17: note: ‘snprintf’ output between 2 and 4351 bytes into a destination of size 4095 snprintf (snap_path, sizeof (snap_path) - 1, "%s/%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ snap_mount_dir, snap_vol->snapshot->snapname); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glusterd-statedump.c:28:45: warning: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 144 [-Wformat-truncation=] snprintf (subkey, sizeof (subkey), "%s%d", key, index); ^~ ~~~ glusterd-statedump.c:28:9: note: ‘snprintf’ output between 2 and 4107 bytes into a destination of size 144 snprintf (subkey, sizeof (subkey), "%s%d", key, index); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ updates: bz#1193929 Change-Id: Ic721f27b28d1221c124b570e81c55528f5b7f3cd Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* xlators: protocol: Fix deferencing pointer after free coverity issuesBhumika Goyal2018-08-213-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer of type struct iobuf * is getting dereferenced after getting freed by iobuf_unref function. Therefore, move this function after all the dereferences of this pointer type. Also, it is useful coding standard to have iobuf_unref just after iobref_add. So, move iobref_add too. Occurences found using Coccinelle script: @@ identifier rsphdr_iobuf; expression E; identifier func; @@ *iobuf_unref(rsphdr_iobuf); ... *E = func(rsphdr_iobuf); Fixes CID: 1390517, 1390278, 1388666, 1356588, 1356587 at [1]. and also some more occurences which were found using the above script but not caught by Coverity. [1]. https://scan6.coverity.com/reports.htm#v42388/p10714/fileInstanceId=84384920&defectInstanceId=25600709&mergedDefectId=1388666 Change-Id: I579e9d12698f14e9e24bc926c6efef16bac5c06c updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* glusterfsd/src/glusterfsd.c : reduce size or re-scope message variableYaniv Kaul2018-08-211-2/+2
| | | | | | | | | | | | | The the error and/or message variable was either: - Reduced in size - from 2048 bytes to 64 bytes, for example. or - Changed in scope - defined in a smaller scope. Compile-tested only! Change-Id: I20b9fb3407a74ba96fcbc7f05fcab534ff562c09 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* jbr : fix coverity issue in jbr.cSunny Kumar2018-08-211-0/+2
| | | | | | | | This fixes CID 1395069. Change-Id: I0d2fa8fb04adf035c358841f43dea64f6aa8a1d8 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* gfapi: Use inode_forget in case of unlink/rename objectsKinglong Mee2018-08-213-3/+21
| | | | | | | | | After unlink/rename, the nonexistent inode should be remove from inode table, that's better than put to lru list. Change-Id: I5a40df188f3f42a2c864cfb4404b22b288fdcc12 fixes: bz#1612750 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* cli: Fix invalid access of option_str variableShyamsundarR2018-08-202-2/+10
| | | | | | | | | | | | | | | | | | In function cli_cmd_volume_statedump_options_parse if the wordcount of arguments is exactly 3, then option_str would remain NULL, and hence the function will generate a segmentation fault on the strstr check in its body. This can be triggered when we run the command, `gluster volume statedump <volname>` The fix is to check if option_str is non-NULL before use and also to pass in a duplicated empty string to the dict key "options" when this is NULL. Fixes: bz#1619423 Change-Id: Ic029ab60b64890d92c7a0876a638929495d3aa59 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* geo-rep : fix few coverity issues in procdiggy.cSunny Kumar2018-08-201-4/+6
| | | | | | | | | | | | | This patch fixes BAD_FREE at line number 75,105 and UNUSED_VALUE at line number 108. CID : 1274068 scan detail at [1]. [1] https://scan6.coverity.com/reports.htm#v42401/p10714/fileInstanceId=84384726&defectInstanceId=25600457&mergedDefectId=727233 Change-Id: I8dff42546204bf78c178c9dcaba534888c5354e9 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* write-behind: coverity fixesBhumika Goyal2018-08-201-3/+7
| | | | | | | | Fixes CID: 1124360 1291740 1370918 Change-Id: I008c7ade8f9809d040f42f6d3e9af70fff2f3dc6 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* cluster/afr: Fix bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.tkarthik-us2018-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Problem: In line #13 of the test case, it checks whether the file is present on first 2 bricks or not. If it is not present on even one of the bricks it will break the loop and checks for the dirty marking on the parent on the 3rd brick and checks for file not present on the 1st and 2nd bricks. The below scenario can happen in this case: - File gets created on 1st and 3rd bricks - In line #13 it sees file is not present on both 1st & 2nd bricks and breaks the loop - In line #51 test fails because the file will be present on the 1st brick - In line #53 test will fail because the file creation was not failed on quorum bricks and dirty marking will not be there on the parent on 3rd brick Fix: Don't break from the loop if file is present on either brick 1 or brick 2. Change-Id: I918068165e4b9124c1de86cfb373801b5b432bd9 fixes: bz#1612054 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* dict.c: ensure hash is done in the right place.Yaniv Kaul2018-08-201-29/+32
| | | | | | | | | The hash should be done outside of locks, whenever is possible. Change-Id: I4f8f7455702e0489a57105cf79668c7fca90e1c0 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* marker: FORWARD_NULL coverity fixShwetha Acharya2018-08-201-1/+1
| | | | | | | | | | | | | | Problem: Coverity false positive. Solution: Added a comment to ignore the false positive. CID: 1325591 BUG: 789278 Change-Id: I95037efd12c059efcfc04f3c4c13f60c530150b4 Signed-off-by: Shwetha Acharya <shwetha174@gmail.com>
* quota: coverity fixesBhumika Goyal2018-08-201-6/+3
| | | | | | | | Fixes CID: 1325638 1288766 1124357 Change-Id: I425f857d0d549da2dfaa6a6e6b8440cb14c21121 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* posix: Delete the entry if gfid link creation failskarthik-us2018-08-204-15/+43
| | | | | | | | | | | | | | | Problem: If the gfid link file inside .glusterfs is not present for a file, the operations which are dependent on the gfid will fail, complaining the link file does not exists inside .glusterfs. Fix: If the link file creation fails, fail the entry creation operation and delete the original file. Change-Id: Id767511de2da46b1f45aea45cb68b98d965ac96d fixes: bz#1612037 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* glusterd: fix some coverity issuesBhumika Goyal2018-08-209-17/+21
| | | | | | | | | | | Fixes CID: 1241481 1241482 1274079 1274118 1274121 1274131 1274198 1274214 1274220 1274224 1394663 1394641 382454 1382453 1382449 1288095 Link: https://scan6.coverity.com/reports.htm#v42388/p10714/fileInstanceId=84772667&defectInstanceId=25770661&mergedDefectId=744716 Change-Id: Idaf434186231c8b0fff4b27c57fa23636a89c8a7 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* geo-rep: Cleanup unwanted codeKotresh HR2018-08-202-22/+0
| | | | | | | | | | | Cleanup the Active/Passive logging code which is redundant. With new status infra implmented, this is redundant as every status switch is logged by status infra. fixes: bz#1619027 Change-Id: I0a6644cb998f3520e62a5189f21e4d66acc0e7c5 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* libglusterfs/src/common-utils.c: strncpy -> sprintf, remove dead code.Yaniv Kaul2018-08-202-124/+5
| | | | | | | | | | | | | | | | | | | | | | strncpy may not be very efficient for sort strings copied into a large buffer: If the length of src is less than n, strncpy() writes additional null bytes to dest to ensure that a total of n bytes are written. Instead, do a quick calc to see how much we really need and use snprintf() to copy as much. Also, move from CALLOC to MALLOC, as we are writing to this newly allocated memory right away and add terminating null. Lastly, removed some dead code. I did the same optimization as above to it, only to find out no one is using it. Compile-tested only! Change-Id: Ib91b9a73c3d74c511fd067446b1bf6c2e1802687 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* libguestfs/src/mem-pool.h: switch from calloc() to malloc()Yaniv Kaul2018-08-201-14/+5
| | | | | | | | | | | If we are going to overwrite that allocated memory, why bother zero'ing it? Only compile-tested! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I9c9d2d8d5ab3e706c747feb1920ecd417807f7fd
* gnfs: fix gcc warningsRavishankar N2018-08-203-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC) on Fedora 28. Sample warnings: 1) nfs3.c:292:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ nfs3.c:295:35: gfid); \ ~~~~ 2) nlm4.c:145:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ nlm4.c:148:35: gfid); \ ~~~~ acl3.c:128:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ acl3.c:131:35: gfid); \ ~~~~ updates: bz#1193929 Change-Id: I760b8176e48f1f4628a1a98afa54a7994bdf13e9 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* snapshot/handshake: store description after strdupMohammed Rafi KC2018-08-202-3/+62
| | | | | | | | | | | | | | | problem: During a handshake, when we import a friend data snap description variable was just referenced to dictionary value. Solution: snap description should have a separate memory allocated through gf_strdup Change-Id: I94da0c57919e1228919231d1563a001362b100b8 fixes: bz#1618004 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* snapshot:Fix wrong dictionary key in snapshot cleanup codeMohammed Rafi KC2018-08-201-1/+2
| | | | | | | | | | | Snapshot was designed to support multiple volume snapshot, hence the volume name keys are labelled with volume count. So the volume key should have a volume count appended with key Change-Id: I044d73fc86db0e662dc914669aecfb82a6476fb5 fixes: bz#1618004 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* mgmt/glusterd: Code cleanup in glusterd-volgen.cVijay Bellur2018-08-192-20/+19
| | | | | | | | | | | | | | | This patch does the following: 1. Addresses CID: 1124815,124816,1124833,1291724,1325535,1325536,1357858 - by adding some null checks - by handling return values from functions - by using an appropriate buffer length in strncpy 2. Cleans up some commented code Change-Id: I5a7079f34e3e460d5a6267734c3bc84bf4ad72f5 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* snapshot:Fail snapshot creation if an empty description providedMohammed Rafi KC2018-08-192-0/+11
| | | | | | | | | | Snapshot description should have a valid string. Creating a snapshot with null value will cause reading from info file to fail with a null exception Change-Id: I9f84154b8e3e7ffefa5438807b3bb9b4e0d964ca updates: bz#1618004 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* coverity: libglusterfs issuesAmar Tumballi2018-08-199-10/+33
| | | | | | | | | CID: 1391415, 1274122, 1274201, 1382408, 1382437, 1389436 1288798, 1288106, 1288110 updates: bz#789278 Change-Id: I48c7a50f22f5f4580310040c66463d9f7dd26204 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* dict.c: copy-pasta fix (dict -> data)Yaniv Kaul2018-08-191-2/+2
| | | | | | Change-Id: Ifda14a1cc01e0fa99ff20d710eccb43296e22955 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* performance/readdir-ahead: keep stats of cached dentries in sync with ↵Krutika Dhananjay2018-08-189-27/+721
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifications PROBLEM: Stats of dentries that are readdirp'd ahead can become stale due to fops like writes, truncate etc that modify the file pointed by dentries. When a readdir is finally wound at offset corresponding to these entries, the iatts that are returned to the application come from readdir-ahead's cache, which are stale by now. This problem gets further aggravated when caching translators/modules cache and continue to serve this stale information. FIX: * Store the iatt in context of the inode pointed by dentry. * Whenever the inode pointed by dentry undergoes modification, in cbk of modification fop, update the iatt stored in inode-ctx to reflect the modification. * When serving a readdirp response from application, update iatts of dentries with the iatts stored in the context of inodes pointed by these dentries. * Some fops don't have valid iatts in their responses. For eg., write response whose data is still cached in write-behind will have zeroed out stat. In this case keep only ia_type and ia_gfid and reset rest of the iatt members to zero. - fuse-bridge in this case just sends "entry" information back to kernel and attr is not sent. - gfapi sets entry->inode to NULL and zeroes out the entire stat * There is one tiny race between the entry creation and a readdirp on its parent dir, which could cause the inode-ctx setting and inode ctx reading to happen on two different inode objects. To prevent this, when entry->inode doesn't eqaul to linked_inode, - fuse-bridge is made to send only "entry" information without attributes - gfapi sets entry->inode to NULL and zeroes out the entire stat. Change-Id: Ia27ff49a61922e88c73a1547ad8aacc9968a69df BUG: 1390050 Updates: bz#1390050 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* debug/error-gen: Fix null deref and out of bounds read issuesVijay Bellur2018-08-181-2/+7
| | | | | | | | Addresses CID: 1124492, 1124700, 1124701 Change-Id: If9916df1b0a4e67ad74fe0f6ea6f2544598ddacb updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* block xlator: fix some coverity issuesBhumika Goyal2018-08-182-1/+6
| | | | | | | | Fixes CID: 1128916, 1128917, 1128919, 1192875 Change-Id: I5276b7db4a9650e70c335e25b9b4609a887233c0 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* tests: Add thin-arbiter.rc for writing tests for thin-arbiterPranith Kumar K2018-08-182-0/+472
| | | | | | fixes bz#1615789 Change-Id: I1f42e78fec5ddaf2a425dc4b82c9a20472aa146d Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* features/changelog: close htime_fd in fini()Vijay Bellur2018-08-171-0/+5
| | | | | | | | Addresses CID: 1325549 Change-Id: Ib041c7c288db6810b2e13a05a19ee894a47c9b05 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: Fix missing unlocksVijay Bellur2018-08-172-4/+19
| | | | | | | | Addresses CID 1210981 Change-Id: Icd325588ae0639e09d924fdde171931dedd06ca6 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* doc: Add details around xlator categoriesShyamsundarR2018-08-171-0/+178
| | | | | | Updates: bz#1193929 Change-Id: I6446bbdd8025f333a3e855032c0c7709bf4ae4cd Signed-off-by: ShyamsundarR <srangana@redhat.com>
* locks: FORWARD_NULL coverity fixShwetha Acharya2018-08-171-1/+3
| | | | | | | | | | | | | Problem: "dst" could be NULL. Solution: Added a condition check to avoid NULL pointer dereferencing. BUG: 789278 Change-Id: I13ccf3234eda50a197f5fdfaf35b247589302582 Signed-off-by: Shwetha Acharya <shwetha174@gmail.com>
* posix: FORWARD_NULL coverity fixShwetha Acharya2018-08-171-1/+1
| | | | | | | | | | | | Problem: filler could be null. Solution: Modified the condition check to avoid NULL pointer dereferencing. BUG: 789278 Change-Id: I0c3e29ede3c226295a9860ddcb3b432832c381dd Signed-off-by: Shwetha Acharya <shwetha174@gmail.com>
* nfs-server-mount : fix coverity issues in mount3.cSunny Kumar2018-08-171-5/+9
| | | | | | | | Fixes CID 1389033, 1388767, 1288782. Change-Id: I244f88b2ca8487f8926da45d886982558ad45c7a updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* meta : fix coverity in meta-helpers.cSunny Kumar2018-08-171-13/+13
| | | | | | | | | This fixes CID 1214627 and 1257625. updates: bz#789278 Change-Id: I6eb1ccf7b498948d1c41ff830e65437ef818cd55 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/acl: Fix a possible null dereferenceVijay Bellur2018-08-171-2/+3
| | | | | | | | Addresses CID 1370952 Change-Id: I1f157dbede32e74e38aed8a1a162e38107f2628d updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: coverity defects fix introduced by commit 1f3bfe7Atin Mukherjee2018-08-172-2/+2
| | | | | | | | | | | | | Commit 1f3bfe7 stripped down the total size of certain path related variables in glusterd_brickinfo_t which considered couple of new coverity defects. Fix the following: CID : 1394969 Destination buffer too small CID : 1394968 Out-of-bounds access Change-Id: Ibc30eac4680cc6c83bd89d248f1435cb6a3d1b75 updates: bz#789278 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* statedump : fix coverity issuesSunny Kumar2018-08-171-2/+2
| | | | | | | | | | | Comparing an array to null is not useful, the test will always evaluate as true. Fixes CID 1325566 and 1389371. updates: bz#789278 Change-Id: Id51f84cc62767a432de1d12851ae2669c1596a94 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* jbr : fix coverity issues in jbrSunny Kumar2018-08-171-0/+6
| | | | | | | | This patch fixes CID 1357875 and 1357869. Change-Id: Ief88523e5ad92a2c884ff1b85cd613992bba0dad updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: ignore importing volume which is undergoing a delete operationAtin Mukherjee2018-08-165-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem explanation: Assuming in a 3 nodes cluster, if N1 originates a delete operation and while N1's commit phase completes, either glusterd service of N2 or N3 gets disconnected from N1 (before completing the commit phase), N1 will attempt to end up importing the volume which is in-flight for a delete in other nodes as a fresh resulting into an incorrect configuration state. Fix: Mark a volume as stage deleted once a volume delete operation passes it's staging phase and reset this flag during unlock phase. Now during this intermediate phase if the same volume gets imported to other peers, it shouldn't considered to be recreated. An automated .t is quite tough to implement with the current infra. Test Case: 1. Keep creating and deleting volumes in a loop on a 3 node cluster 2. Simulate n/w failure between the peers (ifdown followed by ifup) 3. Check if output of 'gluster v list | wc -l' is same across all 3 nodes during 1 & 2. Change-Id: Ifdd5dc39699120258d7fdd42fe2deb9de25c6246 Fixes: bz#1605077 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* build: use standard PKG_CHECK_MODULES for libxml2 availabilityNiels de Vos2018-08-164-10/+7
| | | | | | | | | | | | | In case the development parts of libxml2 are not installed, it was required to re-run ./autogen.sh to cleanup the cached values for the check. This is not nice towards users. By using the standard PKG_CHECK_MODULES for libxml-2.0 the results of the check are not cached and will be probed again when running ./configure. Change-Id: I3c4586e5555a521be5d4fb61bdb873ae0317311a Fixes: bz#1599219 Reported-by: Sachidananda Urs <surs@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com>
* trash : fix coverity issues in trash.cSunny Kumar2018-08-161-3/+6
| | | | | | | | This patch fixes CID : 1382380 and 1382428. Change-Id: Ice3c8f5c2d97a0b541665bff744f32fbea9e294f updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* libglusterfs: FORWARD_NULL coverity fixSunil Kumar Acharya2018-08-162-1/+7
| | | | | | | | | | | Fixing FORWARD_NULL coverify errors in libglusterfs. CID: 1391407, 1391410 BUG: 789278 Change-Id: I3d20523005e4418759c8a72620edff7c977d2d00 updates: bz#789278 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* cluster/ec: FORWARD_NULL coverity fixSunil Kumar Acharya2018-08-162-1/+5
| | | | | | | | | | | Fixing FORWARD_NULL coverify errors with EC. CID: 1394650 BUG: 789278 Change-Id: I52c99dac3483ca31a86cd7e3a959d4010b195f32 updates: bz#789278 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* uss : fix coverity issuesSunny Kumar2018-08-161-2/+1
| | | | | | | | | | | | | | This patch fixes coverity issuse in snapview-server.c CID : 1274119, 1325525 Scan details at [1]. [1]. https://scan6.coverity.com/reports.htm#v42401/p10714/fileInstanceId=84476369&defectInstanceId=25631967&mergedDefectId=778645 Change-Id: I825f09eabf84a2262a079c1f920a673727c5792b updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>