summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* features/bitrot: do not remove the quarantine handle in forgetRaghavendra Bhat2016-03-071-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an object is marked as bad, then an entry is corresponding to the bad object is created in the .glusterfs/quarantine directory to help scrub status. The entry name is the gfid of the corrupted object. The quarantine handle is removed in below 2 cases. 1) When protocol/server revceives the -ve lookup on an entry whose inode is there in the inode table (it can happen when the corrupted object is deleted directly from the backend for recovery purpose) it sends a forget on the inode and bit-rot-stub removes the quarantine handle in upon getting the forget. refer to the below commit f853ed9c61bf65cb39f859470a8ffe8973818868: http://review.gluster.org/12743) 2) When bit-rot-stub itself realizes that lookup on a corrupted object has failed with ENOENT. But with step1, there is a problem when the bit-rot-stub receives forget due to lru limit exceeding in the inode table. In such cases, though the corrupted object is not deleted (either from the mount point or from the backend), the handle in the quarantine directory is removed and that object is not shown in the bad objects list in the scrub status command. So it is better to follow only 2nd step (i.e. bit-rot-stub removing the handle from the quarantine directory in -ve lookups). Also the handle has to be removed when a corrupted object is unlinked from the mount point itself. Change-Id: Ibc3bbaf4bc8a5f8986085e87b729ab912cbf8cf9 BUG: 1313131 Original author: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/13472 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> (cherry picked from commit 2102010edab355ac9882eea41a46edaca8b9d02c) Reviewed-on: http://review.gluster.org/13552 Tested-by: Venky Shankar <vshankar@redhat.com>
* geo-rep: Mask xtime and stime xattrsKotresh HR2016-03-071-0/+43
| | | | | | | | | | | | | | | | | | | | | | | Allow access to xtime and stime xattrs only to gsyncd client and mask them for the rest. This is to prevent afr from performing self healing on marker xtime and geo-rep stime xattr which is not expected as each of which gets updated them from backend brick and should not be healed. BUG: 1313623 Change-Id: I9b4b3ce30bbc09d300e6d5c6782e2446f2411c6f Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/13242 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/13572 Reviewed-by: Aravinda VK <avishwan@redhat.com>
* afr: do not set arbiter as a readable subvol in inode contextRavishankar N2016-03-072-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If afr_lookup_done() or afr_read_subvol_select_by_policy() chooses the arbiter brick to serve the stat() data, file size will be reported as zero from the mount, despite other data bricks being available. This can break programs like tar which use the stat info to decide how much to read. Fix: In the inode-context, mark arbiter as a non-readable subvol for both data and metadata. It it to be noted that by making this fix, we are *not* going to serve metadata FOPS anymore from the arbiter brick despite the brick storing the metadata. It makes sense to do this because the ever increasing over-loaded FOPs (getxattr returning stat data etc.) and compound FOPS in gluster will otherwise make it difficult to add checks in code to handle corner cases. >Change-Id: Ic60b25d77fd05e0897481b7fcb3716d4f2101001 >BUG: 1310171 >Signed-off-by: Ravishankar N <ravishankar@redhat.com> >Reported-by: Mat Clayton <mat@mixcloud.com> >Reviewed-on: http://review.gluster.org/13539 >Reviewed-by: Anuradha Talur <atalur@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1313921 Change-Id: I07fc08d633ca2af48f7354454bc2ab75cedb850a Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13609 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* Revert "afr: do not set arbiter as a readable subvol in inode context"Pranith Kumar Karampuri2016-03-051-6/+3
| | | | | | | | | | | | This reverts commit ad0b1253b9d74797620c493184818685c024f17c. Change-Id: Id43ba8e75d58325f897e15e3f64f9389236adb40 Reviewed-on: http://review.gluster.org/13608 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* afr: do not set arbiter as a readable subvol in inode contextRavishankar N2016-03-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport-of: http://review.gluster.org/#/c/13539/ Problem: If afr_lookup_done() or afr_read_subvol_select_by_policy() chooses the arbiter brick to serve the stat() data, file size will be reported as zero from the mount, despite other data bricks being available. This can break programs like tar which use the stat info to decide how much to read. Fix: In the inode-context, mark arbiter as a non-readable subvol for both data and metadata. It it to be noted that by making this fix, we are *not* going to serve metadata FOPS anymore from the arbiter brick despite the brick storing the metadata. It makes sense to do this because the ever increasing over-loaded FOPs (getxattr returning stat data etc.) and compound FOPS in gluster will otherwise make it difficult to add checks in code to handle corner cases. Change-Id: Ic60b25d77fd05e0897481b7fcb3716d4f2101001 BUG: 1313921 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reported-by: Mat Clayton <mat@mixcloud.com> Reviewed-on: http://review.gluster.org/13582 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* quota: reduce latency for testcase ./tests/bugs/quota/bug-1293601.tvmallika2016-03-041-5/+3
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13556/ Currently test-case './tests/bugs/quota/bug-1293601.t' runs quota enable and disable 10 times each, which take a long time. This is not a real use-case and it is enough to test once. > Change-Id: Ic282d66438f89721f3c392929047ba42b85ad155 > BUG: 1313300 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ie8540ab7a4eba66ec0eafae5129e5d188d1a0500 BUG: 1313302 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13557 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* mgmt/glusterd: Show features.shard option in volume-set-help outputKrutika Dhananjay2016-03-031-0/+14
| | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/13565/ Change-Id: Ief6f62c65dd8cc736edc785ac06af6ee7309862c BUG: 1313339 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13566 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: Fix spurious failure of ec-read-policy.tXavier Hernandez2016-03-021-1/+1
| | | | | | | | | | | | | | | | >Change-Id: I5297e24dd10cbfbcd671fe630ae3e960b9daa8f8 >Reviewed-on: http://review.gluster.org/13575 >BUG: 1313775 >Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Change-Id: Ib0ea04a9040400ea67c141592e2ba34e40272408 BUG: 1313776 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/13576 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/ec: Fix invalid config check for directoriesXavier Hernandez2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The trusted.ec.config xattr is not defined for directories. However sometimes it could be requested because the inode type of a directory can temporarily be IA_INVAL. Requesting such xattr using the xattrop fop when it doesn't exist, returns a config value full of 0's, which is invalid and caused some fops to fail. This patch filters out this case by ignoring config xattr == 0. > Change-Id: Ied51c35b313ea8c3eeae27812f9bae61d3808e92 > Reviewed-on: http://review.gluster.org/13446 > BUG: 1293223 > Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Change-Id: I42d06119d8f51c34ddb910380af7acd670f6244e BUG: 1293224 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/13447 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ashish Pandey <aspandey@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cli: output of rebalance to show run time in proper formatSakshi2016-02-293-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10544/ Modified tests to parse the new rebalance time format. > Change-Id: I775f13c8046dd2aeb9d4b86a737dcebb396778b4 > BUG: 1223625 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/10544 > Smoke: Gluster Build System <jenkins@build.gluster.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: N Balachandran <nbalacha@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1311822 Change-Id: I3c8106f7a1309f154861ce1b3efa202fa6c47c57 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13514 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Raghavendra Talur <rtalur@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tests: remove-brick commit getting executed before migration has completedSakshi Bansal2016-02-281-0/+2
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13191 Remove brick commit will fail when it is executed while rebalance is in progress. Hence added a rebalance timeout check before remove-brick commit to enusre that rebalance has completed. Change-Id: I5f388b88a68d19f8d2f52937afb771b95be6deaf BUG: 1311572 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13511 Tested-by: Raghavendra Talur <rtalur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* locks: Handle negative values for flock->l_lenSoumya Koduri2016-02-282-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As per 'man 3 fcntl', "If l_len is positive, the area affected shall start at l_start and end at l_start+l_len−1. If l_len is negative, the area affected shall start at l_start+l_len and end at l_start−1. Locks may start and extend beyond the current end of a file, but shall not extend before the beginning of the file." Currently we return EINVAL if l_len is found to be negative. Fixed the same as mentioned in the man page. This is backport of the below patch - http://review.gluster.org/11613 Change-Id: I493ce202c543185fc4ae7266d1aaf9d7e2a66991 BUG: 1312200 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11613 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/13526 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd/rebalance: initialize defrag variable after glusterd restartMohammed Rafi KC2016-02-243-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | During reblance restart after glusterd restarted, we are not connecting to rebalance process from glusterd, because the defrag variable in volinfo will be null. Initializing the variable will connect the rpc Back port of> >Change-Id: Id820cad6a3634a9fc976427fbe1c45844d3d4b9b >BUG: 1303028 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13319 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> (cherry picked from commit a67331f3f79e827ffa4f7a547f6898e12407bbf9) Change-Id: Ieec82a798da937002e09fb9325c93678a5eefca8 BUG: 1311041 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13494 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: volume should not start when server quorum is not metGaurav Kumar Garg2016-02-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/13442 Currently when server quorum is not met then upon executing # gluster volume start [force] command its starting the volume. With this patch if server side quorum is not met then it will prevent starting of the volume. >> Change-Id: I39734b2dcf8e90c3c68bf2762d8350aecc82cc38 >> BUG: 1308402 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/13442 >> Smoke: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Iacb65823fb091e4ac250e436d1cb10103bc24921 BUG: 1310632 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13484 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tests: include unistd.h for fdatasyncRaghavendra Talur2016-02-221-0/+1
| | | | | | | | | | | | | | Backport of http://review.gluster.org/13128 gcc throws a warning if unistd.h is not included. Change-Id: Ib08f15117a5e003b204828dbc3954442d80a1964 BUG: 1257012 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13475 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tier:unlink during migrationMohammed Rafi KC2016-02-221-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files deleted during promotion were not deleting as the files are moving from hashed to non-hashed On deleting a file that is undergoing promotion, the unlink call is not sent to the dst file as the hashed subvol == cached subvol. This causes the file to reappear once the migration is complete. This patch also fixes a problem with stale linkfile deleting. Backport of> >Change-Id: I4b02a498218c9d8eeaa4556fa4219e91e7fa71e5 >BUG: 1282390 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/12829 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit b5de382afa8c5777e455c7a376fc4f1f01d782d1) Change-Id: I951adb4d929926bcd646dd7574f7a2d41d57479d BUG: 1282388 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12991 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: check if all bricks are started before performing remove-brickSakshi2016-02-223-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | Due to low severity the patch was not immediately backported. > Backport of http://review.gluster.org/#/c/10954/ > Change-Id: Ie9e24e037b7a39b239a7badb983504963d664324 > BUG: 1225716 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/10954 > 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> Change-Id: Ifc6088949f3891c28c4941b3377c72b68b68cb29 BUG: 1302528 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13306 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: validate function for replica volume optionsSakshi2016-02-211-0/+67
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12215/ > Change-Id: I5b4a28db101e9f7e07f4b388c7a2594051c9e8dd > BUG: 1265479 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/12215 > 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> BUG: 1308414 Change-Id: I1ce7c326da82749f8fd13dff11b803c607c853bb Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13444 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* cluster/tier: allow db queries to be interruptableDan Lambright2016-02-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A query to the database may take a long time if the database has many entries. The tier daemon also sends IPC calls to the bricks which can run slowly, espcially in RHEL6. While it is possible to track down each such instance, the snapshot feature should not be affected by database operations. It requires no migration be underway. Therefore it is okay to pause tiering at any time except when DHT is moving a file. This fix implements this strategy by monitoring when control passes to DHT to migrate a file using the GF_XATTR_FILE_MIGRATE_KEY trigger. If it is not, the pause operation is successful. > Change-Id: I21f168b1bd424077ad5f38cf82f794060a1fabf6 > BUG: 1287842 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/13104 > Reviewed-by: Joseph Fernandes > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I667e0af24eaa66afefa860c4d73b324e4f39b997 BUG: 1288352 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/13199 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cli/ afr: op_ret for index heal launchRavishankar N2016-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13303/ Problem: If index heal is launched when some of the bricks are down, glustershd of that node sends a -1 op_ret to glusterd which eventually propagates it to the CLI. Also, glusterd sometimes sends an err_str and sometimes not (depending on the failure happening in the brick-op phase or commit-op phase). So the message that gets displayed varies in each case: "Launching heal operation to perform index self heal on volume testvol has been unsuccessful" (OR) "Commit failed on <host>. Please check log file for details." Fix: 1. Modify afr_xl_op() to return -1 even if index healing of atleast one brick fails. 2. Ignore glusterd's error string in gf_cli_heal_volume_cbk and print a more meaningful message. The patch also fixes a bug in glusterfs_handle_translator_op() where if we encounter an error in notify of one xlator, we break out of the loop instead of sending the notify to other xlators. Change-Id: I957f6c4b4d0a45453ffd5488e425cab5a3e0acca BUG: 1306922 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13435 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* performance/write-behind: retry "failed syncs to backend"Raghavendra G2016-02-163-35/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When sync fails, the cached-write is still preserved unless there is a flush/fsync waiting on it. 2. When a sync fails and there is a flush/fsync waiting on the cached-write, the cache is thrown away and no further retries will be made. In other words flush/fsync act as barriers for all the previous writes. The behaviour of fsync acting as a barrier is controlled by an option (see below for details). All previous writes are either successfully synced to backend or forgotten in case of an error. Without such barrier fop (especially flush which is issued prior to a close), we end up retrying for ever even after fd is closed. 3. If a fop is waiting on cached-write and syncing to backend fails, the waiting fop is failed. 4. sync failures when no fop is waiting are ignored and are not propagated to application. For eg., a. first attempt of sync of a cached-write w1 fails b. second attempt of sync of w1 succeeds If there are no fops dependent on w1 are issued b/w a and b, application won't know about failure encountered in a. 5. The effect of repeated sync failures is that, there will be no cache for future writes and they cannot be written behind. fsync as a barrier and resync of cached writes post fsync failure: ================================================================== Whether to keep retrying failed syncs post fsync is controlled by an option "resync-failed-syncs-after-fsync". By default, this option is set to "off". If sync of "cached-writes issued before fsync" (to backend) fails, this option configures whether to retry syncing them after fsync or forget them. If set to on, cached-writes are retried till a "flush" fop (or a successful sync) on sync failures. fsync itself is failed irrespective of the value of this option, when there is a sync failure of any cached-writes issued before fsync. Change-Id: I6097c0257bfb9ee5b1f616fbe6a0576ae9af369a Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1293534 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13057 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* uss: validate USS option features.snapshot-directoryvmallika2016-02-152-34/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/9209 USS option features.snapshot-directory contains only 'alphanum, -, _, .' starts with dot (.) value cannot exceed 255 characters and throws error for any other argument. > Change-Id: Iad64635206ddf5599351020d99aafb3dd9d17bc1 > BUG: 1168819 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/9209 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Avra Sengupta <asengupt@redhat.com> > Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Change-Id: I1b85d6851a223b51714c0498b457c41db99f5f58 BUG: 1305868 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13409 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* heal: Remove sleep()Pranith Kumar K2016-02-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I wrote this program from a sample gfapi program which had sleep. I am not sure why this sleep was needed. So removing it now. Changed tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t to execute count_sh_entries every second, instead of comparing same value over and over. >Change-Id: I7b89d6cab3e50bb7bf4d40a6064f2d8734155bea >BUG: 1306199 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13421 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit 320779d53ae013147d5e2556d2946c73e45734ab) Change-Id: Ia98bb4b35b0e778d777705a03b2415f2093863f7 BUG: 1306738 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13431 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* features/shard: Implement zerofill FOPKrutika Dhananjay2016-02-102-0/+109
| | | | | | | | | | | | | | Backport of: http://review.gluster.org/13234 Change-Id: I5ef61285dbe3ff218e50b8a272c88227c30c35c6 BUG: 1299712 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13287 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* cluster/ec: Automate heal for replace brickAshish Pandey2016-02-102-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After a replace brick command, newly added brick does not contain data which existed on old brick. Solution: Do getxattr after initialization of all the bricks. This will trigger heal for brick root as soon as it finds the version mismatch on newly added brick. Removing tests from ec-new-entry.t which were required to simulate automation of heal after replace brick. master - http://review.gluster.org/#/c/13353/ Change-Id: I08e3dfa565374097f6c08856325ea77727437e11 BUG: 1305755 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/13353 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/13403 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Xavier Hernandez <xhernandez@datalab.es>
* tests : Modifying crypt xlators unit testsJiffin Tony Thottan2016-02-092-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13240/ The "encryption.master-key" should be set before enabling crypt xlators. Otherwise glusterfs client process(like gluster-NFS) will crash due to the failure in intialising crypt xlator. You can see the following messages in client log file [2016-01-14 08:13:15.740835] E [crypt.c:4298:master_set_master_vol_key] 0-test1-crypt: FATAL: missing master key [2016-01-14 08:13:15.740859] E [MSGID: 101019] [xlator.c:429lator_init] 0-test1-crypt: Initialization of volume 'test1-crypt' failed, review your volfile again [2016-01-14 08:13:15.740890] E [MSGID: 101066] [graph.c:324:glusterfs_graph_init] 0-test1-crypt: initializing translator failed [2016-01-14 08:13:15.740904] E [MSGID: 101176] [graph.c:670:glusterfs_graph_activate] 0-graph: init failed [2016-01-14 08:13:15.741676] W [glusterfsd.c:1231:cleanup_and_exit] (-->/usr/sbin/glusterfs(mgmt_getspec_cbk+0x307) [0x40d287] -->/usr/sbin/glusterfs(glusterfs_process_volfp+0x117) [0x4086c7] -->/usr/sbin/glusterfs(cleanup_and_exit+0x4d) [0x407e1d] ) 0-: received signum (0), shutting down Upstream reference ------------------- >Change-Id: I124deda505d128eacb15ca20fbdcd1593cb8eba3 >BUG: 1298520 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13240 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >(cherry picked from commit ca4d4a26a553bac9c627bc6e6d6c9fa1f9435297) Change-Id: I8073765b02cd4bebc202fbae5ef7558df25ea664 BUG: 1303033 Reviewed-on: http://review.gluster.org/13320 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* Revert "glusterd/afr: store afr pending xattrs as a volume option"Pranith Kumar Karampuri2016-02-082-2/+0
| | | | | | | | | | | | This reverts commit 486b07dfc33782d27e3458659cdd6090f496ad35. Change-Id: I2da12ef77fb01c52cae3c3b5547398b6a4d7d17e BUG: 1293536 Signed-off-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13339 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* cluster/afr: Fix heal-info slow response while IO is in progressKrutika Dhananjay2016-02-041-0/+43
| | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/13326/ Now heal-info does an open() on the file being examined so that the client at some point sees open-fd count being > 1 and releases the eager-lock so that heal-info doesn't remain blocked forever until IO completes. Change-Id: I7d4a8aa4de459216408b666894ee7bb42e406547 BUG: 1303899 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13348 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests: Fix spurious failure in bug-1221481-allow-fops-on-dir-split-brain.tKrutika Dhananjay2016-02-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/13172/ Occasionally, when ls is executed, prior to READDIRP, a STAT is wound on the operand directory. And AFR fails STAT with EIO if it is in metadata split-brain which "dir" is in the test case in question. As a result, ls also fails with EIO, causing test 20 to return negative exit status. The fix is in the test script where the parts that cause the dir to go into metadata split-brain have been removed. Now "dir" will only have entry split-brain. Change-Id: Icf3998ad6f8735c283171e22445406a2eaaaa23f BUG: 1296400 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13190 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Fix data loss due to race between sh and ongoing write.Krutika Dhananjay2016-01-281-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/13001/ Problem: When IO is happening on a file and a brick goes down comes back up during this time, protocol/client translator attempts reopening of the fd on the gfid handle of the file. But if another client renames this file while a brick was down && writes were in progress on it, once this brick is back up, there can be a race between reopening of the fd and entry self-heal replaying the effect of the rename() on the sink brick. If the reopening of the fd happens first, the application's writes continue to go into the data blocks associated with the gfid. Now entry-self-heal deletes 'src' and creates 'dst' file on the sink, marking dst as a 'newentry'. Data self-heal is also completed on 'dst' as a result and self-heal terminates. If at this point the application is still writing to this fd, all writes on the file after self-heal would go into the data blocks associated with this fd, which would be lost once the fd is closed. The result - the 'dst' file on the source and sink are not the same and there is no pending heal on the file, leading to silent corruption on the sink. Fix: Leverage http://review.gluster.org/#/c/12816/ to ensure the gfid handle path gets saved in .glusterfs/unlink until the fd is closed on the file. During this time, when self-heal sends mknod() with gfid of the file, do the following: link() the gfid handle under .glusterfs/unlink to the new path to be created in mknod() and rename() the gfid handle to go back under .glusterfs/ab/cd/. Change-Id: I5dc49c127ef0a1bf3cf4ce1b24610b1527f84d6f BUG: 1293265 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13036 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests/quota : fix failing test on auxiliary mount pointManikandan Selvaganesh2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In test file tests/bugs/quota/bug-1049323.t, test "EXPECT "0" get_aux" fails in Fedora. In get_aux function we grep for "/var/run/gluster/<volname>" to check if auxiliary mount point is created and we return 0 on success else we return 1. In fedora, auxiliary mount point is created on "/run/gluster/<volname>". So it fails on Fedora. The patch fixes it by just grepping for "/run/gluster/<volname>". Backport of http://review.gluster.org/#/c/13228/ > Change-Id: Icb59395df4a98109eaa8199cbdbdedcd1cbef27a > BUG: 1297740 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/13228 > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Icb59395df4a98109eaa8199cbdbdedcd1cbef27a BUG: 1300600 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/13273 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/bitrot: Fail node-uuid getxattr if file is marked badKotresh HR2016-01-272-0/+75
| | | | | | | | | | | | | | | | | | | | | If xattr is node-uuid and the inode is marked bad, fail getxattr and fgetxattr with EIO. Returning EIO would result in AFR to choose correct node-uuid coresponding to the subvolume where the good copy of the file resides. BUG: 1296795 Change-Id: I3f8dc807794f9a82867807e7c4c73ded6c64fd8a Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/13116 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/13194 Tested-by: Venky Shankar <vshankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* features/bitrot: add check for corrupted object in f{stat}Venky Shankar2016-01-262-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13120 Check for corrupted objects is done bt bitrot stub component for data operations and such fops are denied processing by returning EIO. These checks were not done for operations such as get/set extended attribute, stat and the likes - IOW, stub only blocked pure data operations. However, its necessary to have these checks for certain other fops, most importantly stat (and fstat). This is due to the fact that clients could possibly get stale stat information (such as size, {a,c,m}time) resulting in incorrect operation of the application that rely on these fields. Note that, the data that replication would take care of fetching good (and correct) data, but the staleness of stat information could lead to data inconsistencies (e.g., rebalance, tier). Change-Id: I5a22780373b182a13f8d2c4ca6b7d9aa0ffbfca3 BUG: 1297213 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/13276 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* storage/posix: Implement .unlink directoryAshish Pandey2016-01-252-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For EC volume, If a file descriptor is open and file has been unlinked, any further write on that fd will fail. When a write request comes, EC internally reads some blocks using anonymous fd. This read will fail as the file has already been unlinked. Solution: To solve this issue, we are using .unlink directory to keep track of unlinked file. If a file is to be unlinked while its fd is open, move this to .unlink directory and unlink it from .glusterfs and real path. Once all the fd will be closed, remove this entry form .unlink directory. master - http://review.gluster.org/#/c/12816/ Change-Id: I8344edb0d340bdb883dc46458c16edbc336916b9 BUG: 1291557 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/12968 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* tests: Fix sparse-file-self-heal.tRavishankar N2016-01-251-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/13233 Psuedo Problem: https://build.gluster.org/job/rackspace-regression-2GB-triggered/16682/consoleFull The 'zeroedfile' disk usage comparision which is failing in this .t file fails so only on XFS. The test passes when the backend is on a s̶a̶n̶e̶r̶ different filesystem like EXT4 or BTRFS. This is due to the speculative preallocation in XFS which can reserve different disk space on different XFS mounts for the same version and same file operation. See BZ 1277992 for an example of XFS behaviour. Fix: Don't compare the disk usage of the file on the bricks of the replica: instead, check that the disk space consumed is atleast equal to the size of the file. Also remove sparse-file-self-heal.t from is_bad_test() Change-Id: If43f59549136ebf91f17ff9d958954b3587afe56 BUG: 1300210 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13265 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Implement fallocate FOPKrutika Dhananjay2016-01-211-0/+47
| | | | | | | | | | | | | | | Backport of: http://review.gluster.org/13196 Change-Id: Iab0c41319af42210c871a3ed6cf52a987c5d88d7 BUG: 1299712 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13259 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* NetBSD regression reliability: properly cleanup loopback devicesEmmanuel Dreyfus2016-01-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | When a loopback device is configured and we forcibly unmount the filesystem containing the backing store, further vnconfig -l will complain "vnconfig: VNDIOCGET: Bad file descriptor" causing failures. We fix this by iterating on all loopback devices available in /dev, testing for this condition and manually unconfiguring when it happens. Backport of: I17b956a8ed28a7767f2d0dda83b93c523d3238c2 BUG: 1212676 Change-Id: I9d6fdd859572b653e1144c7d9d98a977cc3e255a Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/13205 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* all: reduce "inline" usageKaleb S KEITHLEY2016-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There are three kinds of inline functions: plain inline, extern inline, and static inline. All three have been removed from .c files, except those in "contrib" which aren't our problem. Inlines in .h files, which are overwhelmingly "static inline" already, have generally been left alone. Over time we should be able to "lower" these into .c files, but that has to be done in a case-by-case fashion requiring more manual effort. This part was easy to do automatically without (as far as I can tell) any ill effect. In the process, several pieces of dead code were flagged by the compiler, and were removed. backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155, http://review.gluster.org/11769, BUG: 1245331 Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44 BUG: 1283302 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12646 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: import/export brickinfo->uuidAtin Mukherjee2016-01-141-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13047/ Given a two node cluster with node N1 & N2, if a dummy node N3 is peer probed, the probed node N3 goes for importing volumes from the probing node (N1), but it still doesn't have information about the other node (N2) about its membership (since peer update happens post volume updates) and hence fail to update its brick's uuid. Post that even though N2 updates N3 about its membership the brick's uuid was never generated. Now as a consequence when N3 initiates a detach of N2, it checks whether the node to be detached has any bricks configured by its respective uuid which is NULL in this case and hence it goes ahead and removes the peer which ideally it shouldn't have (refer to glusterd_friend_contains_vol_bricks () for the logic) Fix is to export brick's uuid and import it at the probed node instead of resolving it. Change-Id: I2d88c72175347550a45ab12aff0ae248e56baa87 BUG: 1297305 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13047 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13210
* quota: handle quota xattr removal when quota is enabled againvmallika2016-01-071-0/+35
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13065/ When a quota is disable and enabled again before completing the cleanup operation, this can remove the new xattrs and quota accounting can become wrong Remove removing the xattr, check if quota enabled again and the xattr is new > Change-Id: Idda216f1e7346a9b843dbc112ea3e6faa9c47483 > BUG: 1293601 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ia9e3002229427f811d6a35eabf21541f4fa057af BUG: 1294609 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13109 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* Tier: "tier start force" command implementationhari gowtham2015-12-221-0/+61
| | | | | | | | | | | | | | | | | | | | | back port of : http://review.gluster.org/#/c/12983/ The start command doesnt restart the tier deamon if the deamon is running at one node. hence to bring up the tierd on the nodes where the deamon is down, the force command is implemented. It skips the check for tierd running. >Change-Id: I0037d3e5ecfe56637d0da201a97903c435d26436 >BUG: 1292112 >Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Idaca442c1a41ded8bf555a6e34eed0ebb9ea4034 BUG: 1293698 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13069 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests/tier: spurious failure in rename testN Balachandran2015-12-211-4/+8
| | | | | | | | | | | | | | | bug-1279376-rename-demoted-file.t fails sometimes The fix is based on the assumption that the test failed because the demotion happened too quickly. Change-Id: I7fa9f511c96aa2bc00e4d41d479f67018d369329 BUG: 1291046 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12958 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* bitrot: getting correct value of scrub stat'sGaurav Kumar Garg2015-12-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12776/ When user execute bitrot scrub status command then gluster is not giving correct value of Number of Scrubbed files, Number of Unsigned files, Last completed scrub time, Duration of last scrub. With this patch scrub status will give correct value for all the above fields. >> Change-Id: Ic966f76d22db5b0c889e6386a1c2219afbda1f49 >> BUG: 1285989 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Signed-off-by: Kotresh HR <khiremat@redhat.com> >> Reviewed-on: http://review.gluster.org/12776 >> Tested-by: NetBSD Build System <jenkins@build.gluster.org> >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Venky Shankar <vshankar@redhat.com> Change-Id: Ic966f76d22db5b0c889e6386a1c2219afbda1f49 BUG: 1291546 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> (cherry picked from commit 22827d51c232c44a8f5ac003529d907d93baf7b0) Change-Id: Icef24cce35c8d54ffdfa5282491338318e78780b Reviewed-on: http://review.gluster.org/12966 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tier/glusterd: Only positive values for freq-thresholdsJoseph Fernandes2015-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Fixed error handling for validation for freq-thresholds Backport of http://review.gluster.org/12970 > Change-Id: Ibe3a9752ac0b525b0c8c0d6c4b4e4d694bd91b88 > BUG: 1291603 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12970 > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: I044284b5134a685e505a377028bc9a11563b2665 BUG: 1292359 Reviewed-on: http://review.gluster.org/12992 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests:bugs:fuse: add test for bug #1283103 - selinux mount vs security xattrsMichael Adam2015-12-171-0/+59
| | | | | | | | | | | | | | | | | | | | > BUG: 1283103 > Change-Id: Ic4485d650275f67eb6b0b8382a92eb829c06e27c > Signed-off-by: Michael Adam <obnox@samba.org> > Reviewed-on: http://review.gluster.org/12827 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 8df88683c334c0652770e8e0fcec59dbc8bb5748) Change-Id: I6b8e6f1c295ab951e29519113b39c7d7e75b90ee BUG: 1283107 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12954 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd/afr: store afr pending xattrs as a volume optionRavishankar N2015-12-162-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12738/ Problem: When AFR xlator initialises, it uses the name of the client xlators below it for storing the pending changelogs (xattrs). This can be problem when some other xlator is loaded in between AFR and the client. Though that is a trivial 'traverse-graph-till-the-client-and-use-the-name' fix in AFR's init(), there are other issues like when there's no client xlator at all when, say, AFR is moved to the server side. Fix: The client xlator names are currenly unique and stored as brickinfo->brick_ids. So persist these ids as comma separated values in AFR's volume_options and use them as xattr values during init(). Change-Id: Ie761ffeb3373a4c4d85ad05c84a768c4188aa90d BUG: 1291985 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12977 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tier/glusterd : making new tier detach command throw warninghari gowtham2015-12-161-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | back port of : http://review.gluster.org/#/c/12883/ For detach tier, the validation was done using the string "detach-tier" but the new commands used has the string "tier". Making the string use "tier" to compare, creates problem as the tier status and tier detach have the keyword "tier". So tier detach and tier status were separated. and strtok was used to prevent the condition from passing when the volume name has a substring of "tier". (only the second word from the string is got and checked if the feature is tier). Problem: new detach tier command doesnt throw warnings like "not a tier volume" or " detach tier not started" respectively instead it prints empty output. Fix: while validate the volume is checked if its a tiered volume if yes it is checked if the detach tier is started, else a warning is thrown respectively. >Change-Id: I94246d53b18ab0e9406beaf459eaddb7c5b766c2 >BUG: 1288517 >Signed-off-by: hari gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/12883 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I1ac3b6baaec644dbc2025085a7f17abd56ba169d BUG: 1291970 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12976 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests, shard: Remove dependency on strict-write-orderingKrutika Dhananjay2015-12-155-10/+9
| | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12915/ Change-Id: I11968c32e57f73589e442fa13391f922fa4bbf2a BUG: 1290655 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12946 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* Fix arbiter-statfs.tRavishankar N2015-12-131-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ..and remove it from bad tests list. Backport of http://review.gluster.org/#/c/12936/ Problem: https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/12516/consoleFull ++ SETUP_LOOP /d/backends/brick1 ++ '[' 1 '!=' 1 ']' ++ backend=/d/backends/brick1 ++ case ${OSTYPE} in +++ awk -F: '/not in use/{print $1; exit}' +++ vnconfig -l vnconfig: VNDIOCGET: Bad file descriptor ++ vnd= ++ '[' x = x ']' ++ echo 'no more vnd' no more vnd ++ return 1 Fix: TEST the return value of SETUP_LOOP. Also added EXIT_EARLY to the test case because there is no point in continuing the test when setting the bricks fail. Change-Id: Idca269650385765a13be070186dc0b7eb2e5fda1 BUG: 1290658 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12947 Reviewed-by: Michael Adam <obnox@samba.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tier/glusterd: Check before starting tier daemon during volume startMohammed Rafi KC2015-12-111-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We start tier daemon when volume is started without looking into the previous status. The problem with that if detach-tier is started and then volume force start is actually starting tier daemon. This is also fixes a problem where tier daemon is not starting after detach stop. Back port of> >Change-Id: I15b56a711e12f0e24f5ab123561258bd448621f7 >BUG: 1286974 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/12833 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 28da53e26e88f23f8917810ce0177f2628aa7e9a) Change-Id: I22c9ad0b2bc4488c15978d8bf85d05113e8b886e BUG: 1289898 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12921 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com>