IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This flag to tdb_open/tdb_open_ex effects creation of a new database:
1) Uses the Jenkins lookup3 hash instead of the old gdbm hash if none is
specified,
2) Places a non-zero field in header->rwlocks, so older versions of TDB will
refuse to open it.
This means that the caller (ie Samba) can set this flag to safely
change the hash function. Versions of TDB from this one on will either
use the correct hash or refuse to open (if a different hash is specified).
Older TDB versions will see the nonzero rwlocks field and refuse to open
it under any conditions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit dd86b24ae5307fe09d4ae22b7070d747013a2b07)
If the caller to tdb_open_ex() doesn't specify a hash, and tdb_old_hash
doesn't match, try tdb_jenkins_hash.
This was Metze's idea: it makes life simpler, especially with the upcoming
TDB_INCOMPATIBLE_HASH flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 3f7ed2b46cb304d553d3f7bd34554d695b8ccc52)
This is a better hash than the default: shipping it with tdb makes it easy
for callers to use it as the hash by passing it to tdb_open_ex().
This version taken from CCAN and modified, which took it from
http://www.burtleburtle.net/bob/c/lookup3.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 58c9d90c758aa7c062d84ab97f62947190526356)
The problem was tdb->name is NULL for TDB_INTERNAL databases, and
so it was crashing ...
#0 0xb76944f3 in strlen () from /lib/i686/cmov/libc.so.6
#1 0x0809862b in PyString_FromFormatV (format=0xb72b6a26 "Tdb('%s')", vargs=0xbfc26a94 "")
at ../Objects/stringobject.c:211
#2 0x08098888 in PyString_FromFormat (format=0xb72b6a26 "Tdb('%s')") at ../Objects/stringobject.c:358
#3 0xb72b65f2 in tdb_object_repr (self=0xb759e060) at ./pytdb.c:439
Cc: 597089@bugs.debian.org
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
(This used to be ctdb commit 3ff413baf04ce28eb54a80141250ae1284b2a521)
Note, unlike tdb_open where flags is `int', tdb_{add,remove}_flags want
flags as `unsigned', so instead of "i" I used "I" in PyArg_ParseTuple.
Cc: 597386@bugs.debian.org
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
(This used to be ctdb commit 7389f8a8a634c2fe0f068831326d92e6bfa0d046)
This is Stefan Metzmacher <metze@samba.org>'s patch with minor changes:
1) Use the TDB_MAGIC constant so both hashes aren't of strings.
2) Check the hash in tdb_check (paranoia, really).
3) Additional check in the (unlikely!) case where both examples hash to 0.
4) Cosmetic changes to var names and complaint message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 63c582c99128c3623e270e8425966cab7744fb2f)
We must not endian-convert the magic string, just the rest.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 525390863ad39acea08ceb88531dc59d118fcad4)
Commit bc1c82ea13 "Fix tdb_check() to work with read-only tdb databases."
claimed to do this, but tdb_lockall_read() fails on read-only databases.
Also make sure we can still do tdb_check() inside a transaction (weird,
but we previously allowed it so don't break the API).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 2558eb250011893d09dbeaedaffeefa0e397142f)
We can end up with dead areas when we die during transaction commit;
tdb_check() fails on such a (valid) database.
This is particularly noticable now we no longer truncate on recovery;
if the recovery area was at the end of the file we used to remove it
that way.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit b4162a95ff9ae28cda8d9c76c51c9480104517a7)
Add a new command "ctdb stats [num]" that prints the [num] most recent statistics intervals collected.
(This used to be ctdb commit e6e16fcd5a45ebd3739a8160c8fb5f44494edb9e)
This serviceability tool was lost during the migration from the old eventsystem to the tevent system.
(This used to be ctdb commit b4c00b4ac30ec215629f44f802ce9660abcd7a48)
define a new symbol to represent this range similarly to NFSD and ISCSID
Keep the old symbol name to be backward compatible with software using
these headers.
(This used to be ctdb commit 2ce34e50d057ba95249117a581658a5ad7e8eb60)
This function returns a pointer to a nodemap structure.
The returned structure must later be freed by calling ctdb_free_nodemap().
Move the definition of ctdb_sock_addr from ctdb_client.h to ctdb_protocol.h
Move the definition of the node flags, ctdb_node_and_flags and ctdb_node_map from ctdb_private.h to ctdb_protocol.h
Add both sync and async example for ctdb_getnodemap to the test application libctdb/tst.c
(This used to be ctdb commit 31c10eb2b337fd7d8a97a1f9e69b0e7570fec71d)
network connectivity outside of the cluster to still be able to
participate in a natgw group.
These nodes can not become natgw master since they lack external network
connectivity.
These nodes are configured just the same way as for any other node with
NATGW, with the following two exceptions :
* we do NOT set CTDB_NATGW_PUBLIC_IFACE at all on these nodes.
since these ndoes lack external network we should not check the interface
for link.
* we must set CTDB_NATGW_SLAVE_ONLY=yes to flag that this is a node that
can not become natgw master.
(This used to be ctdb commit ab7b00a37e55beffc074be95b55d8a5c7cb9eef2)
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)
dont dereference a null pointer while trying to print the log message for the failure.
also shutdown ctdb with ctdb_fatal()
(This used to be ctdb commit f8642d0438c6bbb34a72c25d6a904b626e247410)
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)
This is called everytime a reallocation is performed.
While STARTRECOVERY/RECOVERED events are only called when
we do ipreallocation as part of a full database/cluster recovery,
this new event can be used to trigger on when we just do a light
failover due to a node becomming unhealthy.
I.e. situations where we do a failover but we do not perform a full
cluster recovery.
Use this to trigger for natgw so we select a new natgw master node
when failover happens and not just when cluster rebuilds happen.
(This used to be ctdb commit 7f4c591388adae20e98984001385cba26598ec67)
Use onnode any where possible rather than a fixed node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 51561720d2b4db5b307da3d410661075e2a6c3ca)
We now kill ctdbd on the test node instead of disabling it. This
ensures that the only tickles we see will come from the takeover node.
We also sleep for TickleUpdateInterval before checking for asking ctdb
about the tickles.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 48cd8325c070f6942aa13a25269021e4c8ed188f)
This adds a new function update_tickles() that tracks tickles for a
given port using the new ctdb addtickle/deltickle commands. This
function is used in events.d/60.nfs to handle NFS tickles.
events.d/61.nfstickle is removed. The
/proc/sys/net/ipv4/tcp_tw_recycle setup is also moved to
events.d/60.nfs.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit dca4c4ebf3c35f8db3ae208efb7a83abbf726ed6)
It is too hard to do anything else...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 08b636b500855e38e708e6963d8e63ded97c25ec)
This database can be used, as an option, to store
the public address assignment instead of editing the /etc/ctdb/public-addresses file manually.
This configuration is stored in one record per key, with a key-name of
public-addresses:node#<pnn>
where <pnn> is the node number.
The content of this record is the same syntax as the /etc/ctdb/public-addresses file.
When ctdbd starts, if this key exist and contains data. It is extracted from the database and compared with the normal file /etc/ctdb/public-addresses.
If the content differs, the config database "wins" and is used to overwrite/update the /etc/ctdb/public-addresses file, after which ctdbd is restarted.
The main benefit with this option is that it can be used to update the public address configuration for nodes that are offline/unreachable by updating their configuration in the persistent database.
Once the offline node is available again, it will resync its databases with the rest of the cluster, find out that the config has changed, apply the changes and restart ctdbd automatically.
The command to store the public address configuration for a node into the persistent database is :
ctdb pstore config.tdb public-addresses:node#<pnn> <filename>
where <pnn> is the node# we wish to update the config for, and <filename> is a file containing the new content for that nodes public address configuration.
(This used to be ctdb commit 292d7435a360efd7f15a7a99f658a605e07c0a81)
fix a couple of incorrect settings for "auto-all" for a few of the commands as well.
(This used to be ctdb commit 9999771105d7105efaa232fe2842e21e66f78706)
tdb file.
the command automatically strips off the initial ctdb header off the record so it can only be used on ctdb managed tdb files, not on normal tdb files.
(This used to be ctdb commit c3a816e5174abefb5155f65d8faad7b1e831e481)
so that the dependencies are right
or else the dependencies all end up in the devel package and not the main
ctdb package
(This used to be ctdb commit 6e4347eb8e62c28987820f6e58626271c900b011)
This can cause ctdbd to spin at 100% in the eventsystem,
creating a timed event that will immediately trigger again
and again.
On uniprocessors this cause the eventscript we are actually waiting for to
basically become cpu starved and never complete.
(This used to be ctdb commit 92c8408fba957a8ded13f7e285da290502735234)
revert the defauls case back to only showing the ip and node
and only display the extra info if -v verbose output is requested
(This used to be ctdb commit 6488651aa7e105c57324f4a300760a010d098fbb)
port.
Default is to continue to show all tickles, but if a second argument
is given, only tickles for that port will be shown.
(This used to be ctdb commit 5b985eb2cbbb92bf6ccfcacd633d793bcd4e3ec1)
so set the TALLOC_DEPRECATED sympol to allow use of this call
from ctdb_client.c
(This used to be ctdb commit 3afa5d945a56952a7f211af068d671945de960e5)
sometimes (very rarely) fails to restart the service.
Add a function to restart NFSd on SLES and RHEL-like systems.
If we detect the system is unhealthy due to kNFSd not running,
try to restart the service again "service nfs restart" and
hope for the best.
CQ1019372
(This used to be ctdb commit 25c4ce7e919f13226219f036bcffd2be76b2f06c)
Add a new "ctdb deltickle" command to delete tickles from the database.
This can ONLY be used for tickles created by "ctdb addtickle".
Push any "addtickle/deltickle" updates to other nodes every TickleUpdateInterval seconds'
(This used to be ctdb commit acded034e2f0dcae4c2c9e54e16a001caf23caec)
This means we can distinguish which child is logging, esp. via syslog where we have no pid.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 68b3761a0874429b90731741f0531f76dcfbb081)
After 5 attempts to send a RST to a client without any response, we free
"con"; this is done during a traverse. This frees the node we are walking
through (the node is made a child of "con" down in rb_tree.c's
trbt_create_node() (Valgrind would catch this, as Martin confirmed).
So, we create a temporary parent and reparent onto that; then we free
that parent after the traverse, thus deleting the unwanted nodes.
CQ:S1019041
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 08f7f85477610a4916c1ec866aa467b28f1bbec3)
The existing code wasn't working as designed in the start event. It
should work here.
BZ: 62613
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit aeb70c7e7822854eb87873a5c7783e27e6e72318)
We shouldn't even think about vacuuming when we've frozen the database
(which is earlier than when we set CTDB_RECOVERY_ACTIVE)
CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit d8df6835a931082af232c4b94f1dede6f16169f9)
Martin Schwenke discovered that 517f05e42f17766b1e8db8f1f4789cbad968e304
("freeze: abort vacuuming when we're going to freeze.") used ctdb_db for
a logging message which is in fact uninitialized, causing a crash (even
if it wasn't actually logged).
Initialize it properly. Also fix incorrect format in another logging
message introduced in that same change.
CQ:S1019093
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 8e518950ba281502318d6300f7a5ec6cdf6b5674)
Monitoring could be off at the beginning of the test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6a33a7715067175869ea2f3f15b64c3371079a6b)
There are some reports of freeze timeouts, and it looks like vacuuming might
be the culprit. So we add code to tell them to abort when a freeze is
going on.
(This is based on the 1.0.112 branch version 517f05e42f, but far
simpler since tdb is now robust against processes being killed during
transaction commit)
CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit f5d7dc679501e607c2c83a248a89d3cada9df146)
This can be used to set ctdbd up to generate a tickle for non-samba
services.
(samba contains code to set tickles up automatically)
(This used to be ctdb commit 7ef2cddad5326fdcc26138906948342039829495)
In Samba this is now called "tevent", and while we use the backwards
compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now
a separate tevent_fd_set_auto_close() function.
This is based on Samba version 7f29f817fa.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
This is based on SAMBA as at revision 2de63aa280.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit cecd93be0a0aab868430dd43f8276bfb4e35f02e)
This should help with log cross-checking.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c0a916c40c623c0aa8245526283a064dbeea4b57)
(Imported from SAMBA 11ab43084b)
We saw tdb_lockall() take 71 seconds under heavy load; this is because Linux
(at least) doesn't prevent new small locks being obtained while we're waiting
for a big log.
The workaround is to do divide and conquer using non-blocking chainlocks: if
we get down to a single chain we block. Using a simple test program where
children did "hold lock for 100ms, sleep for 1 second" the time to do
tdb_lockall() dropped signifiantly. There are ln(hashsize) locks taken in
the contended case, but that's slow anyway.
More analysis is given in my blog at http://rusty.ozlabs.org/?p=120
This may also help transactions, though in that case it's the initial
read lock which uses this gradual locking routine; the update-to-write-lock
code is separate and still tries to update in one go.
Even though ABI doesn't change, minor version bumped so behavior change
can be easily detected.
CQ:S1018154
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 9ec0009443a0ac4187ce5212a5143689daa58a02)
(Import from SAMBA bc1c82ea13)
The function tdb_lockall() uses F_WRLCK internally, which doesn't work on
a fd opened with O_RDONLY. Use tdb_lockall_read() instead.
(This used to be ctdb commit a5db1122ec48d7e7384066848457c850c1a6cf3c)
Commit 207a213c/24fed55d purported to fix the problem of signals during
tdb_new_database (which could cause a spurious short write, hence a failure).
However, the code is wrong: newdb+written is not correct.
Fix this by introducing a general tdb_write_all() and using it here and in
the tracing code.
Cc: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 27ba0e5a6681063225df7244a85aa304c51c6948)
If there's a chance that "ctdb status -Y" can return 0 but print
garbage then this function might return a false positive.
So, we do 2 things:
* Redirect stderr to >/dev/null rather than looking at it. This
minimises the chance that we will see garbage.
* Since we need at least 1 good line to decide the cluster is healthy,
we sanity check each line to esnure it starts with :[0-9].
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d4189c7c3fceaa833f9f0446a2b06af6fed714ec)
Also ensure that $CTDB is set by default it to "ctdb".
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8222fef1e61836b9bfd406205f9ffb9396aa7480)
This currently does "onnode any ... wait_until ...". If ctdbd is
being shutdown on a node then that node might be chosen anyway, if it
is asked early enough. Then we'll loop on that node but our ctdb
client command may always fail, causing a timeout rather than the
expected behaviour.
This puts the loop on the outside of the "onnode any" so that if the
"wrong" node is chosen initially then on the next iteration the choice
can be remade.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a88ee78686bd5aa2b789f5959e0562315a13525d)
It turns out that we *do* want a separate private arg for the message
handler and the completion callback, so we change that.
We also fix the prototypes of the remove_message functions as we
implement them.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 332375246eccd95da626f434f6d49dd9458a9787)
In some contexts ctdb_diagnostics generates too many errors when it is
run on heterogeneous and machine-configured clusters. In some
clusters some nodes are expected to be differently configured and also
machine-generated configured files can have comments containing
timestamps.
This adds some command-line options that can be used to reduce the
number of errors reported:
-n <nodes> Comma separated list of nodes to operate on
-c Ignore comment lines (starting with '#') in file comparisons
-w Ignore whitespace in file comparisons
--no-ads Do not use commands that assume an Active Directory Server
The -n option simply allows ctdb_diagnostics to operate on a subset of
nodes, avoiding file comparisons with and data collection on nodes
that are differently configured. For file comparisons, instead of
showing each file on the current node and then comparing other nodes
to that file, the file from the first (available or requested) nodes
is shown and then other nodes are compared to that. That has resulted
in changes in output - that is, ctdb diagnostics no longer prints
messages referencing the current node.
-c and -w are used to weaken comparisons between configuration files.
--no-ads can be used to avoid running ADS-specific commands if a
cluster uses LDAP (or other non-ADS) configuration.
This also fixes a number of bugs in related code:
* A call to onnode was losing the >> NODE ... << lines because they
now go to stderr. This was changed in onnode long ago but
ctdb_diagnostics was never updated to match.
* ctdb_diagnostics was counting lines in /etc/ctdb/nodes to determine
what nodes to operate on. For some time the nodes file has
supported syntax that makes this invalid. "ctdb listnodes -Y" is
now used to list available nodes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 36c8244a0f68c7c9bbee40982f230e9d14d3c0ea)
These tests currently wait for the old IPs to fail back to the test
node. This isn't guaranteed with DeterministicIPs disabled.
This changes those tests to wait until the test node gets at least 1
IP assigned.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e9b3f5b1b51d541a911a27eb4348b368f28d185e)
Currently we do a "sleep 1" after starting and before running
set_ctdb_variables to set the tunables. This is too arbitrary and
might fail if the system is heavily loaded. This, for example, could
result in some nodes running with DeterministicIPs and some without,
in which case a different IP allocation algorithm would run depending
on who is the recmaster!
This makes the start function wait until "ctdb ping" succeeds (with 10
second timeout) before trying to run set_ctdb_variables. If a timeout
occurs then the start function attempts to kill ctdbd before exiting
with a failure.
It also cleans up the status reporting code for Red Hat and SUSE so
that the final status code is reported. Currently there are cases
where a correct status is prematurely reported before a failure
occurs.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit cdcd05662a30b51caaeeab4ac44138cac2474e0a)
Recent CTDB notice the wrap and print this message. The test needs to
cope.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b93b60ec96d02ce4f54921e85a5c5554d1fc0c55)
They test debugging commands that no longer operate as expected.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d33fa4d6557aab1938049f194c2de55f2c395bd2)
The test currently checks that all existing IPs plus the newly added
IP are on the test node after "ctdb addip" is run. With
DeterministicIPs enabled, if the new IP is "before" other IPs then the
other IPs may be shuffled by the deterministic IPs modulo algorithm.
This will happen on the 1st recovery after the move. Sometimes this
recovery happens before we get the list of IPs to check and sometimes
after, so the test is racy.
The fix is to simply check for the presence of the new IP and not
worry about the others. This reduces whatever value this test
had... but you can't have everything.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1ef7c8e64c7a39330be09ae4d00b70238133e0b5)
This test is failing in some situations. The "ctdb addip" command
works but the IP never appears in the "ctdb ip" output.
Try restricting the last octet to be between 101-199. At the moment
addresses like 10.0.2.1 are being chosen and these are often the
address of the host machine in autocluster configurations... so might
cause weirdness.
Also add some debugging if checking for the IP address times out.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ae52cb63756bc60de8d32e01bac5d70975a1c7a0)
Group options better and make the language consistent between options.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bc38c17e4115fae00c89d00537fdcfe621111b37)
This can imply something about imbalance.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ecb80e2b6be9326708d1fc87ad3028c6836d5858)
Tweak the usage message for -g option.
Print an error if no node groups defined, instead of curious Python
error.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8b883eb9346b8278d268e35b56ac680cd9526b97)
This allows node pool configuration to be specifed on the
command-line.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d382d9023928f75f360a115ae1e9c1036423416e)
The current code makes random choices from unsorted lists. This
ensures the lists are sorted.
Also, make the code easier to read by doing the random selction from
lists of PNNs rather than lists of Node objects.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a01244499dc3567f5aa934b1864b9bc183a6c242)
process_args() must now be called by programs inporting this module.
Options are put into global variable "options", which can be
references using "ctdb_takeover.options".
Can now pass extra option specifications to process_args().
Remove global variable prev and make it a Cluster object variable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a32298e7bc819694518e859f100f9444ff5663cd)
There's a lot of new code here, so let's make the copyright message
make sense.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e6e56e5989def6704b116e806c1f261c7f3fc03f)
We don't need to see warnings about unallocatable IPs unless we're in
verbose mode. Can node be run with -n (and without -v or -d) to see
just the statistics.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 55370936ac5def5ebf138910388a2ddc2df9c20f)
This is useful to know. When things get unbalance they tend to stay
that way.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a40faa2096effc2657ac05b729f3259bbb2e1fed)
This starts at -1 because we always have to do the initial allocation.
No longer print event number for each event by default, only when
verbose is enabled.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c9a761726d141bcaa8ba7851150f71a8130b473a)
Implement the imbalance calculations.
Also add command-line option to display imbalance for each step.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f50a12f6d06ed67efadd2a892d62c01e67310e7d)
Includes simulation module and example scenarios. This allows you to
test and perhaps tweak an algorithm that should be the same as the
current CTDB IP reallocation one.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d148e7a7cb840febbdf56ba2e39c314cc2d7ac24)
Currently the file for each IP address is reopened to append the
details of each source socket.
This optimisation puts all the logic into awk, including the matching
of output lines from netstat. The source sockets for each for each
destination IP are written into an array entry and then each array
entry is written to the corresponding file in a single operation.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6549e9b01538998d51a5f72bfc569776d232b024)