summaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
...
* rpm: include required directory for glusterfindNiels de Vos2015-08-252-65/+1
| | | | | | | | | | | | | | | | | | | | The directory was marked as %ghost, which causes the following installation failure: Error unpacking rpm package glusterfs-server-3.8dev-0.446.git45e13fe.el7.centos.x86_64 error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py;5581f20e: cpio: open Also, *all* Python files should be part of the RPM package. This includes generated .pyc and .pyo files. BUG: 1256307 Change-Id: Iee74905b101912c4a845257742c470c3fe42ce2a Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/11298 Reviewed-on: http://review.gluster.org/12000 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha : refresh-config should print sensible outputMeghana M2015-08-241-12/+40
| | | | | | | | | | | | | | | | | | | | | | ganesha-ha.sh --refresh-config printed the dbus-send output messages as is on the console. Improving the output of the operation by redirecting the messages to /var/log/messages and by checking the exit code of the command executed. The behaviour is also changed a litlle by exiting when refresh-config fails on any of the nodes. We don't want to continue changing config files on other nodes when refresh-config has already failed on one of the nodes. Change-Id: Ic2e4e26bc09b1ba23cc6b62a1590c6083a0bde80 BUG: 1254494 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11949 Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* snapshot/scheduler: Output correction of initialisationAvra Sengupta2015-08-241-2/+2
| | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11924/ Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923 BUG: 1245922 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11925 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot/scheduler: Check if volume exists before adding/editing schedulesAvra Sengupta2015-08-231-21/+67
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11830/ Before adding or editing a scheduler, check if the volume name provided in the schedule, exists in the cluster or not. Added return code VOLUME_DOES_NOT_EXIST(17) for the same. Change-Id: Ia3fe3cc1e1568ddd10f9193bbf40a098f0fe990a BUG: 1245923 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11917 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* common-ha: concise output for HA statusKaleb S. KEITHLEY2015-08-231-1/+26
| | | | | | | | | | | | | filter out unnecessary detail from the HA status Change-Id: I407fbec1c61aa35afa7a433187a122975bf3e04d BUG: 1250628 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11942 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com>
* common-ha: delete virt-IP entry of deleted nodeKaleb S. KEITHLEY2015-08-212-5/+16
| | | | | | | | | | | | | | | | | | Avoid accumulating invalid/defunct virtual IP entries in the HA config file. use correct 'clean' name when adding a node and its virtual IP Also fix a nit in the sample HA config file Change-Id: I2b7ca279f6390ee34b4e0689039eb7d846ed7e34 BUG: 1250601 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11841 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com>
* build: scripts are not installed with +x bitKaleb S. KEITHLEY2015-07-303-3/+3
| | | | | | | | | | | | | | | | | | | scripts listed in Makefile.am as foo_DATA, should be foo_SCRIPTS to in installed +x backport of > Change-Id: Ib9b98efcea968c03b574726bdc0d4f76cdfd1dc1 > BUG: 1225018 > http://review.gluster.org/#/c/11806/ Change-Id: Ieed45f37a22a0ebd977a0d586874a31901c415e9 BUG: 1223945 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11807 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* NFS-Ganesha : Add-node does not copy "exports" directory correctlyMeghana M2015-07-141-6/+6
| | | | | | | | | | | | | | | | | Add-node logic has to copy the "exports" directory into the new node in the same path. There was an error in copying to the correct path. Fixing it. This is a backport of the patch merged upstream, http://review.gluster.org/#/c/11618/ Change-Id: I76d8679966372d6fcee2dcf38bc20c9b5c522132 BUG: 1242192 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11635 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* NFS-Ganesha : Export fails on RHEL 7.1Meghana M2015-07-103-8/+93
| | | | | | | | | | | | | | | | | | | We grep for CONFFILE parameter in "/etc/syconfig/ganesha" file to find out the path of the ganesha config file. In RHEL 7.1, this parameter does not exist in the file and we can't find out the ganesha config file. Export fails invariably due to this. Changing this pattern to a more generic one and default it to "/etc/ganesha/ganesha.conf" This patch is a backport of the fix merged upstream, http://review.gluster.org/#/c/11594/ Change-Id: Ia0f87f964a5771b97d9077f17a0387d7a01e02b6 BUG: 1241885 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11621 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: ganesha-ha.sh status tries to read ganesha-ha.confKaleb S. KEITHLEY2015-07-091-20/+20
| | | | | | | | | | | | | | | | status doesn't need to read the config backport of > Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd > BUG: 1241133 > http://review.gluster.org/#/c/11581/ Change-Id: I036fd3072f38958373b1a85b0dc5c97245a72af4 BUG: 1241134 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11582 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_file for ↵Avra Sengupta2015-07-081-6/+6
| | | | | | | | | | | | | | | | | | writing data into tmp file and then making an atomic rename to the required filename The reason for using this location is that it adheres to the selinux policies. Also moving the update of the current_scheduler file, under the lock so as to avoid multiple writes Change-Id: I61e62b5daf6f1bce2319f64f7b1dfb8b93726077 BUG: 1239270 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11536 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's ↵Avra Sengupta2015-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | brick Backport of http://review.gluster.org/#/c/11533/ The brick path we use to create shared storage is /var/run/gluster/ss_brick. The problem with using this brick path is /var/run/gluster is a tmpfs and all the brick/shared storage data will be wiped off when the node restarts. Hence using /var/lib/glusterd/ss_brick as the brick path for shared storage volume as this brick and the shared storage volume is internally created by us (albeit on user's request), and contains only internal state data and no user data. Change-Id: I808d1aa3e204a5d2022086d23bdbfdd44a2cfb1c BUG: 1230399 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11534 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* NFS-Ganesha : Unexport fails after S31ganesha-start script is runKaleb S. KEITHLEY2015-07-022-21/+28
| | | | | | | | | | | | | | | | The dbus-send script extracts the export ID from the export config file. It expects the export ID to be written in a particular format. The post-phase hook-script created the export file in a different format, and the dbus-send never gets the correct export ID because of this. Fixing the issue by replacing the write_conf function in the S31ganesha-start hook-script. Also, NFS-Ganesha service stops when dbus signal is sent more than once on the same export. Consecutive start/stop operations creates problems. Fixing all the issues at once. Change-Id: I1306c68e2bc9abd91be1b7f1558c93060cc9c98d BUG: 1238752 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11511
* common-ha: Fix '/var/lib/nfs/statd/state' path creationSoumya Koduri2015-07-011-3/+5
| | | | | | | | | | | | | | | | | | '/var/lib/nfs/statd/state' which contains NSM state number should be a file instead of directory. This is a backport of the below fix - http://review.gluster.org/#/c/11468/ Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b BUG: 1238057 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11468 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11476 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : Exporting volume failsMeghana M2015-06-302-2/+2
| | | | | | | | | | | | | | | | | | Due to a recent fix, the dbus-send.sh looked for a .export_added file even before it was created. This resulted in the ganesha.enable option failing consistently. Fixing it. This is a backport of the fix in master, http://review.gluster.org/#/c/11456/ Change-Id: I9658ff8eced405eed7a26fab334f7172171133e8 BUG: 1236933 Signed-off-by: Meghana <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11458 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* NFS-Ganesha : Automatically export volume after volume restartMeghana M2015-06-271-1/+1
| | | | | | | | | | | | | | | | | The export file was not getting created in the correct path. Fixing the path in this patch. This is the backport of the fix merged on master, http://review.gluster.org/#/c/11432/ Change-Id: I812f9d97252ee83a239f05ad683d2d727f3f5f59 BUG: 1232335 Signed-off-by: meghana <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11435 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* common-ha: fix delete-nodeKaleb S. KEITHLEY2015-06-261-45/+56
| | | | | | | | | | | | | | | | | | | delete-node is a designed to be "disruptive" surgically delete a node from the config and stop nfs-ganesh on that node. finish the implementation and fix a few minor issues >-Id: I964bb72a76ee635b5fc484ec5b541e69eeececcd > BUG: 1234474 > http://review.gluster.org/11353 Change-Id: Ic06952df8f42f80cfeb82d419757a8b99dff275a BUG: 1234584 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11427 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* geo-rep: Fix ssh issue in geo-repKotresh HR2015-06-261-0/+7
| | | | | | | | | | | | | | | | | | | In geo-rep mountbroker setup, workers fails with 'Permission Denied' even though the public keys are shared to all the slave nodes. The issue is with selinux context not being set for .ssh and .ssh/authorizedkeys. Doing restorecon on these entries to set default selinux security context fixes the issue. BUG: 1235360 Reviewed-On: http://review.gluster.org/11383 Change-Id: Idd78e4b183bbeb196d00ee3d521c56d0985ca5d9 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11384 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>
* NFS-Ganesha : Implement refresh-configMeghana M2015-06-242-15/+89
| | | | | | | | | | | | | | | | | | | | | It is important that we give an automatic way of refreshing the config when the user has changed the export file manually. Without this, the user will be forced to restart the server. Implementing refresh_config by using dbus signals to unexport and export the same export dynamically. Making a few changes to make sure that "--help" doesn't throw unnecessary error messages. This is the backport of the patch merged on master, http://review.gluster.org/#/c/11331/ Change-Id: I2e17edeffc191e2cc30a328b2999e1a04f5bc498 BUG: 1235258 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11380 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gluster/shared_storage: Add/Remove shared storage from /etc/fstab during ↵Avra Sengupta2015-06-241-0/+5
| | | | | | | | | | | | | | | | | | | enable/disable Backport of http://review.gluster.org/#/c/11272/ While creating/deleting shared storage volume, add/remove the shared storage entry from /etc/fstab, so as to ensure availability of the shared storage, even after a node reboot Change-Id: Ib9edc8fd02c74a677062ca53ffd10be997b056c6 BUG: 1232889 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11295 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* common-ha : Fixing add node operationMeghana M2015-06-221-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Resource create for the added node referenced a variable new_node that was never passed. This led to a wrong schema type in the cib file and hence the added node always ended up in failed state. And also, resources were wrongly created twice and led to more errors. I have fixed the variable name and deleted the repetitive invocation of the recreate-resource function. The new node has to be added to the existing ganesha-ha config file for correct behaviour during subsequent add-node operations. This edited file has to be copied to all the other cluster nodes. I have added a fix for this as well. This is a backport of the fix that is merged on master, http://review.gluster.org/#/c/11316/5 Change-Id: I21e3fcffe8274986be53766e12a2c049eaa2da09 BUG: 1234216 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11337 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared ↵Avra Sengupta2015-06-191-0/+33
| | | | | | | | | | | | | | | | | | | storage is available Backport of http://review.gluster.org/#/c/11139/ If shared storage is not accessible, create a flag in /var/run/gluster/ So that when /etc/cron.d/glusterfs_snap_cron_tasks is available again, the flag will tell us, to reload /etc/cron.d/glusterfs_snap_cron_tasks. Change-Id: I41b19f57ff0b8f7e0b820eaf592b0fdedb0a5d86 BUG: 1230399 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* common-ha: cluster setup issues on RHEL7Kaleb S. KEITHLEY2015-06-193-13/+34
| | | | | | | | | | | | | | | | | | | * use --name on RHEL7 (later versions of pcs drop --name) we guessed wrong and did not get the version that dropped use of --name option * more robust config file param parsing for n/v with ""s in the value after not sourcing the config file * pid file fix. RHEL6 init.d adds -p /var/run/ganesha.nfsd.pid to cmdline options. RHEL7 systemd does not, so defaults to /var/run/ganesha.pid. Change-Id: I2236d41c8a87e4ead082274dddec19307d1f4db9 BUG: 1232333 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11258 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Meghana M <mmadhusu@redhat.com>
* NFS-Ganesha: Automatically export vol that was exported before vol restartMeghana M2015-06-184-292/+116
| | | | | | | | | | | | | | | | | | | | | | | | Consider a volume that is exported via NFS-Ganesha. Stopping this volume will automatically unexport the volume. Starting this volume should automatically export it. Although the logic was already there, there was a bug in it. Fixing the same by introducing a hook script. Also with the new CLI options, the hook script S31ganesha-set.sh is no longer required. Hence, removing the same. Adding a comment to tell the user that one of the CLI commands will take a few minutes to complete. This is a backport of the patch merged on master, http://review.gluster.org/#/c/11247/ Change-Id: I1c16a978b9e2093a4298ea3024d031fd1a5bb577 BUG: 1232335 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11259 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* common-ha: cluster HA setup sometimes failsKaleb S. KEITHLEY2015-06-181-5/+22
| | | | | | | | | | | | | | | | | | | | | | the "s in the VIP_foo="x.x.x.x" lines are problematic now that the config file isn't sourced. Revised to also handle names containing '-', e.g. host-11, and FQNs, e.g. host-11.lab.gluster.org backport of > Change-Id: I1a52afbf398a024cdff851d0c415d8363f699c90 > BUG: 1232001 > Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> > http://review.gluster.org/#/c/11281/ Change-Id: Icef306554911b2238b230700f1866a441eaf1189 BUG: 1232002 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11299 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com>
* common-ha: cluster HA setup sometimes failsKaleb S. KEITHLEY2015-06-161-3/+9
| | | | | | | | | | | | | | | | | | | | the "s in the VIP_foo="x.x.x.x" lines are problematic now that the config file isn't sourced. (A short term work-around is to simply eliminate them.) > Change-Id: I65f375f2d3b8453adb45dc3dbbc7d3fb07cf85d0 > BUG: 1232001 > Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> > http://review.gluster.org/#/c/11237/ Change-Id: Ib626795af5be0d23524271d32923ed4a0e7079f5 BUG: 1232002 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11238 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* common-ha : Clean up cib state completelyMeghana Madhusudhan2015-06-161-22/+1
| | | | | | | | | | | | | | Clean up cluster state on all the machines during tear down. This is a backport of the patch merged upstream, http://review.gluster.org/#/c/11231/ Change-Id: I58d1b6ee743158bc0e5d1c965c0d5a137c9843e5 BUG: 1232155 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11244 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* snapshot/scheduler: Modified main() function to take arguments.nnDarshan2015-06-131-3/+3
| | | | | | | | | | | | | | Modified the main function to take script arguments, so that this script can be used as a module by other programs . Change-Id: I902f0bc7ddfbf0d335cc087f51b1a7af4b7157fc BUG: 1226213 Signed-off-by: nnDarshan <dnarayan@redhat.com> Reviewed On: http://review.gluster.org/#/c/10760/ Reviewed-on: http://review.gluster.org/10997 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* tools/glusterfind: Cleanup glusterfind dir after a volume deleteAravinda VK2015-06-122-1/+65
| | | | | | | | | | | | | | | | | | | | If `glusterfind delete` command was not run before volume delete, stale session directories exists in /var/lib/glusterd/glusterfind directories. Also shows these sessions in `glusterfind list` When Volume is deleted, Post hook will be run which cleans up the stale session directories BUG: 1225551 Change-Id: I54c46c30313e92c1bb4cb07918ed2029b375462c Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/#/c/10944 Reviewed-on: http://review.gluster.org/11186 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* common-ha: handle long node names and node names with '-' and '.' in themKaleb S. KEITHLEY2015-06-113-40/+60
| | | | | | | | | | | | | | | | | | sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple and elegant solution for reading config params, but bash variable names do not allow '-' and '.' in them. also fix incorrect path to shared volume > backport of http://review.gluster.org/10952, BZ 1225572 Change-Id: I0d2e6cb21017472b1e0f764335cf28946cca95f0 BUG: 1226962 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/10952 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11034
* build: fix compiling on older distributionsNiels de Vos2015-06-113-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data-tiering is disabled on RHEL-5 because it depends on a too new SQLite version. This change also prevents installing some of files that are used by geo-replication, which is also not available on RHEL-5. geo-replication depends on a too recent version of Python. Due to an older version of OpenSSL, some of the newer functions can not be used. A fallback to previous functions is done. Unfortunately RHEL-5 does not seem to have TLSv1.2 support, so only older versions can be used. Cherry picked from commit 0209b18fd65f9df5ebd0a8764ebf864d0d392998: > Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913 > BUG: 1222317 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/10803 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Also including the changes from http://review.gluster.org/11140: > build: improve detection of new OpenSSL features > > Building on Mac OS X revealed that the current check for > CRYPTO_THREADID_set_callback() availability in OpenSSL is not correct. > > There also does not seem to be a guarantee that TLSv1_2_method() is > available when TLS1_2_VERSION is #define'd. > > Change-Id: I21508065fc181a1c74bee4fd6d23bb5bdf7cea7a > BUG: 1222317 > Reviewed-on: http://review.gluster.org/11140 > Original-author: Kaleb KEITHLEY <kkeithle@redhat.com> > Signed-off-by: Niels de Vos <ndevos@redhat.com> Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913 BUG: 1228510 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11096 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* snapshot/scheduler: Handle OSError in os. callbacksAvra Sengupta2015-06-111-8/+8
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11087/ Handle OSError and not IOError in os. callbacks. Change-Id: I2b5bfb629bacbd2d2e410d96034b4e2c11c4931e BUG: 1230018 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit d835219a30327ede60e4ef28210914ab30bd0712) Reviewed-on: http://review.gluster.org/11151 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* snapshot/scheduler: Check if GCRON_TASKS exists beforeAvra Sengupta2015-06-111-0/+4
| | | | | | | | | | | | | | | | accessing it's mtime Backport of http://review.gluster.org/#/c/11138/ Change-Id: I873c83d21620527b20d7de428d11582c5499d1af BUG: 1230167 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit 5b05d3e376e984f00528f5bf2f0febd0220ca91f) Reviewed-on: http://review.gluster.org/11159 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd/shared_storage: Provide a volume set option to create and mount the ↵Avra Sengupta2015-06-052-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared storage Backport of http://review.gluster.org/#/c/10793/ Introducing a global volume set option(cluster.enable-shared-storage) which helps create and set-up the shared storage meta volume. gluster volume set all cluster.enable-shared-storage enable On enabling this option, the system analyzes the number of peers in the cluster, which are currently connected, and chooses three such peers(including the node the command is issued from). From these peers a volume(gluster_shared_storage) is created. Depending on the number of peers available the volume is either a replica 3 volume(if there are 3 connected peers), or a replica 2 volume(if there are 2 connected peers). "/var/run/gluster/ss_brick" serves as the brick path on each node for the shared storage volume. We also mount the shared storage at "/var/run/gluster/shared_storage" on all the nodes in the cluster as part of enabling this option. If there is only one node in the cluster, or only one node is up then the command will fail Once the volume is created, and mounted the maintainance of the volume like adding-bricks, removing bricks etc., is expected to be the onus of the user. On disabling the option, we provide the user a warning, and on affirmation from the user we stop the shared storage volume, and unmount it from all the nodes in the cluster. gluster volume set all cluster.enable-shared-storage disable Change-Id: Idd92d67b93f444244f99ede9f634ef18d2945dbc BUG: 1228181 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11086 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* common-ha: fix race between setting grace and virt IP fail-overKaleb S. KEITHLEY2015-06-041-10/+14
| | | | | | | | | | | | | | | | | Also send stderr output of `pcs resource {create,delete} $node-dead_ip-1` to /dev/null to avoid flooding the logs > backport of http://review.gluster.org/#/c/10646/, BZ 1219485 Change-Id: I29d526429cc4d7521971cd5e2e69bfb64bfc5ca9 BUG: 1227028 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/10646 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11036
* snapshot/scheduler: Return proper error code in case of failureAvra Sengupta2015-06-041-61/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11005/ ENUM RETCODE ERROR ---------------------------------------------------------- INTERNAL_ERROR 2 Internal Error SHARED_STORAGE_DIR_DOESNT_EXIST 3 Shared Storage Dir does not exist SHARED_STORAGE_NOT_MOUNTED 4 Shared storage is not mounted ANOTHER_TRANSACTION_IN_PROGRESS 5 Another transaction is in progress INIT_FAILED 6 Initialisation failed SCHEDULING_ALREADY_DISABLED 7 Scheduler is already disabled SCHEDULING_ALREADY_ENABLED 8 Scheduler is already enabled NODE_NOT_INITIALISED 9 Node not initialised ANOTHER_SCHEDULER_ACTIVE 10 Another scheduler is active JOB_ALREADY_EXISTS 11 Job already exists JOB_NOT_FOUND 12 Job not found INVALID_JOBNAME 13 Jobname is invalid INVALID_VOLNAME 14 Volname is invalid INVALID_SCHEDULE 15 Schedule is invalid INVALID_ARG 16 Argument is invalid Change-Id: Ia1da166659099f4c951fcdb4d755529e41167b80 BUG: 1227615 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit 9798a24febba9bbf28e97656b81b8a01a1325f68) Reviewed-on: http://review.gluster.org/11057 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* snapshot/scheduler: Do not enable scheduler if another scheduler is runningAvra Sengupta2015-06-011-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10641/ Check if another snapshot scheduler is running before enabling the scheduler Also introducing a hidden option, disable_force "snapshot_scheduler.py disable_force" will disable the cli snapshot scheduler from any node, even though the node has not been initialised for the scheduler, as long as the shared storage is mounted This option is hidden, because we don't want to encourage users to use all commands from nodes that are not initialised. Change-Id: I7ad941fbbab834225a36e740c61f8e740813e7c8 BUG: 1226120 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/10641 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: NetBSD Build System Reviewed-by: Kaushal M <kaushal@redhat.com> (cherry picked from commit d67eb34b2a5b5e3cb926ff4c86a163148743829c) Reviewed-on: http://review.gluster.org/10993 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* NFS-Ganesha : Disable ACL by defaultMeghana Madhusudhan2015-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | ACLs need to be disabled by default. To enable ACLs, the user has to change the export file manually, set Disable_ACL=False and run ganesha-ha.sh --refresh-config. Changing the default export file to accommodate these changes. This is a backport of the fix that is merged on the master, http://review.gluster.org/#/c/10769/ Change-Id: I6c27e9cf829298a05a12e623dea43c0c1216a97d BUG: 1221507 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10779 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* scripts: Added script stop-all-gluster-processes.sh in rpmAravinda VK2015-05-311-2/+3
| | | | | | | | | | | | | | | This script was not included as part of rpm. Fixed now BUG: 1225331 Change-Id: I5e559b187253cc2f4f8ea7cf8ec56a32802e5ab2 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/10931 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11015 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* NFS-Ganesha: Add-node and delete-node changes in HA implementationMeghana Madhusudhan2015-05-071-4/+60
| | | | | | | | | | | | | | | | | NFS-Ganesha related config files have to be copied over to the new node and NFS-Ganesha service has to be started. Similary NFS-Ganesha service has to be stopped when a node is deleted from the HA cluster. This is the backport of the patch merged on master, http://review.gluster.org/#/c/10596/ Change-Id: I21f09e30a738d2ba01861ce480ecf906667d887b BUG: 1218884 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10632 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* NFS-Ganesha : Do not empty global config file when cluster is tornMeghana Madhusudhan2015-05-071-1/+1
| | | | | | | | | | | | | | | | | The global config file will need new blocks to support client lock recovery. Current cleanup function empties the entire file. Deleting only "include" lines in the config file. This is the backport of the patch, http://review.gluster.org/#/c/10630/ Change-Id: I15f7a7aa7bc4f2362abd15b28a8b709d93dc3d37 BUG: 1218857 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10593 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Cache-invalidation : set to on/off depending on ganesha.enable valueMeghana Madhusudhan2015-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | Multi-Head NFS-Ganesha servers need upcall (cache-invalidation) support to notify them in case of any changes to the files in the backend. Hence, upcall xlator option "features.cache-invalidation" needs to be enabled when ganesha.enable is set to 'on'. Similarly, this feature needs to be disabled when ganesha.enable is set to 'off' This is a back-port of the fix that is merged on master. http://review.gluster.org/#/c/10581/ Change-Id: I1b24c88b5a7cce963a184a0a90cee839873a8d6b BUG: 1218858 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10594 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: NetBSD Build System Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* snapshot/scheduler: Use shutil.move instead of os.rename()Avra Sengupta2015-05-061-2/+3
| | | | | | | | | | | | | | | | os.rename is a wrapper on top of the rename function, which fails with invalid cross-device link if /tmp is a tmpfs. Hence using shutil.move Change-Id: Ia026d2a810b725ccd398db895e612c53bc6a2f95 BUG: 1218575 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/10347 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/10560
* snapshot/scheduler: Use os.path.realpath() for path validationAvra Sengupta2015-05-061-1/+1
| | | | | | | | | | | | | | | In order to accomodate systems, where /var/run is a symlink to /run, we are using os.path.realpath() for path validations. Change-Id: I4eae536867ec6c88f92c762b92f5c1966b622bde BUG: 1218585 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/10464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/10573
* geo-rep: Added GF_CPPFLAGS to Makefile.amSoumya Koduri2015-05-021-0/+1
| | | | | | | | | | | | | | | | This change is required to include contrib files in glusterfs.h BUG: 1217711 Change-Id: I3b6c9485950db9fa1f86efbd4b6c932d33e9bdf4 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10200 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10483 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha: ganesha-ha.sh delete-node implementationKaleb S. KEITHLEY2015-05-013-108/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | omnibus patch consisting of: + completed implemenation of delete-node (BZ 1213934 (master 1213933)) + teardown leaves /var/lib/nfs symlink (BZ 1213927 (master 1210712)) + setup copy config, teardown clean /etc/cluster (BZ 1214888 (master 1212823)) setup for copy config, teardown clean /etc/cluster: 1. on one (primary) node in the cluster, run: `ssh-keygen -f /var/lib/glusterd/nfs/secret.pem` Press Enter twice to avoid passphrase. 2. deploy the pubkey ~root/.ssh/authorized keys on _all_ nodes, run: `ssh-copy-id -i /var/lib/glusterd/nfs/secret.pem.pub root@$node` 3. copy the keys to _all_ nodes in the cluster, run: `scp /var/lib/glusterd/nfs/secret.* $node:/var/lib/glusterd/nfs/` N.B. this allows setup, teardown, etc., to be run on any node Change-Id: I66e947538769c3c531cfdb89854997130ca5c05b BUG: 1213934 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/10318 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* Fix case mistake for MKDIR_P in MakefilesEmmanuel Dreyfus2015-04-223-5/+5
| | | | | | | | | | | | | | | | | | | | | Some makefiles used $(mkdir_p) instead of the corectly defined $(MKDIR_P). The former is substituted as an empty string, leading to possible failures depending of the user shell tolerance. NetBSD's /bin/sh seems to choke more easily than Linux's /bin/bash, but if the later does not fail, it does not created the intended directories anyway. Resubmit after rebase in hope that regression test will have less spurious failures. Backport of: I8caed4000f3c91cb3a685453848fb854793945ed BUG: 1212676 Change-Id: I393ffda8aa24bffce86f7b1f19b999ffa30c3562 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/10279 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* NFS-Ganesha : Use common meta-volume for shared storageMeghana Madhusudhan2015-04-142-18/+17
| | | | | | | | | | | | | | | A fixed name and mount point is used to share the common volume required by various components. Make appropriate changes on the NFS-Ganesha to accomodate the commom meta-volume as the shared storage. Change-Id: I9c87e486c2bb3a414f9773c74ed46e111f3c9c14 BUG: 1210344 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10211 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System
* Fix incorrect rfc.sh and checkpatch.pl use of "jenkins" instead of "gerrit"Justin Clift2015-04-131-5/+5
| | | | | | | | | Change-Id: I6e78477554097a2be5aad8e3fb196970fb30dac2 Signed-off-by: Justin Clift <justin@gluster.org> Reviewed-on: http://review.gluster.org/10203 Tested-by: NetBSD Build System Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* NFS-Ganesha : Fixing HA script invocation and othersMeghana Madhusudhan2015-04-132-12/+12
| | | | | | | | | | | | | | gluster features.ganesha disable failed invariably. And also, there were problems in unexporting volumes dynamically.Fixed the above problems. Change-Id: I29aa289dc8dc7b39fe0fd9d3098a02097ca8ca0c BUG: 1207629 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10199 Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System