summaryrefslogtreecommitdiff
path: root/ctdb/config/statd-callout
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-scripts: Use "ctdb ip all" instead of "ctdb ip -n all"Martin Schwenke2015-10-231-1/+1
| | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Oct 23 06:44:45 CEST 2015 on sn-devel-104
* ctdb-scripts: Remove 60.ganesha, replace with callout for 60.nfsMartin Schwenke2015-07-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | This isn't a straightforward move of code from 60.ganesha to the callout. Simplifications have been made to allow better interoperation with the new NFS checking logic. The following configuration variables have been removed: CTDB_GANESHA_REC_SUBDIR Edit NFS ganesha callout to change this location CTDB_NFS_SERVER_MODE, NFS_SERVER_MODE Use CTDB_NFS_CALLOUT instead CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK, CTDB_SKIP_GANESHA_NFSD_CHECK Disable the corresponding .check file instead Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Parameterise 60.nfs with $CTDB_NFS_CALLOUTMartin Schwenke2015-07-141-7/+7
| | | | | | | The goal is to have a single NFS eventscript. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Changed uses of "ctdb xpnn" to ctdb_get_pnn()Martin Schwenke2015-04-271-4/+4
| | | | | | | | | | "ctdb xpnn" does not work when sysctl net.ipv4.ip_nonlocal_bind=1, since it determines the node by attempting to bind to each addres in the nodes file. The solution is to not use "ctdb xpnn". After the initial call, ctdb_get_pnn() will be more efficient that "ctdb xpnn". Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Change statd-callout to be more scalableMartin Schwenke2015-03-041-57/+83
| | | | | | | | | | | | | | | | Updating ctdb.tdb on each add-client, del-client and each delete during notify was too ambitious. Persistent transactions do not perform well enough to do this. Revert to having add-client and del-client create touch files. Each monitor event calls "statd-callout update" to convert touch files into ctdb.tdb records. Update testcases to do the "update" and add an extra test. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Fix a regression in statd-calloutMartin Schwenke2015-03-041-1/+1
| | | | | | | | | | | | | | | | Commit 4638010abb116aed0c180207aaa11475277aecb7 changed from using gensub() to gsub() in awk. However, it didn't halve the number of backslashes in the target strings. This is necessary because backslash is used in gensub() target strings to allow substitution of text matching parenthesised subexpressions. This is not the case with gsub(). So, halve the number of backslashes in the target string where gsub() is used in statd-callout. This is the only target string broken by changes made by the above commit Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Don't use the GNU awk gensub() functionMartin Schwenke2015-01-091-1/+3
| | | | | | | | | | | | | This is a gawk extension and can't be used reliably if just running "awk". It is simple enough to switch to using the standard sub() and gsub() functions. The alternative is to switch to explicitly running "gawk". However, although the eventscripts aren't exactly portable, it is probably better to move closer to portability than further away. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Update eventscripts to use ctdb -X instead of ctdb -YMartin Schwenke2014-12-051-4/+4
| | | | | | | Also update associated eventscript unit tests and ctdb stub. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Add an early exit to statd-callout's notify caseMartin Schwenke2013-11-271-0/+1
| | | | | | | | If $statd_state is empty then the loop will run once and print spurious errors. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Rewrite statd-callout to avoid 10 minute lagMartin Schwenke2013-11-271-107/+94
| | | | | | | | | This is naive and assumes no performance problems when updating persistent DBs. It also does no error handling. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* eventscripts: Deprecate NFS_SERVER_MODE, use CTDB_NFS_SERVER_MODE insteadMartin Schwenke2013-10-221-1/+1
| | | | | | | | All CTDB configuration variables should start with CTDB_. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f12658aff125996ae45eea23241d8c3d0567b893)
* statd-callout: Make sure statd callout script always runs as rootAmitay Isaacs2013-04-081-0/+3
| | | | | | | | | | | In RHEL 6+, rpc.statd runs as "rpcuser" instead of root as on RHEL 5. This prevents CTDB tool commands talking to daemon since "rpcuser" cannot access CTDB socket. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fe8c4880b371492a38554868d4ca10918c54e412)
* Changes for unobtrusive recovery and new method for health check.Srikrishan Malik2013-01-111-5/+1
| | | | | | | | | | | | Unobtrusive recovery: Ganesha will not be restarted on failovers. Ganesha health: Use the counters in /var/lib/nfs/ganesha_local to track progress instead of the null call which can timeout if the server is too busy. Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com> Signed-off-by: Lance Russell <lancerus@us.ibm.com> (This used to be ctdb commit 0e651e9da0f1f3c836b4474612ab13d0ccd272d9)
* scripts: statd-callout should calculate CTDB_BASE if it is not setMartin Schwenke2013-01-081-3/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 376015ba5ad6b7703ae9949a1d40a0c72dfaba0c)
* statd-callout: Fix a bug in the calculations of $STATEMartin Schwenke2012-07-261-3/+2
| | | | | | | | | | | | It is just meant to be even, so divided *and* multiplied by 2. Use $(( )) to make it more readable. While touching this code, make the related calculation a bit more readable too. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25d45e69f4ffc2b26061ac13038d52a353e79e61)
* Eventscripts: Modernise 60.ganesha to match 60.nfsMartin Schwenke2012-05-161-5/+9
| | | | | | | | | Originally from Srikrishan Malik <srikrishan.malik@in.ibm.com> with some style changes by me. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 637cab6304dae66b85668506028c76ea1ee88980)
* Eventscripts: remove unnecessary absolute paths from external commands.Martin Schwenke2011-08-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | For eventscript unit testing it will be necessary to override external commands to allow stub implementations to be used. If absolute paths aren't used then this can be done using either a fake bin/ subdirectory or by using shell functions. This removes all of the simple cases of absolute paths. Signed-off-by: Martin Schwenke <martin@meltin.net> Conflicts: config/ctdb.init config/events.d/50.samba Keep old code but remove absolute paths. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 05851d50b0078de8bf4691442d718825adca6fe8)
* Set $CTDB_VARDIR in the functions file.Martin Schwenke2011-08-031-4/+0
| | | | | | | | | This will be needed when eventscripts that use it are called externally. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ebd53b66b0cc66d9d04830781886234167fc2164)
* Dont store temporary runtime data in $CTDB_BASE/stateRonnie Sahlberg2010-09-031-19/+23
| | | | | | | | | since that will usually be /etc/ctdb/state and storing this under /etc is just wrong. Add a new variable CTDB_VARDIR that defaults to /var/ctdb and store the data there instead. (This used to be ctdb commit 516423c25afa9861d9988096efa8a4a2b12b31b1)
* make sure all statd state directories exist before we try to reference themRonnie Sahlberg2010-09-011-0/+5
| | | | | | or else tar and friends will throw an error in the log (This used to be ctdb commit 96cbd2c0aa9a4641a42b3c33374675fa732ed1e5)
* Remove the dependency on the underlying cluster filesystem for handlingRonnie Sahlberg2010-08-301-57/+97
| | | | | | | | | the clusterwide persistent data associated with the lock manager and statd notifications. Use persistent databases to store this data instead of a shared directory. (This used to be ctdb commit fc0678d351187cfa4c71123f97c0f493aacd5d16)
* config: load 'ctdb' config before 'nfs' config in statd-calloutStefan Metzmacher2009-12-161-0/+1
| | | | | | | | | | | | | All other scripts do 'loadconfig ctdb' before any other 'loadconfig foo' call. I think we should do the same in statd-callout. Otherwise it's very confusing, if you have configured some Options in /etc/sysconfig/ctdb, but /etc/ctdb/statd-callout doesn't notice them. metze (This used to be ctdb commit 10d95581fb90bfdf58ec32345c4e36c27acf4f37)
* More untested eventscript factorisation.Martin Schwenke2009-11-191-2/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ac655b0a65b32d809d47fec9821f7f31bb2fe2a7)
* add helpers to stop/start nfs lockmanager on different platformsRonnie Sahlberg2008-02-111-2/+2
| | | | (This used to be ctdb commit 3b797d851bd4bdb8ec2b3981061c668d2cf0f97c)
* dont use an absolute pathname for the touch commandRonnie Sahlberg2008-02-071-1/+1
| | | | (This used to be ctdb commit dbfa5cb7f91b5c3c7a2dcf337f60b5c4c188a688)
* dont use an absolute path for the basename commandRonnie Sahlberg2008-02-071-6/+6
| | | | (This used to be ctdb commit 2519d30162fa3e9d5d81efd374543a2e4dfce545)
* dont set parameters in statd-callout if they should be set they Ronnie Sahlberg2007-10-221-1/+1
| | | | | | bshould be set from 10.interfaces (This used to be ctdb commit 0c7c2dae0a976922de58793d576855bc37cd38e1)
* dont set some of the sysctl variables in statd-callout. these are Ronnie Sahlberg2007-10-211-3/+3
| | | | | | | | | | mainly useful for avoiding ack-storms when doing very rapid failover/failback during testing but should not be required in real-world. this gets rid of a lof of annoying messages from the messages file (This used to be ctdb commit 50d289dcce2caa7c7be9b6faa3b38b69c2237038)
* cope with non-standard install dirs in event scriptsAndrew Tridgell2007-09-141-5/+9
| | | | (This used to be ctdb commit 52fff5345873690a9cc86495f414343eaa3bd540)
* change the signature to ctdb_sys_have_ip() to also return:Ronnie Sahlberg2007-09-101-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | a bool that specifies whether the ip was held by a loopback adaptor or not the name of the interface where the ip was held when we release an ip address from an interface, move the ip address over to the loopback interface when we release an ip address after we have move it onto loopback, use 60.nfs to kill off the server side (the local part) of the tcp connection so that the tcp connections dont survive a failover/failback 61.nfstickle, since we kill hte tcp connections when we release an ip address we no longer need to restart the nfs service in 61.nfstickle update ctdb_takeover to use the new signature for ctdb_sys_have_ip when we add a tcp connection to kill in ctdb_killtcp_add_connection() check if either the srouce or destination address match a known public address (This used to be ctdb commit f9fd2a4719c50f6b8e01d0a1b3a74b76b52ecaf3)
* add a short delay after stopping nfslock to make it less likely that Ronnie Sahlberg2007-09-071-6/+9
| | | | | | "weird" things happen (This used to be ctdb commit 4934c083cbcc19714094e08a0b7da1fb6fdc8a5a)
* 60.nfs:Ronnie Sahlberg2007-09-071-11/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we must always restart the lockmanager when the cluster has been reconfigured and ip addresses has changed. This is to make sure we get a clusterwide grace period for nfs locking. if we dont do this and only restart locking on the nodes that were direclty affected, a different client can take out a conflicting lock from a different node before affected clients has had a chance to reclaim all the locks lost during reconfigure. grace period on rhel5 kernel has bene increased to 90 seconds! statd-callout: we must restart lockmanager to ensure a clusterwide grace period for nfs. this makes locking "more correct" for nfs clients and prevents other clients/nodes from taking out a conflicting lock while a different client/node tries to reclaim lost locks. This makes it "almost consistent" for NFS clients but there is still the possibility that a cifs client can take out a conflicting lock before an nfs client has had a chance to reclaim an existing lock. This can not be solved with anything less than making the kernel nfs lock manager "samba aware" and making samba aware of the internal state of the kernel lock manager so that they can cooperate. we can not just stop/start the lockmanager back to back in rhel5 since if they are stopped/started too close to eachother then when the new lockmanager upon starting up sends out statd notifications two things can happen: 1, new lockmanager sends out notification BEFORE it has registered with portmapper leading to lockmanager starts lockmanager sends notification to the client client tries to recover the lock and tries to portmap the lockmanager port on the server. server is not (yet) registered with portmapper and server responds "no such program" to hte clients request to discover where lockmanager is. client then just completely gives up reclaiming the lock and doesnt even reattempt the portmapper call after some timeout. ==> lock reclaim failed. 2, if they are started back to back, and a client tries to reclaim the lock the lockmanager sometimes sends two responses back to back to the client. one with status NLM_GRANTED (==you got the lock reclaimed) and one with status NLM_DENIED (==you could not get the lock reclaimed) This confuses the client and leads to the server thinking that the client does have the lock and the client thinking it has not got the lock and orphaned locks result. We also send out additional notification messages of different formats to allow more legacy clients to interoperate with locking. (This used to be ctdb commit 13208c1aab2942e28dff87e38e6794bf0c026033)
* improve the handling of hosts to notify with statdRonnie Sahlberg2007-09-061-6/+8
| | | | (This used to be ctdb commit cc87bda7e344bc777b9620a6211e62de4dce4e3b)
* do not restart lockd/statd when we takeover an ip address this is Ronnie Sahlberg2007-08-041-8/+11
| | | | | | | | | | | | | overkill since 1, we now kill the tcpconnections for lockd in 60.nfs 2, rpc.statd on linux sends out the notifications using the wrong interface anyway which breaks a lot of clients including linux ! use our own smnotify tool instead of sm-notify (This used to be ctdb commit 0163ad0ec01be6189a98ea91e5cec40f6750218f)
* make the init scripts more portable about location of system config filesAndrew Tridgell2007-06-031-2/+2
| | | | (This used to be ctdb commit 65f3e2bc722e314b2c51c3bfdc544b408a8a64cf)
* docs on how to use statd-calloutAndrew Tridgell2007-06-021-1/+4
| | | | (This used to be ctdb commit 4a75111b4f3f93dc42c9ced2d23f3cc933712017)
* move config files to config/ directoryAndrew Tridgell2007-06-021-0/+43
(This used to be ctdb commit f95de519b885c8e1f40df0cda70fd796e479a22a)