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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
It was matched by .gitignore.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ef7e5da6241e326267800cd2bd53fb33a0386c2d)
queue_io_read() may be reentered via the queue callback, recoverd is
particularly guilty of this.
queue_io_read() is not safe for reentry if more than one packet is
received and partial chunks follow - data read off the pipe on re-entry
is assumed to be the start-of-packet four byte length. This leads to a
wrongly aligned stream and the notorious "Invalid packet of length 0"
errors.
This change fixes queue_io_read() to be safe under reentry, only a
single packet is processed per call.
https://bugzilla.samba.org/show_bug.cgi?id=8319
(This used to be ctdb commit 9ea41d2fab612772f861270c8a59c01c43bd3a4c)
sometimes we do want to try to set the linkstate for interfaces that are not in use by public addresses right now (but posisbly by other mechanisms) and these messages just spam the logs
S1026357
(This used to be ctdb commit f2fe0a090a9650910ebe49514b3ca01dc593bea3)
Call call_proc(), put the output into a variable and then use it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2dfdc997f432d522034922b43cb6f8f878d11ba7)
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)
These provide a thin layer around writing and reading files in /proc.
They can be easily replaced by stubs for unit testing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 637f9d8af517b73c72ed8f3cc2a2661f11eb2126)
These haven't been used for a long time.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f5fd361cadb3ea18d29e2d7215a7853718e48d00)
* $CTDB_ETCDIR defaults to /etc but can be changed for testing. All
hard-coded instances of /etc have been changed to $CTDB_ETCDIR.
This includes references to /etc/init.d and /etc/sysconfig.
* service() and nice_service() functions now call new function
_service(). This makes it easier to override these functions (say,
in rc.local) for testing and call most of the existing functionality
using _service().
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f43c9a7604b779bb6257ddb2bf3cbe266d496a63)
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)
We're seeing the cluster become healthy after a restart and then
revert to being unhealthy. It looks like there's a race and the
cluster shouldn't have been healthy, given that we seem to see that
the monitor cycle hasn't yet been run.
This collects some state debug info from all nodes after the cluster
becomes healthy. This is printed if the cluster is then unexpectedly
unhealthy a short time later.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c2efb5897e4258df649149f9904d7ac47322e1b4)
This depends on the format of onnode output and also depends on
simple/00_ctdb_onnode.sh having been run.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 93b53b186df55942bf4d9e90cae329f47889af72)
Easier to implement automatic checking.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 18db530880849b59445d7aa508bf218bdd77ea1c)
The manual replacement of loadconfig() had bit rotted and no longer
worked.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bf23e7166385d305c6860b37c120f70a9aa33aa5)
We're seeing some weirdness with CTDB controls timing out. We're
wondering if time is jumping forward, so this creates a time log on
each node that we can examine later if tests fail weirdly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5d82d89ee99f10bead101aebda645a80435ba246)
This sets up a more useful convention and avoids future .gitignore
problems.
Resolved conflict while cherry-picking this:
Don't take the eventscripts files for this branch. We'll put them
elsewhere.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a9879e37d4e3bb714ef6c0c4144c6949daec0b53)
If filenames should be printed in descriptions in the summary then the
descriptions should include the filename. A better option is to
include something more human-readable that makes the test just as
easily identifiable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0efdbd61bdc2343e5459959b300bccc9986b1d78)
This makes global changes easier.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3af086398fecb5f7c501190f9620b9c7b201f0ca)
Add some simple tests for the onnode command. These use fake ssh and
ctdb commands that are added to $PATH. The infrastructure used is
quite flexible and would allow more complex tests to be written.
As-is, these tests expose some bugs in the an older version of onnode
that is included so it can be used to validate some of the tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f7f9d0943474cb2de7832d7ca95210ea9e9c772b)
Putting PASSED/FAILED on the left makes it easier to scan the results
and simplifies the code. Also put starts around the word "*FAILED*"
to make it more obvious.
Also add a -q option to throw away test output and only display the
summary (if -s is also specified).
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c44b632b010b7d57007f3c8f294271c7e0217e0d)
This causes summary lines (when used with -s) to be pretty printed and
include the test description. This is the 4th line of the test output
- that is, immediately after the header.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0e5cc2a58b0d38e10a2ef9e81dc887c20f3fbdcb)
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)
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 makes IPv4 addresses comparable with IPv6 but reduces the overall
effectiveness of the algorithm. The alternative would be to treat
these addresses separately while trying to keep all the IPs in overall
balance... which is basically the problem that LCP2 solves. :-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3a7624f9d468b99714a7b6a45313f9e7f66011ed)
This time in the stats summary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit aabb2507dacc63ae026e6c99704a2fb79950e82c)
When there are IP groups, do not terminate when the overall cluster
goes out of balance.
Also make explicit that grat_ip_moves is an integer not a boolean, so
only terminate if it is greater than 0.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0899f14b1483682d73d1ee2d2419db54ffeadc4b)