1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

36 Commits

Author SHA1 Message Date
Mathieu Parent
6a03128c56 Improved check_ctdb
- increase verbosity with "-v"
- concat error messages (if there are several)
- handle 255 return code as warning (as it is the return code when any of the node is missing)
- read /etc/ctdb/nodes remotely (ctdb_check can be run on a non-ctdb host)

(This used to be ctdb commit cea81bdd503f6ef8b5bbd3582a8e0085bb02bc9f)
2013-10-24 16:54:08 +11:00
Mathieu Parent
27c2c61c21 Update Nagios check to work with ctdb versions past 30 Aug 2011
Because of commit a779d83a6213e2ba

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a4afe7af9c9391048d6f80135bbd5e15367770c7)
2013-07-11 15:18:06 +10:00
Amitay Isaacs
cc6772c968 ping_pong: Validate num_locks argument > 0
This fixes the floating point error if num_locks = 0.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 16afe36de52561a62372c14b567683dc898369d5)
2013-07-04 20:43:52 +10:00
Martin Schwenke
4a1eed5043 build: Separate autoconf macros for pmda
The pmda stuff is no longer built by default even if the headers are
available.  To build, run "configure --enable-pmda".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 194f7a0dec26d693a5f3e6734b1c82f61f8e4d19)
2013-05-28 14:24:16 +10:00
David Disseldorp
50bae99ac6 pmda: handle new ctdb_statistics format
The ctdb_statistics structure was recently changed. Update the PMDA to
dereference the new structure member names.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit e5a5ab53173d9aa4190ddf68c4ae316d4473eb56)
2013-05-26 23:54:47 +02:00
Michael Adam
05cf7bce49 utils🏓 add a -c switch to check the lock before reading/writing
This is to verify that the fcntl F_GETLK call reports F_UNLCK if called
from a process already holding a lock. This is for example used by samba's
strict locking code in combination with "posix locking = true".

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 4f42d17b74ce891691eee1cead498959cc8e4837)
2012-11-20 00:48:52 +01:00
Amitay Isaacs
4392591555 Remove explicit include of lib/tevent/tevent.h.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
2012-04-13 17:28:14 +10:00
Martin Schwenke
6a74638748 Clean up warnings: remove unused variable alen from scsi_io
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 79d31660c7e612f0290fd085203856ad9e70b26f)
2011-11-09 15:37:24 +11:00
Mathieu Parent
68d81587dc Nagios plugin for CTDB
This plugin is GPL2 or greater as generally found in Nagios.
(this is obviously compatible with GPL3 or greater).

(This used to be ctdb commit df1ac1cfd65f32743ca2588edfdad46ce5a4f03f)
2011-11-08 16:34:15 +11:00
David Disseldorp
a3357af926 pmda: Use upstream assigned PCP domain id
Also use saner PMIDs in the pmns file.

(This used to be ctdb commit dcf150f8165316fefd53f9eecb1437195e631da6)
2011-09-14 12:54:04 +02:00
David Disseldorp
66f92be635 pmda: handle struct latency_counter and add num_recoveries
Rebase the CTDB PMDA from 1.0.114 to master:
- Add tevent and ctdb_protocol includes
- Handle latency metrics now stored under struct latency_counter
- Add new metric for the num_recoveries counter

(This used to be ctdb commit 2165a6f5117a71f9f97f46be9708fa34c037e17c)
2011-09-06 14:01:18 +02:00
David Disseldorp
927abee4c1 pmda: document in README how to add a new metric
(This used to be ctdb commit b63333fb81aadc451df47c0c3c038e6165f0eac2)
2011-09-06 14:01:18 +02:00
David Disseldorp
88406169bd pmda: Use CTDB_PATH macro for default socket path
Also includes some code cleanup changes.

(This used to be ctdb commit 80ad2979804f5bba29020ace46e114a45fa6cb66)
2011-09-06 14:01:18 +02:00
David Disseldorp
11ffbf4a58 pmda: Pull ctdb statistics once per fetch
Currently ctdb statistics are pulled in the PMDA fetch callback, which
results in a CTDB_CONTROL_STATISTICS call for each metric.
Do this once per fetch instead, and have the per-metric callbacks pull
data from the last counter cache.

(This used to be ctdb commit 137b498c75c55c966999cd788f12ed9010cfed3a)
2011-09-06 14:01:18 +02:00
David Disseldorp
2f925f1e64 pmda: Attempt reconnects while ctdbd is unavailable
Attempt to reconnect to ctdbd on fetch while it is unreachable.

We must provide our own queue callback wrapper, as ctdb_client_read_cb()
exits on transport failure.

(This used to be ctdb commit 28df6fbf1273b8d095a2bc38dca6a6c35c5c31bd)
2011-09-06 14:01:18 +02:00
David Disseldorp
9699e5750d pmda: Initial ctdb pmda check-in
The CTDB Performance Metrics Domain Agent (PMDA) is compiled when
Performance Co-Pilot (PCP) header files are present.

The CTDB PMDA periodically requests runtime counters from ctdbd (similar
to ctdb statistics) and exports these values via PCP for capture and
charting etc.

(This used to be ctdb commit fe7f69d6fc37661c2f1caa11de4ed3a7940d0a2f)
2011-09-06 14:01:18 +02:00
Ronnie Sahlberg
6f80ff4109 From Elia Pinto <gitter.spiros@gmail.com>
We dont need to include getopt.h under AIX

(This used to be ctdb commit fcebbc3484ce56c57def745ea51c053dfb02a657)
2010-02-22 14:00:33 +11:00
Ronnie Sahlberg
85d67197fe From William Jojo <w.jojo[AT]hvcc.edu>
AIX dont have getopt.h by default.
Dont try including this file when building on AIX

(This used to be ctdb commit 06b33a826e71e1dd2f9e02ad614be55535d42045)
2009-06-04 09:41:05 +10:00
Ronnie Sahlberg
caf0e863a4 remove the obsolete ipmux component.
this is replaced by LVS since a long time

(This used to be ctdb commit dca41ec04788922ce5f4c52d346872b3e35f8cbb)
2009-05-25 12:33:52 +10:00
Sumit Bose
2fcedf6dac add missing checks on so far ignored return values
Most of these were found during a review by Jim Meyering <meyering@redhat.com>

(This used to be ctdb commit 3aee5ee1deb4a19be3bd3a4ce3abbe09de763344)
2009-05-21 11:22:21 +10:00
Michael Adam
60bfafbf10 ping pong: fix logic for mmap reads vs. preads
Michael

(This used to be ctdb commit 0c88fa41bc3c629052bc137ed30c473ed10522fd)
2009-05-13 16:13:14 +10:00
Michael Adam
c544371776 ping_pong: add GPL comment header with Tridge's copyright
Michael

(This used to be ctdb commit a87ef6a9206820d5110a7117240f743af010ff19)
2009-05-06 10:41:18 +10:00
Michael Adam
08cfdf0d63 ping_pong: get pread/pwrite prototypes from unistd.h
by defining _XOPEN_SOURCE to be 500 before including headers

Michael

(This used to be ctdb commit 96c79bddf7895e57ccf90f0d250bd08b7c4daf40)
2009-05-06 10:40:48 +10:00
Michael Adam
d68654ba5e ping_pong: reduce a couple of prototype warnings
Michael

(This used to be ctdb commit fce851621fe2099c9692acfbfaade24c3d69727a)
2009-05-06 10:40:08 +10:00
Michael Adam
bc6c3d03e8 add tridge's ping_pong.c to the utils folder
Michael

(This used to be ctdb commit fe59ecb697fb4686ad8ea2fe4ec1cc7b4629e74f)
2009-05-06 10:39:19 +10:00
Mathieu PARENT
c3a44fd815 smnotify: fix popt.h include to allow use of system lib
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit e391bde5ac743956fb30ede65030973a1f13dae5)
2009-02-04 00:48:56 +01:00
Ronnie Sahlberg
ef997d344f initial ipv6 patch
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 1f131f21386f428bbbbb29098d56c2f64596583b)
2008-08-19 14:58:29 +10:00
Ronnie Sahlberg
9aba594429 move the function to open a sending socket into the main executable since this function will dissapear soon...
(This used to be ctdb commit 7f4c7cf6355a88b1a02d3a4d1fa25427106953f9)
2008-05-14 15:33:01 +10:00
Ronnie Sahlberg
537841fadb use NF_DROP instead of NF_STOLEN when we tell the kernel to not worry
about this packet any more and just forget it ever saw it

(This used to be ctdb commit 42a2a777cbc15a8cbbea7ecf2fb1c6dafa242d0c)
2007-10-17 15:03:58 +10:00
Andrew Tridgell
574db736f2 improved handling of systems without libipq.h
(This used to be ctdb commit cfa8ddd3ca53c0160558137cccfc7e73e46ec36c)
2007-10-15 14:37:54 +10:00
Ronnie Sahlberg
292e9d9109 add an initial test version of an ip multiplex tool that allows us
to have one single public ip address for the entire cluster.

this ip address is attached to lo on all nodes but only the recmaster 
will respond to arp requests for this address.
the recmaster then runs an ipmux process that will pass any incoming 
packets to this ip address onto the other node sin the cluster based on 
the ip address of the client host


to use this feature one must
1, have one fixed ip address in the customers network attached 
permanently attached to an interface
2, set CTDB_PUBLI_INTERFACE=
   to specify on which interface the clients attach to the node
3, CTDB_SINGLE_PUBLI_IP=ip-address
   to specify which ipaddress should be the "single public ip address"




to test with only one single client,   attach several ip addresses to 
the client and ping the public address from the client with different -I 
options.   look in network trace to see to which node the packet is 
passed onto.

(This used to be ctdb commit 50d648c95e4e6d7c2867a034c2b550086d853320)
2007-10-08 14:05:22 +10:00
Andrew Tridgell
95f6328678 merge from volker
(This used to be ctdb commit 7007e4f2292aa96287b899d6b9e82c7b597ef58f)
2007-08-22 17:16:01 +10:00
Ronnie Sahlberg
6d5af34024 from Chris Cowan
patches to smnotify to make it compile under AIX.

On AIX, we need to specify $(POPT_OBJ) explicitely

On AIX we can not use the -C flag to rpcgen since it is not implemented

On AIX we must explicitely force an #include of rpc/rpc.h in the idl 
file since rpcgen does not automatically add it to the generated files

(This used to be ctdb commit 8c3e7ce645ec829bc465302831cc6b23452525d6)
2007-08-15 07:59:01 +10:00
Ronnie Sahlberg
5c1a7f19fc move scsi/scsi_io.c to utils/scsi/scsi_io.c
(This used to be ctdb commit 157e5a0e96af133d28a36847c82efd23fb2354e3)
2007-08-07 09:03:51 +10:00
Ronnie Sahlberg
9262e2ab8a dont wait for the default rpc timeout when trying to bing to a client.
abort after 3 seconds

fix makefile so that we generate the header before trying to compile 
smnotify.o

(This used to be ctdb commit bda310b74d6364bf88032874a1f3a2fb156f9736)
2007-08-03 10:47:37 +10:00
Ronnie Sahlberg
da1d5fb2cc add a small tool that can send smnotify packets
(This used to be ctdb commit 2bf3e1311ed9c68eeae9e18344da9ca08f0d4297)
2007-08-03 10:18:48 +10:00