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 will be useful for also printing information about empty/deleted
records in "ctdb catdb", e.g. for debugging vacuuming issues.
(This used to be ctdb commit ddc5da3a0df7701934404192a0a0aa659a806acb)
metze
(cherry picked from commit 6ba8af28f8a8f79db65120a97d7157dcc5c7e083)
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit ccd67cf7f26713e695000d89d9ce8cfa78bfe00f)
compared to old 1.0 branches
This must have been mistakenly applied to master when you intended to push
for a different branch i guess.
Revert "recoverd: try to become the recovery master if we have the capability, but the current master doesn't"
This reverts commit a97d417aba85e901540147a4dff4794249442939.
(This used to be ctdb commit c19cb751077b78cf4b6e28a1e3746d4ffedbfd68)
When a monitor event is canceled by a higher priority script, make sure we return
status -ECANCELED to the callback in ctdB_monitor.c
Also treat -ECANCELED as a simple "try monitor event again" and skip modifying any HEALTHY/UNHEALTHY flags when this happens
(This used to be ctdb commit a15ec57c26d1bc82af85f74eebae0bd8abde3233)
For a number of reasons (delip failure, admin stupidity, ...) an
interface that hosts public addresses can also contain spurious,
unmanaged addresses.
Add functionality to 10.interfaces, controlled by new configuration
variable CTDB_DELETE_UNEXPECTED_IPS, to delete these addresses when
encountered as part of a monitor event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 88f88d86b0d08240f749fb721b8c401c2eeb1099)
The script name is now prepended to output by ctdbd.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bfa0fe70db195413a6d7a98f46f7a1270aba678c)
* $fs can be parsed using shell prefix and suffix removal.
* df output can be parsed with a single call to sed.
Failure is indicated by empty output from sed, so we check for that
as the error condition, changing the associated message
appropriately.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c5ef0d1440f1d952784cc67946c414d149722d01)
The call to ctdb_transport_allocate() can fail for 2 reasons:
* Unable to allocate memory.
* The transport is down, perhaps because CTDB is shutting down.
Either cause will be appropriately logged.
The current use of CTDB_NO_MEMORY_VOID() prints an "out of memory"
message regardless of what happened in ctdb_transport_allocate() and
this could be misleading.
Change this to print a more relaxed message.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8c4a93e77c7d7d0cec6b2afd42c22475f1b5ccdc)
These were intentionally not static so they could be linked to in unit
test programs. However, using the CCAN-style unit tests where
relevant code is just included, this is no longer necessary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d0e9e8554614bd49ffb9ec3509feaa0e80d0f65d)
Do this instead of linking to it. This means that, after previous
cleanups, we can fix ctdb_takeover.c to use static functions when
appropriate and simply include all the code we need to run tests.
To make this reusable in other tests, new file ctdbd_tests.c does all
of the relevant including. ctdb_takeover_tests.c just includes that
file.
Test objects built in this way can depend on new Makefile macro
$(CTDB_TEST_C), which contains ctdbd_tests.c and everything it
includes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 41869d42194b74db43a176a068e96e411007e5f2)
Local variable stat generates a warning because it shadows a global
declatation, presumably stat(2). Rename it to s.
This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d17efacb3aa6fac61d89f4c88ca17579341c335f)
Rename parameter script_status to scripts to avoid shadowing a global
function with the same name in eventscript.c.
This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 668358057c1e6b9bbad7209212f9135c5e6241a0)
This avoids a name clash with a slightly different function in
ctdb_control.c.
This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 82f6108bfbc7e48ca88650297c6a1c6ede0e1c9c)
Move identical copies of ctdb_null_func(), ctdb_fetch_func(),
ctdb_fetch_with_header_func() from ctdb_client.c and
ctdb_ltdb_server.c to somewhere common.
This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 126cb0d369b2b1aed63801dc4ba0554399e8b7e4)
Grep it out in the Makefile. This should be very obvious if the
output changes and the grep breaks something.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 79638bdd884caaf899c1b41984a5f0cf638207b5)
Warnings are generated when compiling strptime.c. Why is it being
compiled on Linux? strptime(3) has been in glibc for 15 years!
It turns out that some of the test fragments were being looked for in
lib/replace/test/ and some in lib/replace/tests/. In addition,
test*/strptime.c was missing.
Move the tests to lib/replace/test/ for consistency with upstream
(Samba) and copy in test/strptime.c from Samba. Tweak repdir.m4 to
handle the directory rename.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit aaf1ddfc83cf2ede29288baf04a1aa1c69a5cab5)
popt generates 4 compiler warnings with GCC 4.6. There are 2
different types:
* 3 instances of:
warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
One occurs in the _free() hack that is used to try and avoid a
compiler warning. I guess GCC got smarter? ;-)
The other is where an array of constant strings is passed to
execvp(2), which arguably has the wrong type, since it has no need
to modify the strings.
Both of these can be worked around by casting to intptr_t before
casting to the desired argument type.
In poptReadConfigFile() the variable file is declared to be a
constant string. However, it is then passed to read(2) straight
away and an attempt is made to cast away the "const". However, to
protect the value the of file is assigned to (const char *) chptr
before it is passed to any other functions, so this protects the
value anyway. I'm not sure exactly what the thinking was
here... but there seems to be no use having file be constant.
* 1 instance of:
warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
for the result of an execvp(2) call. Recast the return type to
void. However, due to some #if-fu in the function, that can make rc
unused in this function. So we also need to wrap the declaration of
rc in some corresponding #if-fu to make it disappear if not used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ac9236e64bd0b61740cc787819a1222bc6a67d4a)
This didn't have auto_all set as true. However, there's no special
code to handle "-n all" and it just fails. If auto_all works for
status then it might as well work for scriptstatus.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3084220e2aac3664511969f10cad206e505150a0)
There's an empty string passed to ctdb_event_script_callback() for
eventscript option arguments in ctdb_start_daemon() and this generates
a warning.
This type of warning seems pointless so let's switch it off.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 23c164926c5ec4da6d90a5bdcbf2d0100729b451)
Have sent this upstream to Samba.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 080edee3d053d770466ebcc976eb1135c80feef8)