summaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
* NFS-Ganesha : scripts related changes for supporting multiple export entires ↵Jiffin Tony Thottan2016-03-013-50/+68
| | | | | | | | | | | | | | | | for volume Previously script such as dbus-send.sh, ganesha-ha.sh can handle only one EXPORT{} block. Change-Id: I2286af4877f96f4334435818f67beea87efa2b1f BUG: 1275966 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13283 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: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* quota: heal object-limit on a root dir of a newly added brickvmallika2016-02-271-33/+28
| | | | | | | | | | | | | | | When a new brick is added, xattr trusted.glusterfs.quota.limit-objects is not healed on a root directory. This patch will fix the problem Change-Id: I776609ebf4d7822c541b6262e63d465ea3a86db4 BUG: 1306220 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13422 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: Bug fixes for IPv6 supportNithin D2016-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Glusterd not working using ipv6 transport. The idea is with proper glusterd.vol configuration, 1. glusterd needs to listen on default port (240007) as IPv6 TCP listner. 2. Volume creation/deletion/mounting/add-bricks/delete-bricks/peer-probe needs to work using ipv6 addresses. 3. Bricks needs to listen on ipv6 addresses. All the above functionality is needed to say that glusterd supports ipv6 transport and this is broken. Fix: When "option transport.address-family inet6" option is present in glusterd.vol file, it is made sure that glusterd creates listeners using ipv6 sockets only and also the same information is saved inside brick volume files used by glusterfsd brick process when they are starting. Tests Run: Regression tests using ./run-tests.sh IPv4: Ran manually till tests/basic/rpm.t . IPv6: (Need to add the above mentioned config and also add an entry for "hostname ::1" in /etc/hosts) Started failing at ./tests/basic/glusterd/arbiter-volume-probe.t and ran successfully till here Unit Tests using Ipv6 peer probe add-bricks remove-bricks create volume replace-bricks start volume stop volume delete volume Change-Id: Iebc96e6cce748b5924ce5da17b0114600ec70a6e BUG: 1117886 Signed-off-by: Nithin D <nithind1988@yahoo.in> Reviewed-on: http://review.gluster.org/11988 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> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* geo-rep: Script to Schedule Geo-replicationAravinda VK2016-02-162-2/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script can be used to run Geo-replication when required. can be scheduled using cron job to run Geo-replication. This script does the following, 1. Stop Geo-replication if Started 2. Start Geo-replication 3. Set Checkpoint 4. Check the Status and see Checkpoint is Complete.(LOOP) 5. If checkpoint complete, Stop Geo-replication Usage: python /usr/share/glusterfs/scripts/schedule_georep.py <MASTERVOL> \ <SLAVEHOST> <SLAVEVOL> For example, python /usr/share/glusterfs/scripts/schedule_georep.py gv1 fvm1 gv2 To schedule the Geo-replication to run once in a day using cron, # Run daily at 08:30pm 30 20 * * * root python /usr/share/glusterfs/scripts/schedule_georep.py \ --no-color gv1 fvm1 gv2 >> /var/log/glusterfs/schedule_georep.log 2>&1 BUG: 1300956 Change-Id: I6b1e2ddbf7fc09ef621499b57ae230fd4dbbd9a6 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/13279 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* quota: fix quota hook script for add-brickvmallika2016-02-081-26/+25
| | | | | | | | | | | | | | | Hook script should not call any CLI commands as this can cause parallel operation problem, so remove quota list command from the script Change-Id: I76a364133403371b172e063abd5f742075b20a2f BUG: 1294637 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13110 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>
* extras/devel-tool: Added gdb_macros for debuggingRajesh Joseph2016-02-011-0/+84
| | | | | | | | | | | | | | provided following functions in the script 1) print dictionary (dict_t) items 2) print list members (only address) Change-Id: I5befb2dcdbf258ab3001ff25212a5862b9cc5321 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/13289 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* Point users of glusterfs-hadoop to the upstream projectNiels de Vos2016-01-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The code we have in glusterfs-hadoop/ is old and should not be used anymore. The plugin for Hadoop HCFS is maintained at the glusterfs-hadoop project on GitHub: https://github.com/gluster/glusterfs-hadoop Removing the old code from the repository, and adding a pointer to the projects wiki in the MAINTAINERS file. Change-Id: Ia86d08fb0c73a3f75b706b1e0793e3d7a0f4984c BUG: 1301352 CC: Jay Vyas <jvyas@redhat.com> CC: Bradley Childs <bchilds@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13286 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.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>
* hook-scripts: S29CTDBsetup: clean and fix mount commands and optionsMichael Adam2016-01-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This refactors the mount options of S29CTDBstart.sh into one variable, removing the superfluous mentioning of 'default'. The manual mount command is fixed to: - also use the common options, thereby adding _netdev,transport=tcp (while this does not have an effect for the _netdev option, it makes a difference for the transport option), - also use the HOSTNAME variable just like the fstab entry, - use a "/" in the remote location specification. Hence it now behaves identically to the fstab mount. Change-Id: Ibb7613b1b1278ab13745846baa79268db226ef19 BUG: 1295520 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13170 Tested-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> 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: Niels de Vos <ndevos@redhat.com>
* scripts: correct the usage of -perm in backend-cleanup.shNiels de Vos2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | extras/backend-cleanup.sh uses deprecated find -perm +xxx syntax: find [...] -perm +01000 [...] This GNU extension syntax is deprecated and does not work in GNU findutils 4.5.11 and later. Please change to find -perm /xxx instead. The new syntax was introduced in 4.2.25 (October 2005) and should therefore be available on any relevant system. BUG: 1294223 Change-Id: Ice742957dd24f0ab4f70a8569dff6f2536e9ac1e Reported-by: Andreas Metzler <ametzler@bebt.de> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13080 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* scripts: prevent running 'showmount' from the start/post hook scriptNiels de Vos2016-01-121-17/+37
| | | | | | | | | | | | | | | | | | | | The 31ganesha-start.sh hook script tries to run 'showmount' to see if the volume that is getting started should get exported by NFS-Ganesha. It was reported that this caused the 'gluster volume start ...' command to hang in case rpcbind is not running. Instead of running 'showmount', we can use DBus to contact NFS-Ganesha directly, and request the available exports. This will immediately fail in case NFS-Ganesha is not running. BUG: 1294446 Change-Id: I3aba1f86fead67116ca5adb1864a8be626c334fa Reported-by: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13098 Tested-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* hook-scripts: remove RHS-2.0 reference from S29CTDB scriptsMichael Adam2016-01-112-2/+1
| | | | | | | | | | | | | This is old. And such downstream reference should not appear in upstream code. Change-Id: Ifa0664dae0fe5ac913a49afe2fefa43b0112b024 BUG: 1295505 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13169 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* hook-scripts: remove outdated comment from C29CTDB start sciptMichael Adam2016-01-101-2/+0
| | | | | | | | | | | | This script does not change Samba's config any more. Change-Id: Ie6001f9a49006f95b291e24252dc362f2a7db14c BUG: 1295504 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* extras: add script to analyze regression-test failuresJeff Darcy2016-01-081-0/+64
| | | | | | | | | | | | | | | Often a test will fail quite frequently, but not so frequently that it will fail twice in a row for the same patch. This allows it to "fly beneath the radar" for quite a long time, slowing project-wide progress until somebody crawls through the logs looking for patterns. This patch adds a script to automate some of that process. Change-Id: Ic74fbf6b0bfa34bffd9cb109fd51db019053e2cc Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12510 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* build: use 'make install' to install the hook scriptsNiels de Vos2015-12-266-0/+18
| | | | | | | | | | | | | | | | | The installation should be the same on all distributions, and doing manual installation of files in the .spec is very ugly. This change adds the rules so that 'make install' places the hook scripts in the right location. Also, the hook script(s) for NFS-Ganesha should be part of the glusterfs-ganesha sub-package and got moved there. BUG: 1174765 Change-Id: Iba25a7a5112c7d40db4c10ff4a5ac7a5fb4f7c4e Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13072 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* hook-scripts: fix S30Samba scripts on systemd systemsMichael Adam2015-12-173-3/+3
| | | | | | | | | | | | | | | | /etc/init.d/smb does not exist on systemd systems. Using "service smb <COMMAND>" is the portable way. It calls init scripts on sysv systems, and redirects to systemctl on systemd systems. Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615 BUG: 1290604 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12945 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* hook-scripts: don't let ctdb script change samba configMichael Adam2015-12-162-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several reasons why the behaviour in the hook scripts was bad: 1. A samba installation is clustered or non-clustered. That does not change because of the availability of the CTDB lock-volume. If the lock-volume is not available (and hence CTDB is not available or not healthy), then Samba won't be operational. But turning it into a non-clustered Samba-installation can in the worst case lead to data corruption if clients manage to access the same files (on share volumes). Hence 'clustering = yes/no' in Samba's config should not be touched. In particular, Samba should not be stopped/started by the hook script. If needed, then ctdb will take care of it. 2. Changing the idmap configuration is potentially dangerous as well. In particular the used tdb2 backend is legacy nowadays and should not be used any more in new installs. (I stems from the times when ctdb could not host persistent databases.) Changing the idmap can result in loss of access to files or in giving access to files where it is not intended. 3. The pattern used for detecting need for change is fragile. It may or may not play well possible manual changes to smb.conf. This change removes the parts that change the smb.conf file and start or stop Samba from the S29CTDB* hook scripts. Change-Id: I72f7aabafa8f089da4531fca2572a72c22825bcc BUG: 1290151 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12930 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* glusterd: disable ping timer b/w glusterd and make epoll thread count to 1Gaurav Kumar Garg2015-12-031-1/+2
| | | | | | | | | | | | | | | | Currently glusterd is crashing when enable/disable heal and i/o is in progress on the fuse mount. This is because of by default multi thread epoll in glusterd is 2. Workaround is to make epoll thread to 1 and set ping-timeout to 0 Change-Id: Ifbe9b43a361c5409b707539f0ee831c610a5c36b BUG: 1288059 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12874 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>
* extras: fix deprecation warining in checkpatch.plMichael Adam2015-12-021-5/+5
| | | | | | | | | | | | | | | | | | Left braces in patterns need to be escaped. Otherwise, for perl >= 5.16, we get a warning: "Unescaped left brace in regex is deprecated, passed through in regex;" This patch fixes the relevant braces. Hence perl -c ./examples/checkpatch.pl is clean again. Change-Id: I938c9c262239f53de57d30a2cff7030f22e63dc1 BUG: 1198849 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12828 Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd/geo-rep: Adding ssh-port option for geo-rep createKotresh HR2015-11-181-7/+21
| | | | | | | | | | | | | | | | | | | Geo-replication uses default ssh port 22 for setup. i.e., to distribute ssh keys to slaves. In container environments, custom port number might be used. Hence to support custom port number for ssh, option is provided in geo-rep create command to take the same. Change-Id: I0fb61959b1c085342b8e4c21ac4e076fba5462f1 BUG: 1276028 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12504 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* glusterd.service: Ensure rpcbind is started before glusterdKaushal M2015-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | Having the rpcbind.service under the `After` option only ensures that glusterd.service is started after rpcbind.service if both are enabled/started at the same time. It doesn't ensure that starting glusterd.service will start rpcbind.service. The systemd.unit(5) man page suggests to use both the `Requires` and `After` options to ensure that rpcbind is started before glusterd, whenever glusterd is started. BUG: 1282915 Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/12605 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* extras/hooks: Fix parsing of args in S30samba-set.shRaghavendra Talur2015-11-161-5/+9
| | | | | | | | | Change-Id: I75756f44757a144b0ed229fcc0e29a273fc75886 BUG: 1242892 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11668 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build: MKDIR_P is not defined for Makefiles, use mkdir_p insteadNiels de Vos2015-11-103-5/+5
| | | | | | | | | | | Change-Id: Id6d5263eb7b1c53e72a7668e716e9cc4e34b82cd Reported-by: Milind Changire <mchangir@redhat.com> BUG: 1198849 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12553 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* extras: Exit with SUCCESS if no processes to stopShubhendu Tripathi2015-11-101-2/+12
| | | | | | | | | | | | | | This script might be executed even when there are no valid processes running to be stopped. In this scenario, the script should return with SUCCESS Change-Id: Ia293214a4b5052bc4bef9769f197f7b05c55ffe9 BUG: 1277533 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: http://review.gluster.org/11739 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* debug/io-stats: Add FOP sampling featureRichard Wareing2015-11-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Using sampling feature you can record details about every Nth FOP. The fields in each sample are: FOP type, hostname, uid, gid, FOP priority, port and time taken (latency) to fufill the request. - Implemented using a ring buffer which is not (m/c) allocated in the IO path, this should make the sampling process pretty cheap. - DNS resolution done @ dump time not @ sample time for performance w/ cache - Metrics can be used for both diagnostics, traffic/IO profiling as well as P95/P99 calculations - To control this feature there are two new volume options: diagnostics.fop-sample-interval - The sampling interval, e.g. 1 means sample every FOP, 100 means sample every 100th FOP diagnostics.fop-sample-buf-size - The size (in bytes) of the ring buffer used to store the samples. In the even more samples are collected in the stats dump interval than can be held in this buffer, the oldest samples shall be discarded. Samples are stored in the log directory under /var/log/glusterfs/samples. - Uses DNS cache written by sshreyas@fb.com (Thank-you!), the DNS cache TTL is controlled by the diagnostics.stats-dnscache-ttl-sec option and defaults to 24hrs. Test Plan: - Valgrind'd to ensure it's leak free - Run prove test(s) - Shadow testing on 100+ brick cluster Change-Id: I9ee14c2fa18486b7efb38e59f70687249d3f96d8 BUG: 1271310 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12210 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* extras/hookscripts : introducing additional check in S31ganesha-start.shJiffin Tony Thottan2015-09-241-1/+4
| | | | | | | | | | | | | | | | | New export file with default configuration will be created for a volume when it is started again. This patch will create new export file only when it is not present. This change is required for scenarios such as snapshot restore , node reboot etc. Change-Id: I34123911f176dcb29d5c016aa097af3a3b2c727b BUG: 1261444 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/12159 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: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* systemd/spec/glusterd: Adding EnvironmentFile in glusterd systemctrl service ↵anand2015-09-151-1/+3
| | | | | | | | | | | | | | | | | | file. Issue: glusterd was not running in debug mode, this is because of "systemctrl start glusterd" was not reading configuration from glusterd-sysconfig file. Fix: Set glusterd-sysconfig file as "EnvironmentFile" and pass args to glusterd. Change-Id: I6a032a2e86e5a25c39199ddf953bfbd6590d53b6 BUG: 1263087 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/12175 Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* firewall/spec: Create glusterfs firewall service if firewalld installed.anand2015-09-103-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It creates glusterfs firewall service during installation. glusterfs service : It contains all default ports which needs to be opened. During installation glusterfs.xml is copied into firewall service directory(/usr/lib/firewalld/services/). Note: 1.For bricks: It opens the 512 ports, if brick is running out side this range(>49664) then admin need to open the port for that brick. 2.By default this service is not enabled in any of zone. To enable this service(glusterfs) in firewall: 1. Get active zone(s) in node firewall-cmd --get-active-zones 2. Attached this service(glusterfs) to zone(s) firewall-cmd --zone=<zone_name> --add-service=glusterfs --To apply runtime firewall-cmd --permanent --zone=<zone_name> --add-service=glusterfs --To apply permanent Note: we can also use firewall-config which gives GUI to configure firewall. Change-Id: Id97fe620c560fd10599511d751aed11a99ba4da5 BUG: 1253967 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11989 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* bash-completion: Swap order of characters in egrep bracket expressionPaul Stauffer2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With glusterfs-cli installed, bash tab completion fails to work and prints an error message: $ gluster volgrep: Invalid range end ^C The problem is caused by the ordering of characters within an egrep bracket expression in the "_gluster_completion()" function defined in /etc/bash_completion.d/gluster. The file contains this line: egrep -ao --color=never "([A-Za-z0-9_-.]+)|[[:space:]]+|." | \ And egrep is interpreting the "-" character in that bracket expression as indicating a range is being requested, "_-." Fortunately, "_" actually comes after ".", this range expression is invalid, and egrep throws the error instead of silently not doing what was intended. The fix is simply to swap the positions of "-" and "." in that bracket expression: egrep -ao --color=never "([A-Za-z0-9_.-]+)|[[:space:]]+|." | \ With this change, bash tab completion works as intended. Change-Id: Iace2d57a1122b4530987ba6f5f5558b56b094665 BUG: 1243108 Signed-off-by: Paul Stauffer <paulds@horde.com> Reviewed-on: http://review.gluster.org/11939 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* all: reduce "inline" usageJeff Darcy2015-09-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | There are three kinds of inline functions: plain inline, extern inline, and static inline. All three have been removed from .c files, except those in "contrib" which aren't our problem. Inlines in .h files, which are overwhelmingly "static inline" already, have generally been left alone. Over time we should be able to "lower" these into .c files, but that has to be done in a case-by-case fashion requiring more manual effort. This part was easy to do automatically without (as far as I can tell) any ill effect. In the process, several pieces of dead code were flagged by the compiler, and were removed. Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155 BUG: 1245331 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/11769 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* snapshot/scheduler: Check if volume exists before adding/editing schedulesAvra Sengupta2015-08-231-21/+67
| | | | | | | | | | | | | | | 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: 1213349 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11830 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: Output correction of initialisationAvra Sengupta2015-08-231-2/+2
| | | | | | | | | | | Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923 BUG: 1218164 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11924 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>
* rpm: include required directory for glusterfindNiels de Vos2015-08-192-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: 1225465 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 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* build: scripts are not installed with +x bitKaleb S. KEITHLEY2015-07-313-3/+3
| | | | | | | | | | | | | scripts listed in Makefile.am as foo_DATA, should be foo_SCRIPTS to be installed +x Change-Id: Ib9b98efcea968c03b574726bdc0d4f76cdfd1dc1 BUG: 1225018 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11806 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* extra: "enable-shared-storage" key should create shared-storageGaurav Kumar Garg2015-07-131-1/+1
| | | | | | | | | | | | | | | Currently while creating shared storage it accept only "cluster.enable-shared-storage" key. It should also accept "enable-shared-storage" key. Change-Id: I4c68782f4b7927ec8cd725e411b0b9db17d9c48d BUG: 1238224 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11491 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
* NFS-Ganesha : Add-node does not copy "exports" directory correctlyMeghana M2015-07-101-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. Change-Id: I539d1d525cc5614594b76f2cff1ac93a926712cf BUG: 1241895 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11618 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" Change-Id: I4ac97b1b5ee4f5a7e448a351b7c6270385dffe61 BUG: 1241480 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11594 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.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 Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd BUG: 1241133 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11581 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: Niels de Vos <ndevos@redhat.com>
* snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_fileAvra Sengupta2015-07-081-6/+6
| | | | | | | | | | | | | | | | | | | for 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: 1239269 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11535 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 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: 1218573 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11533 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* NFS-Ganesha : Unexport fails after S31ganesha-start script is runMeghana M2015-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: Ibf639eb3556b1e51dd8dcb0c784a6a7f07badb97 BUG: 1238054 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11477 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha: Fix '/var/lib/nfs/statd/state' path creationSoumya Koduri2015-06-301-3/+5
| | | | | | | | | | | | | | '/var/lib/nfs/statd/state' which contains NSM state number should be a file instead of directory. Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b BUG: 1237174 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11468 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* NFS-Ganesha : Exporting volume failsMeghana M2015-06-292-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. Change-Id: I26a68578551b6e38e49a9997e6f6f983fd668971 BUG: 1236561 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11456 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : Automatically export volume after volume restartMeghana M2015-06-261-1/+1
| | | | | | | | | | | | | The export file was not getting created in the correct path. Fixing the path in this patch. Change-Id: If624266e1a934514868affb712514881d10239dc BUG: 1231738 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11432 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha: fix delete-nodeKaleb S. KEITHLEY2015-06-261-44/+55
| | | | | | | | | | | | | | | | | N.B. 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 Change-Id: I964bb72a76ee635b5fc484ec5b541e69eeececcd BUG: 1234474 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11353 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* geo-rep: Fix ssh issue in geo-repKotresh HR2015-06-251-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. Change-Id: I75e16d22f7a168de6c13b0c7571a7ab75761ae0d BUG: 1235359 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11383 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: darshan n <dnarayan@redhat.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 utilizing two other scripts that are already in place. Making a few changes to make sure that "--help" doesn't throw unnecessary error messages. Change-Id: I6559b89e858526717168ba286e1ff7d9977097c6 BUG: 1233624 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11331 Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gluster/shared_storage: Add/Remove shared storage from /etc/fstab during ↵Avra Sengupta2015-06-221-0/+5
| | | | | | | | | | | | | | | | enable/disable 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: 1231876 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11272 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* common-ha : Fixing add node operationMeghana M2015-06-191-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. Change-Id: Ie55138e2657d22298d89db1c08f2e17930686bd6 BUG: 1233246 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11316 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* common-ha: cluster setup issues on RHEL7Kaleb S. KEITHLEY2015-06-193-14/+35
| | | | | | | | | | | | | | | | | | | | * 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: I575aa13c98f05523cca10c55f2c387200bad3f93 BUG: 1229948 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11257 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* common-ha: cluster HA setup sometimes failsKaleb S. KEITHLEY2015-06-181-4/+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 Change-Id: I1a52afbf398a024cdff851d0c415d8363f699c90 BUG: 1232001 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11281 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>