summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* locks: Handle negative values for flock->l_lenSoumya Koduri2016-02-283-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gfapi: Use inode_forget in case of handle objectsSoumya Koduri2016-02-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently with gfapi, even if applications release their reference on paritular inode entries, those entries never get destroyed as they shall always have positive nlookup count unless inode_table exceeds lru limit. Since inodes and their contexts can consume considerable amount of memory, applications may end up consuming lot of memory and may even get OOM killed. To avoid that, have considered below approaches (for handle based access)- a) Do 'inode_lookup' only if the corresponding inode is created for the first time and forget it during close of the handle This shall not work as multiple handle objects can refer to same inode entry and inode_forget from second handle object onwards shall result in assert. b) Do 'inode_lookup' during a handle or fd creation But this approach shall affect the performance of the fops which operate on neither handle nor fd. c) current approach taken- Applications using glfs handle objects hold a reference on corresponding inode entries. Hence it is safe to forget those inodes and make nlookup count to '0' while trying to delete those handle objects. That way the last unref (i.e, from the last handle close) shall result in inode_destroy(). This is backport of the below patch - http://review.gluster.org/13096 Change-Id: Id2c7ab178894a10c0030c143ba71e7813df8d18c Signed-off-by: Soumya Koduri <skoduri@redhat.com> BUG: 1311441 Reviewed-on: http://review.gluster.org/13096 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13506 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>
* gfapi: send lookup if inode_ctx is not setMohammed Rafi KC2016-02-273-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During resolving of an entry or inode, if inode ctx was not set, we will send a lookup to pupulate inode ctx for every xlators This patch also make sure that inode_ctx will be created after every inode_link. We will store inode_ctx value as LOOKUP_NEEDED if the inode is liked via readdirp, in all other case we will store inode_ctx value as LOOKUP_NOT_NEEDED. Back port of> >Change-Id: I3a10c298944200fa3862127187ae8988e582d352 >BUG: 1297311 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13226 >Reviewed-by: Poornima G <pgurusid@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ifeabb5611fcaa3c41404f0cdc48a680a16600e68 BUG: 1306131 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13414 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: Poornima G <pgurusid@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* cluster/tier: Create linkfiles to hardlinks correctlyN Balachandran2016-02-273-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug in the way hardlinks are handled in tiered volumes. Ideally, the tier linkto files on the cold tier to files that are hardlinks to each other on the hot tier, should themselves be hardlinks of each other. As they are not, they end up being files with the same gfid but different names for the cold tier dht, and end up overwriting the cached-subvol information stored in the dht inode-ctx. > Change-Id: Ic658a316836e6a1729cfea848b7d212674b0edd2 > BUG: 1305277 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/13391 > 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> > Tested-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit eb362c74db84d95aac07febf0d888bd98b3fb2b9) Change-Id: I5dd98e6d248619147974a630d7d72e1942a1cc83 BUG: 1311836 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/13517 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.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>
* cluster/tier : Fixed wrong variable comparisonN Balachandran2016-02-271-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | The wrong variable was being checked to determine the watermark value. > Change-Id: If4c97fa70b772187f1fcbdf5193e077cb356a8b1 > BUG: 1303895 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/13357 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I0a98e0efbc093a727912107038477239e6d85765 BUG: 1306129 Reviewed-on: http://review.gluster.org/13516 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: mohammed rafi kc <rkavunga@redhat.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>
* common-ha: reliable grace using pacemaker notify actionsKaleb S KEITHLEY2016-02-265-306/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using *-dead_ip-1 resources to track on which nodes the ganesha.nfsd had died was found to be unreliable. Running `pcs status` in the ganesha_grace monitor action was seen to time out during failover; the HA devs opined that it was, generally, not a good idea to run `pcs status` in a monitor action in any event. They suggested using the notify feature, where the resources on all the nodes are notified when a clone resource agent dies. This change adds a notify action to the ganesha_grace RA. The ganesha_mon RA monitors its ganesha.nfsd daemon. While the daemon is running, it creates two attributes: ganesha-active and grace-active. When the daemon stops for any reason, the attributes are deleted. Deleting the ganesha-active attribute triggers the failover of the virtual IP (the IPaddr RA) to another node where ganesha.nfsd is still running. The ganesha_grace RA monitors the grace-active attribute. When the grace-active attibute is deleted, the ganesha_grace RA stops, and will not restart. This triggers pacemaker to trigger the notify action in the ganesha_grace RAs on the other nodes in the cluster; which send a DBUS message to their ganesha.nfsd. (N.B. grace-active is a bit of a misnomer. while the grace-active attribute exists, everything is normal and healthy. Deleting the attribute triggers putting the surviving ganesha.nfsds into GRACE.) To ensure that the remaining/surviving ganesha.nfsds are put into NFS-GRACE before the IPaddr (virtual IP) fails over there is a short delay (sleep) between deleting the grace-active attribute and the ganesha-active attribute. To summarize: 1. on node 2 ganesha_mon:monitor notices that ganesha.nfsd has died 2. on node 2 ganesha_mon:monitor deletes its grace-active attribute 3. on node 2 ganesha_grace:monitor notices that grace-active is gone and returns OCF_ERR_GENERIC, a.k.a. new error. When pacemaker tries to (re)start ganesha_grace, its start action will return OCF_NOT_RUNNING, a.k.a. known error, don't attempt further restarts. 4. on nodes 1, 3, etc., ganesha_grace:notify receives a post-stop notification indicating that node 2 is gone, and sends a DBUS message to its ganesha.nfsd putting it into NFS-GRACE. 5. on node 2 ganesha_mon:monitor waits a short period, then deletes its ganesha-active attribute. This triggers the IPaddr (virt IP) failover according to constraint location rules. ganesha_nfsd modified to run for the duration, start action is invoked to setup the /var/lib/nfs symlink, stop action is invoked to restore it. ganesha-ha.sh modified accordingly to create it as a clone resource. Change-Id: Iad60b0c5222bbd55ef95c8b8f955e791caa3ffd0 BUG: 1290865 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12964 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>
* dht: cleanup dict and free memory in rename code pathSakshi Bansal2016-02-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13392/ > Change-Id: I2458e18197bdf7565563a85e9021b5b2850c1825 > BUG: 1303945 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/13392 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1304889 Change-Id: Ibda96769be2bd5b2708066d83363633fd7286929 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13513 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 G <rgowdapp@redhat.com>
* gfapi : fixing listxattr call for handle opsJiffin Tony Thottan2016-02-251-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently listxattr is called as part of glfs_h_getxattrs() when NULL is passed to name field, but glfs_h_getxattrs_common() inside it will error out if name is NULL. Therefore listxattr is broken for handle ops. Upstream reference >Change-Id: I9ced6e33525e1e1a50298972e4922c954fc2b223 >BUG: 1310620 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13482 >Reviewed-by: Niels de Vos <ndevos@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> >(cherry picked from commit 0bc54f3ea7a56040df4a67b8626200b47fa3d779) Change-Id: Ib88c12e5c2a1841e96a65e672f40b44ac9f491a9 BUG: 1311411 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13504 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: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd/rebalance: initialize defrag variable after glusterd restartMohammed Rafi KC2016-02-246-3/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/snapshot : Remove stale pmap registry entryAvra Sengupta2016-02-241-0/+11
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13420/ Perform a pmap_registry_remove on a stale registry entry from the previous run of snapd, which makes the query callback always return the older port number. Change-Id: I7fc504d2b09d32a9c945ec2c33e0e092a0d186ec BUG: 1309233 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13420 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> (cherry picked from commit bfe689d25ecde567a90135b47f31b89d7714aaf4) Reviewed-on: http://review.gluster.org/13457
* Snapshot:wrong logging is usedMohammed Rafi KC2016-02-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Backport of> >Change-Id: I56e5f5696fbbb4290f95adb9b68f9e43ed037ed3 >BUG: 1189473 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/9861 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.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> (cherry picked from commit 1fd7655ab0795e5aa96cdbfb8c522b222734f4f2) Change-Id: If88fba2678ca831c019f960fd3814e238d365439 BUG: 1311043 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13495 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: correct ret code in glusterd_volume_status_copy_to_op_ctx_dictAtin Mukherjee2016-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/12950 This patch is to supress the error log of Failed to aggregate rsp_dict where the above function returns a non zero ret which is not required Change-Id: If331980291bd369690257215333cea175e2042ec BUG: 1310999 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12950 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13490 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: Vijay Bellur <vbellur@redhat.com>
* socket: reduce rate of readv failure logs due to disconnectKrishnan Parthasarathi2016-02-232-5/+7
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/8210 ... by using GF_LOG_OCCASIONALLY Change-Id: I779ff32ead13c8bb446a57b5baccf068ae992df1 BUG: 1310969 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/8210 Tested-by: Atin Mukherjee <amukherj@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 G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/13487
* glusterd: set decommission_is_in_progress flag for inprogress remove-brick ↵Atin Mukherjee2016-02-232-1/+19
| | | | | | | | | | | | | | | | | | | | | | op on glusterd restart Backport of http://review.gluster.org/13323 While remove brick is in progress, if glusterd is restarted since decommission flag is not persisted in the store the same value is not retained back resulting in glusterd not blocking remove brick commit when rebalance is already in progress. Change-Id: Ibbf12f3792d65ab1293fad1e368568be141a1cd6 BUG: 1310972 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13323 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: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13489
* glusterd: volume should not start when server quorum is not metGaurav Kumar Garg2016-02-232-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* api: Fix errno being set to EINVAL even on successPrashanth Pai2016-02-231-0/+2
| | | | | | | | | | | | | | | | | BUG: 1296007 Change-Id: I7905ac70a537f23e1844c097a24eaa6cb762fb82 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/12909 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-on: http://review.gluster.org/13179 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>
* dht: remove 'null' for directory/file path from brick log for many operationsSakshi2016-02-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11206/ > Change-Id: I39cd2089240c0ad62b749f176847cc5337e57f73 > BUG: 1231264 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/11206 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1308415 Change-Id: I161844d3b419a8b5fb0300969e54f2ac9182534d Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13445 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* dht: loc should store proper gfidSakshi Bansal2016-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/12574 > Change-Id: Ic1393d44a9ed4aaba23d7c9ddea45977b9dae5e4 > BUG: 1281265 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/12574 > 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> BUG: 1308410 Change-Id: I6577971f3db139eccf3b8ca3b25e66d292a6a150 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13443 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 G <rgowdapp@redhat.com>
* snapview-client: remove check for parent inode typeMohammed Rafi KC2016-02-221-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | In lookup call back path, we are checking for parent inode type to make sure parent inode was set properly, so that next op on the inode can be successfuly completed. More info can be found at bugid 1297311 Back port of> >Change-Id: Ifb1b17f472f855f9b12088c3dd8328389d895e77 >BUG: 1297311 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13227 >Reviewed-by: Avra Sengupta <asengupt@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Change-Id: I347aa0e42ae35491246747dee50724fc91964611 BUG: 1306131 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13412 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@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>
* dht: file rename must take blocking inode locksSakshi Bansal2016-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13366 Currently DHT takes non-blocking locks for file rename. Due to this during parallel renames some clients fail with EBUSY or ESTALE errors. Hence to avoid application discontinuity file rename must take blocking inode locks. > Change-Id: I986e9d08b3be359f20b1a3e1564e049b0f3dffd3 > BUG: 1304966 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/13366 > 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 G <rgowdapp@redhat.com> Change-Id: I986e9d08b3be359f20b1a3e1564e049b0f3dffd3 BUG: 1310544 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13481 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 G <rgowdapp@redhat.com>
* tier/create: store TIER_LINKFILE_GFID in xattr dictionaryMohammed Rafi KC2016-02-221-17/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tier_create, a new key TIER_LINKFILE_GFID was introduced to avoid a race in stale linkfile deletion. Storing this key in xattr dictionary instead of using local->params dictionary. Because local->params dictionary was also used to create the file before stale linkfile deletion, that leads posix_create to fail, trying to set the added key as extended attributes Back port of> >Change-Id: I24fecb62b47bee65a1e86103925a67d13304c5df >BUG: 1290677 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13130 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I301c159ee51c77d3876e30f216d0375d761eb91e BUG: 1295359 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13410 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: Dan Lambright <dlambrig@redhat.com>
* tier/create: Dynamically allocate gfid memoryMohammed Rafi KC2016-02-221-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we are storing the memory as a static pointer. There is a chance to go that variable in out of scope. So we should allocate in Dynamic way. Backport of> >Change-Id: I096876deb8055ac3a44681599591a0a032bc0c24 >BUG: 1290677 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13102 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ibc5cde24db4846ef3152366cdaca81dd1d0e7b21 BUG: 1295359 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13162 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: Dan Lambright <dlambrig@redhat.com>
* tier:delete the linkfile if data file creation failsMohammed Rafi KC2016-02-227-83/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are creating data file in a hot subvolume then we will create a linkfile in cold subvolume. Linkfile creation happens first. If linkfile creation was successful and data file creation failed, then linkfile in cold subvolume will become stale This patch will delete the linkfile as well, if data file creation fails Also this code duplicates dht_create to make tier_create backport of> >Change-Id: I377a90dad47f288e9576c7323b23cf694a91a7a3 >BUG: 1290677 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/12948 >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I3689e8ee387fb6731b4b3a7fe8f8190143482eaa BUG: 1295359 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13161 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>
* tier/unlink: open fd for special file for fdstatMohammed Rafi KC2016-02-221-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | DUring unlink of a file, dht request stat to see whether the file is under migration or not. But in posix_unlink currently we are opening for regular files. so the fdstat for special files are failing with EBAD backport of> >Change-Id: Ic0678e42e7701c3dffb91d98272e664b0fc646b5 >BUG: 1293256 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13034 >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >Reviewed-by: Susant Palai <spalai@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ibad6e97cb052f779520968f0dce15b6fa78a5e1a BUG: 1295360 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13164 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: Dan Lambright <dlambrig@redhat.com>
* tier/unlink: symlink failed to unlinkMohammed Rafi KC2016-02-222-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during unlink of a file, we will get stat just after deleting the file, to see if the file is under migration or not but this stat call will fail for symlink if the actual file was deleted. So it is better not to send stat request from client if it is a symlink as we are not migrating symlink back port of> >Change-Id: Idc033b24fa3522b5261e579889d2195b43419682 >BUG: 1293963 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13074 >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> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ic53a9ad29722927f44004d2e7289c807c7485df0 BUG: 1295347 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13159 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: Dan Lambright <dlambrig@redhat.com>
* tier:unlink during migrationMohammed Rafi KC2016-02-229-133/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tier/glusterd: tier daemon not updating the statusMohammed Rafi KC2016-02-222-2/+33
| | | | | | | | | | | | | | | | | | | | | | | Tier process is not updating the status when the process killed mnually. backport of> >Change-Id: Ia5ea903af78ff3582da2242e6058f11c71923fab >BUG: 1294600 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13107 >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> Change-Id: I208953af5ee7985ad5b01a434ef0c94fefb0af2d BUG: 1295365 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13165 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* nfs: send lookup if inode_ctx is not setMohammed Rafi KC2016-02-224-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | During resolving of an entry or inode, if inode ctx was not set, we will send a lookup. This patch also make sure that inode_ctx will be created after every inode_link. Back port of> >Change-Id: I137a7e2510635ff4ea6d007b671961341f89c949 >BUG: 1297311 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13224 >Reviewed-by: soumya k <skoduri@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I2034521e23ef24ac75f80aff736abf5811fc0de6 BUG: 1306131 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13413 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: Dan Lambright <dlambrig@redhat.com>
* fuse: send lookup if inode_ctx is not setMohammed Rafi KC2016-02-224-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | During resolving of an entry or inode, if inode ctx was not set, we will send a lookup. This patch also make sure that inode_ctx will be created after every inode_link Back port of> >Change-Id: I4211533ca96a51b89d9f010fc57133470e52dc11 >BUG: 1297311 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/13225 >Reviewed-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I53d7f77b5b9a9e095aeeccdd3605dcce7eade0b2 BUG: 1306131 Tested-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/13416 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: mohammed rafi kc <rkavunga@redhat.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>
* fuse:sent at least one lookup before actual fopMohammed Rafi KC2016-02-221-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Fuse shoud sent atleast one lookup for an inode/gfid populated via readdirp before actual fop to populate inode ctx for xlators. Back port of> >Change-Id: I5c02ed73f892924c9e404d91cbe0633a275accbd >BUG: 1236032 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/11892 >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >Tested-by: Raghavendra G <rgowdapp@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Iab5d9c7939771a1644fce4f6fe2520ed19455a37 BUG: 1306131 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13415 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>
* cli : provide prompt for the nfs-ganesha disable clijiffin tony thottan2016-02-221-11/+16
| | | | | | | | | | | | | | | | | | Presently, when we are executing the command "gluster nfs-ganesha disable", the disable of nfs-ganesha cluster starts working whereas, in some cases the user may not want to disable the cluster. So we shall let him know by giving a prompt to let him say "yes or no" for going ahead with the disable procedures. Change-Id: I860dad1479f7ca16bc2736b8056b609473bef65f BUG: 1289031 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13450 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: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: check if all bricks are started before performing remove-brickSakshi2016-02-224-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* rdma:restore device linked list structure in case of failureMohammed Rafi KC2016-02-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We maintain a linked list strcture to store device information, and maintain head in a ctx variable. A new device will be added at the beginning of list. But if the device creation failed, then we need to adjust the linked list to proper state. back port of : >Change-Id: I07cefd3b808d8973a915728b3ba7f2955d29c92a >BUG: 1250297 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/11829 >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> (cherry picked from commit 7641eb8b469a6dd4db6db59d2a5ef4d5a65e1a61) Change-Id: I5e7bcdef9402c11a139db8047ae2a9a18cdd8f4e BUG: 1254430 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11943 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: validate function for replica volume optionsSakshi2016-02-212-12/+109
| | | | | | | | | | | | | | | | | | | | | 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>
* dht: set proper errno when hashed subvol is not foundSakshi Bansal2016-02-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12559/ > Change-Id: I0c4c72e2f5a9f8a7c60ef65251c596b54de89479 > BUG: 1279705 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/12559 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Susant Palai <spalai@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I0c4c72e2f5a9f8a7c60ef65251c596b54de89479 BUG: 1285829 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13351 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Skip subvols if no layout presentN Balachandran2016-02-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Running "rm -rf" on a tiered volume sometimes caused the client to crash because dht_readdirp_cbk referenced a NULL layout for the hot tier subvol. Now, entries are skipped if the layout is NULL. This can cause "rm -rf" to fail with ENOTEMPTY rmdir failures. > Change-Id: Idd71a9d0f7ee712899cc7113bbf2cd3dcb25808b > BUG: 1307208 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/13440 > 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: Dan Lambright <dlambrig@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit bfd8f92490454f261330da34565334ed5decd0e1) Change-Id: I34e413d669fdfba343446e84fef5d8e9dd7bd1da BUG: 1308400 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/13441 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 G <rgowdapp@redhat.com>
* cluster/tier : Reset watermarks in tierN Balachandran2016-02-191-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | A node which contains only cold bricks and has detected that the high watermark value has been breached on the hot tier will never reset the watermark to the correct value. The promotion check will thus always fail and no promotions will occur from that node. > Change-Id: I0f0804744cd184c263acbea1ee50cd6010a49ec5 > BUG: 1303895 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/13341 > 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> (cherry picked from commit 545f4ed2c7195a21210e6a055c27c1b7a115e18c) Change-Id: Iba3aa9c57cf5828ab87140c2c8257146a8772836 BUG: 1306129 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/13411 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: Dan Lambright <dlambrig@redhat.com>
* libglusterfs: close & open cmd_history.log on log rotateGaurav Kumar Garg2016-02-192-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of: http://review.gluster.org/#/c/12832/ Post log rotate, cmd_history.log is not refreshed (closed & opened back) due to which new commands still land up in the log rotated file. Fix is to close and open cmd_history.log file upon log rotation >> Change-Id: Ie6990c9d55b0afa544bc5c84de3db49ff4b1299b >> BUG: 1286959 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/12832 >> Smoke: Gluster Build System <jenkins@build.gluster.com> >> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Niels de Vos <ndevos@redhat.com> >> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit 8fdfa0c17cf492f39e675f7502596754f6e5aeb4) Change-Id: Ie6990c9d55b0afa544bc5c84de3db49ff4b1299b BUG: 1304963 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13361 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>
* access-control : remove spurious error message from the posix_setxattr_cbkJiffin Tony Thottan2016-02-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A check for dictionary is required before calling handling_other_acl_related_xattr() in posix_setxattr_cbk(). Otherwise following message will be poped up on every settxattr call. [2016-01-31 17:38:48.027792] I [dict.c:473:dict_get] (-->/usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (posix_acl_setxattr_cbk+0x26) [0x7f2334c5c166] --> /usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (handling_other_acl_related_xattr+0xb0) [0x7f2334c5c0f0] -->/usr/lib/x86_64-linux-gnu/libglusterfs.so.0(dict_get+0x93) [0x7f233c04b0c3] ) 0-dict: !this || key=system.posix_acl_default [Invalid argument] Upstream reference : >Change-Id: I93f7e0f764c94dce38bdde95a68341f69a52122d >BUG: 1303501 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13325 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit b72172f4516ff5627f15168213a54b171463803f) BUG: 1308800 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: Ide2aea41c01c00bf28294fd3ea4f1d538f54b26f Reviewed-on: http://review.gluster.org/13452 Reviewed-by: Niels de Vos <ndevos@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: Kaleb KEITHLEY <kkeithle@redhat.com>
* cluster/tier: allow db queries to be interruptableDan Lambright2016-02-184-79/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* geo-rep: Fix gsyncd prefix in gsec_createAravinda VK2016-02-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | gsec_create script is generated after running ./configure libexec dir was formed using $prefix/libexec, but in Debian based distributions libexec dir is not present, instead they use lib directory to store these scripts. With this patch, full libexec path is fetched during ./configure. BUG: 1304692 Change-Id: I9f47a38e6ab0027c7df6716136fbe0635e95a593 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/13298 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> (cherry picked from commit 453abcb821b712f849f91a2a370a4debff89eed2) Reviewed-on: http://review.gluster.org/13354
* cli/ afr: op_ret for index heal launchRavishankar N2016-02-174-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glusterd: check quorum on restart bricksAtin Mukherjee2016-02-173-5/+74
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13236/ While spawning bricks on a glusterd restart the quorum should be checked and brick shouldn't be started if the volume doesn't meet quorum. Change-Id: I21bf9055bdf38c53c81138cc204ba05a9ff6444f BUG: 1305256 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13236 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> Reviewed-on: http://review.gluster.org/13390 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com>
* timer: fix race between gf_timer_call_cancel() and gf_timer_proc()Anand Avati2016-02-162-37/+18
| | | | | | | | | | | | | | | | | | | | | | | >Change-Id: Ie264d3d591352e4a8ddaa90ae2174d9c552396f1 >BUG: 1243187 >Signed-off-by: Anand Avati <avati@redhat.com> >Reviewed-on: http://review.gluster.org/6459 >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >Reviewed-by: Poornima G <pgurusid@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >(cherry picked from commit ea90c92820ee0ca500345863cdfb5009d08b6ca7) Change-Id: I2bc136e7d676826428afbf57f5afe50e2238fd33 BUG: 1246121 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/11796 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> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* performance/write-behind: retry "failed syncs to backend"Raghavendra G2016-02-166-141/+586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glusterfsd: destroy frame after rebalance callback has completedSakshi Bansal2016-02-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | Rebalance after sending a status notification immediately destroys the frame. Now in its callback the frame is corrupted. Rebalance crashes when this corrupted frame is accessed. To avoid this we must destroy the frame after the callback is completed. > Backport of http://review.gluster.org/#/c/13262/ > Change-Id: If383017a61f09275256e51c44a1efa28feace87b > BUG: 1300152 > Signed-off-by: Sakshi <sabansal@redhat.com> Change-Id: If383017a61f09275256e51c44a1efa28feace87b BUG: 1302962 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13317 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 G <rgowdapp@redhat.com>
* USS: pre-existing .snaps should not be listed with 'ls -a' with USSvmallika2016-02-151-13/+66
| | | | | | | | | | | | | | | | | | | | | | enabled This is a backport of http://review.gluster.org/#/c/13330/ If there is a .snaps directory pre-exists and when USS is enabled, it should not be listed with 'ls -a' > Change-Id: I1c43e2decc0bbbd3213b190b675e3a32d04b22d3 > BUG: 1303828 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I76c632239b45f7eb7296cbfe3b73bc68e5bd1655 BUG: 1306163 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13419 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>
* uss: validate USS option features.snapshot-directoryvmallika2016-02-153-35/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cluster/ec: Never return -ve statePranith Kumar K2016-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Ec manager shouldn't return -ve states, but it is, fixed that. >Change-Id: I3f97c6ba2dbf9da724e8e1ee9b2c9da73f40013d >BUG: 1300929 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13278 >Tested-by: Xavier Hernandez <xhernandez@datalab.es> >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> BUG: 1305742 Change-Id: I3c0db88b286afca355a8a9ec73589eca57710da6 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13400 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: Xavier Hernandez <xhernandez@datalab.es>