| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
An imbalance exceeding the hard limit, as specified by -H (and
defaulting to 1), now causes termination when -x is specified.
Imbalances exceeding the soft limit, as specified by -S (and
defaulting to 1), are counted and printed in the statistics summary.
A side-effect is that imbalances less than 2 are no longer rounded
down to 0, since we want to see them in the stats.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b5e9a4c50eedb8cc786c52af06352788ca25f51e)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add -L/--lcp2 option and implement LCP2 algorithm as an alternative to
the basic non-deterministic algorithm.
Existing examples will break if used with LCP2 since it needs real IP
addresses.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 22b14e1a887f0479cc75ed9027af5cc24797f217)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 68a49739763b7125382186504b9cb9b770cfde0e)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4ff3b73b1ccb795fac98b26e038f41f5e32f0d6b)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The hacks were attempts at improving the deterministic IPs algorithm
but they didn't work.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6034de0e24438e012f9f1d2065531b1ce467ac52)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
-v can now be provided more than once to increase verbosity.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ce4fb56c9972a854bd139429b6f4a26e8d5c3956)
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
This makes it 2, since this error corresponds loosely to ENOENT.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1bf289abdd3067a40e9a67091aba78222d13eddf)
|
| | |
| | |
| | |
| | | |
(This used to be ctdb commit 771b1e9c2e694ccc8825fb8088174c122532e74d)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the last IP address on an interfaces is removed then that
interfaces should no longer be checked by 10.interfaces. However,
"ctdb ifaces" still lists such interfaces so they are currently
checked.
The problem really needs to be addressed in ctdbd but a neat quick
eventscript fix will be minimally invasive...
This changes the code to use "ctdb -Y ip -v" instead of "ctdb -Y
ifaces". The former includes details of all public addresses and
associated interfaces, so when an address is removed there is no
output for it. This avoids orphaned interfaces from being listed.
The logic is also slightly improved so that $IFACES includes just a
(non-uniquified) list of interfaces, allowing an existing loop to be
removed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 49b2d1bd9554461ed8edbfc21e777c0eca9e1443)
|
| |\
| | |
| | |
| | | |
(This used to be ctdb commit 518945e59e2e48f07fcc0955f3aa81cd0d946aea)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move struct ctdb_public_ip_list to ctdb_private.h and put some
definitions for some functions from ctdb_takeover.c there. This
allows those functions to be called from unit tests.
Add ctdb_takeover_tests.c and the Makefile support to build it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9d34be0233edf3bc022345c0494c4b2a4d7f8480)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current non-deterministic IP allocation algorithm balances IPs
across the whole cluster. It does not consider different
interfaces/VLANs/subnets, so these different groups of IPs aren't
generally well balanced.
This adds the LCP2 algorithm for IP allocation and allows it to be
enabled by setting the "LCP2PublicIPs" tunable to 1.
The LCP2 algorithm calculates the imbalance of a node by totalling the
squares of the distances between each IP on the node. The IP distance
is defined as the length longest common prefix (LCP) of bits that is
found when comparing 2 IPs. The imbalance of a cluster is the maximum
imbalance for any node. At each step the algorithm selects an
allocation to the IP/node combination that results in the choosing the
allocation that best reduces the imbalance of the cluster.
The implementation splits out the IP allocation part of
ctdb_takeover_run() into new function ctdb_takeover_run_core(), and
then extracts out the basic IP assignment code into new functions
basic_allocate_unassigned() and basic_failback(). 3 new functions
lcp2_init(), lcp2_allocate_unassigned() and lcp2_failback() implement
the LCP2 algorithm, and are hooked into ctdb_takeover_run_core().
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 61fc7fbd0235469df22deb6581c6bd47e30bc0be)
|
| |\|
| | |
| | |
| | | |
(This used to be ctdb commit 0e60a738f9a6275ed45abc3d933f872d93132d92)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Dont talloc_free(vnn) immediately but postphone it until later when
the eventscript callback has completed.
CQ S1026664
(This used to be ctdb commit 0a99e8742a261b1d3a2c8830f5c19ea6c2c47cad)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ctdb_event_script_callback() takes a mem_ctx arg which it doesn't use, but
the implication is pretty clear, that when that mem_ctx is freed, the callback
shouldn't happen. Indeed, Ronnie reproduced a case where that callback
refers to freed memory, in the ip reallocation code under stress.
So attach the callback to the mem_ctx they give us, and remove it from the
script state structure when that's freed. It's a bit weird, but it works.
CQ: S1026179
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 6fcd867cc835ef1ffc1c50964f135c346503d40c)
|
| | |
| | |
| | |
| | |
| | |
| | | |
This allows to call e.g. "makerpms.sh -bs" to build only the source RPM.
(This used to be ctdb commit c6bfba2bb66962b7b05d708f0747002700991472)
|
| |\ \
| | | |
| | | |
| | | | |
(This used to be ctdb commit a1b3661973489f0111e7975fec422fb99a25f0c8)
|
| | | |
| | | |
| | | |
| | | | |
(This used to be ctdb commit 3f698e69a56305c5ec27b8d119bf2d57d5cd2ec6)
|
| | | |
| | | |
| | | |
| | | | |
(This used to be ctdb commit 912a33cebe7c51b33cda2e6d5f2b3a481fa7fd49)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Client connections to the ctdbd unix domain socket may fail
intermittently while the server is under heavy load. This change
introduces a client connect retry loop.
During failure the client will retry for a maximum of 64 seconds, the
ctdb --timelimit option can be used to cap client runtime.
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit dc0c58547cd4b20a8e2cd21f3c8363f34fd03e75)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit af75d3e37412e03d3978073edbe6dee78f265c3c)
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
can auto unban nodes. Suggest using "stop" / "continue" instead.
(This used to be ctdb commit 8e30dffad5b1385818b2d7350d6c3767a220d745)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
nodes with many addresses to nodes with few addresses,
loop up to num_ips+5 times instead of only 5 times.
When we have very many public ips per node, we might need to loop more than
5 times or else we will exit without reaching optimal balance.
(This used to be ctdb commit aa8114a625a637277561a66c80bdece3c27e9e20)
|
| | |
| | |
| | |
| | |
| | |
| | | |
CQ S1025379
(This used to be ctdb commit 6f51d4a75f8a9f2cdb8ecde946ed31809ab5a415)
|
| |/
| |
| |
| |
| |
| |
| |
| | |
address config from public-addresses... to public_addresses...
CQ1019030
(This used to be ctdb commit 114d5034ff4880848588caf493382a537a1469ae)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This hasn't worked for a while if ever.
We treat this case specially because the output has 2 works on the 1st
line. We also handle the error case where /etc/ctdb_natgw_nodes
exists but none of the other $NATGW_* configuration is done.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 66e89797c7866d207a5bbf1836f52d70dba7cea6)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting IFS and looping though items with colons in them doesn't work.
Change this to read through the output line by line. The header line
needs to be thrown away by throwing away everything up to the 1st
newline.
Keep stderr from the "ctdb status" command, otherwise debugging is
impossible.
On error, append any output from ctdb to onnode's error message.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d60592cf99999f10344a05ef0571fb300bb9d97c)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The comment about $CTDB_NODES_SOCKETS is meaningless. The code ti
refers to works just find with $CTDB_NODES_SOCKETS.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 74e69a564bac653dadfffe8b08145b9b3be16e61)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current code requires knowledge of the number of status bits
output by "ctdb status -Y".
This changes the code to be completely general.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e1788f25fde3d1f26bf4831a331741aa280f6fbc)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use of "local" was masking errors in command-line processing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ca80adda7517b43147ef30156ae34c66b29fa2bd)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current version gives the last item left after stripping the known
fields. If an insufficent number of status fields is stripped then
this would return a residual status field value, which turned out to
be a valid IP address for localhost... so no error occurs.
This change means that the node number is stripped and any residual
status field value will stay appended, causing an error the first time
this command is tested.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 74715e6ec7b67c6f0e863aa51c87279758d6bf91)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the output of "ctdb status -Y" changed to add an extra status
column we didn't fix onnode.
This adds a match for the extra column.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 793febaebd3d484ddfbbcb47aaa0cdf3cfc1a00d)
|
| |
| |
| |
| |
| |
| |
| |
| | |
... again ;-)
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 2266586c1839af032622be54dc7f71e39d2bd9ef)
|
| |\
| | |
| | |
| | | |
(This used to be ctdb commit 307e915459c26a728a1ec16bd735d983d493df53)
|
| | |
| | |
| | |
| | | |
(This used to be ctdb commit 2d67186e5acd5aa8cb3eb1f4fbd4a41153c52e96)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit afd96d5990815019b1f9ddc8b78a05f86eca0421)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 39f595cad5321c64e2b1e72fe7b4bbb720f4b906)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
s/poerwoff/poweroff/
Bug 8124
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit a6d2f1bd552dba33640acb7a0b8110534debd4ce)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
adding/removing IP addresses causing routes might be dropped by the system.
The easiest workaround for this is to unconditionally try to reapply
all static routes for all interfaces once ipreallocation has finished,
not just adding them back on the affected interface.
This worksaround a funky issue in
CQ S1023538
(This used to be ctdb commit 84600d1f53632d5fe76c308727f31f61b5ec1010)
|
| |
| |
| |
| |
| |
| | |
CQ S1023524
(This used to be ctdb commit 4cddba08b46db0a56a86b32403a41b89cd097317)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
to fail too, so that ctdbd will re-try the startup event later.
Or else this will leave samba not running.
CQ S1023394
(This used to be ctdb commit f90485b08d32cbe56050718a3b28ca0fe1d64e0f)
|
| |
| |
| |
| |
| |
| | |
in use by public addresses. this can happen when we have removed existing interfaces/ip addresses and prevents us from verifying the status of other interfaces
(This used to be ctdb commit d67955b42f7627be9dae995230c8fcbb8a948ec2)
|
| |
| |
| |
| |
| |
| |
| |
| | |
script if/when we have for example NATGW configured but no public addresses defined on that interface
CQ S1023378
(This used to be ctdb commit 8837daa424732aeb5a20814b1709c345a97a0e09)
|
| |
| |
| |
| | |
(This used to be ctdb commit ce6409dc7d059701f0fe4b57e7c05c38c66629c5)
|
| |
| |
| |
| | |
(This used to be ctdb commit ffbff1affed8301831387e23b4f8f824d9f78e20)
|
| |
| |
| |
| | |
(This used to be ctdb commit 991ea66e5ed0eb7ab256dc8e3118dc78462d4752)
|
| |
| |
| |
| | |
(This used to be ctdb commit d91e80c698a7706460e9ee74bd4f5a9ab0a7b9b1)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 992baa4215bfc1b29fd153ccb7c42bb0cb66fa4f)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 2ed3603274cd38dde4ae98eef653e9a9de631eb5)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This this is a tool to handle (dump and convert) ctdb's local tdb
copies (ltdbs) without connecting to a ctdb daemon.
It can be used to
* dump the contents of a ltdb, printing
the ctdb record header information
* dump a non-clustered tdb database (like tdbdump)
* convert between an ltdb and a non-clustered tdb
(adding or removing ctdb headers)
* convert between 64 and 32 bit ltdbs
(the ctdb record headers differ by 4 bytes of padding)
usage: bin/ltdbtool dump [-p] [-s{0|32|64}] <idb>
bin/ltdbtool convert [-s{0|32|64}] [-o{0|32|64}] <idb> <odb>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
(This used to be ctdb commit efcf2815711cd5371633614fb91273bd0a786da0)
|