[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9313731e96c ctdb-scripts: Update detect_init_style to use /etc/os-release from 952d6c2cf48 smbd: Fix read_symlink_reparse() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9313731e96c29ac2fa41f5ca4f5ccd2a75d17dc9 Author: Martin Schwenke Date: Tue Sep 19 17:34:55 2023 +1000 ctdb-scripts: Update detect_init_style to use /etc/os-release /etc/os-release is quite universal. It can be found on most Linux distros and on FreeBSD. Attempt to use /etc/os-release to detect Red Hat, SUSE and Debian based distros. If /etc/os-release exists but distro is unknown then $ID is printed as the detected distro, which will probably result in sub-optimal behaviour, but when tracing it will at least indicate that a new distro needs to be handled. The only way to handle missing /etc/os-release is to set CTDB_INIT_STYLE - see ctdb.sysconfig(5) for details. The event script unit tests are updated to use /etc/os-release so the new logic is exercised. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Oct 30 09:19:11 UTC 2023 on atb-devel-224 --- Summary of changes: ctdb/config/functions | 50 -- ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local | 4 ++- ctdb/tests/UNIT/eventscripts/etc/os-release| 2 ++ 3 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 ctdb/tests/UNIT/eventscripts/etc/os-release Changeset truncated at 500 lines: diff --git a/ctdb/config/functions b/ctdb/config/functions index d8f7f57b84c..a40b276e2b8 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -160,18 +160,48 @@ ctdb_check_args() # determine on what type of system (init style) we are running detect_init_style() { - # only do detection if not already set: - if [ -n "$CTDB_INIT_STYLE" ]; then - return - fi + _init_style_file="${CTDB_SCRIPT_VARDIR}/init-style" - if [ -x /sbin/startproc ]; then - CTDB_INIT_STYLE="suse" - elif [ -x /sbin/start-stop-daemon ]; then - CTDB_INIT_STYLE="debian" - else - CTDB_INIT_STYLE="redhat" + if [ ! -f "$_init_style_file" ]; then + if [ -n "$CTDB_INIT_STYLE" ]; then + echo "$CTDB_INIT_STYLE" >"$_init_style_file" + return + fi + + # Subshell to contain variables in os-release file + ( + _os_release="${CTDB_SYS_ETCDIR}/os-release" + if [ -f "$_os_release" ]; then + . "$_os_release" + case "$ID" in + centos | fedora | rhel) + echo "redhat" + ;; + debian | ubuntu) + echo "debian" + ;; + sles | suse) + echo "suse" + ;; + *) + case "$ID_LIKE" in + *centos* | *rhel*) + echo "redhat" + ;; + *) + echo "$ID" + ;; + esac + ;; + esac + else + echo "WARNING: unknown distribution ${ID}" >&2 + echo "unknown" + fi + ) >"$_init_style_file" fi + + read -r CTDB_INIT_STYLE <"$_init_style_file" } ## diff --git a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local index aa9b8b22fec..777aeaff8b3 100755 --- a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local +++ b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local @@ -51,4 +51,6 @@ background_with_logging () "$@" 2>&1
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3ee348a9663 ctdb-scripts: Convert 40.vsftpd to use threshold-based fail counting via 8303c3a534f ctdb-scripts: Implement failcount handling with thresholds via 4981984dd47 ctdb-scripts: Avoid errors for uninitialised counters via 7c468d9d284 ctdb-doc: Add some subsection names in description via 749bc568764 ctdb-doc: Update CTDB manual pages to UTF-8 from 7b6c17359ba tests/krb5: Test that the correct Asserted Identity SID is added when inner FX‐FAST padata is used https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3ee348a9663c69e20fe985d6a1fad6909579fca1 Author: Martin Schwenke Date: Tue Jul 25 09:52:56 2023 +1000 ctdb-scripts: Convert 40.vsftpd to use threshold-based fail counting This effectively provides simple testing for the threshold-based approach. Add new script option CTDB_VSFTPD_MONITOR_THRESHOLDS. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Oct 3 04:53:38 UTC 2023 on atb-devel-224 commit 8303c3a534fe2d31687d9d6386ba9c8a341c7a06 Author: Martin Schwenke Date: Fri Mar 3 17:49:05 2023 +1100 ctdb-scripts: Implement failcount handling with thresholds This can be used for simple failure counting, without restarts, as used in the 40.vsftpd event script. That case will subsequently be converted and this functionality can also be used elsewhere. Add documentation to ctdb-script.options(5) to allow parameters that use this to be more easily described. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4981984dd4794d0b8cb5b3cf434fc1d1ae183bfd Author: Martin Schwenke Date: Wed Mar 15 17:56:40 2023 +1100 ctdb-scripts: Avoid errors for uninitialised counters Uninitialised counters are treated as 0, but still produce an error. The redirect to stderr needs to come before the redirect for a missing counter file. The seemingly saner alternative of moving it outside the subshell works when dash is /bin/sh (e.g. on Debian) but does not work when bash is /bin/sh (e.g. on Fedora). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7c468d9d2846f6aab3f4963085413478e6aba895 Author: Martin Schwenke Date: Tue Jul 25 12:19:07 2023 +1000 ctdb-doc: Add some subsection names in description A subsequent commit will add a new section, which looks out of place without these new sections. Best reviewed with "git show -w". Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 749bc568764bb20d2be3450a030cf68bc223a4b7 Author: Martin Schwenke Date: Tue Jul 25 11:42:32 2023 +1000 ctdb-doc: Update CTDB manual pages to UTF-8 This will allow Unicode characters to be used, resulting in more readable source files. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/events/legacy/40.vsftpd.script | 17 ++- ctdb/config/functions | 110 +++- ctdb/doc/ctdb-etcd.7.xml | 2 +- ctdb/doc/ctdb-script.options.5.xml | 141 +++-- ctdb/doc/ctdb-statistics.7.xml | 2 +- ctdb/doc/ctdb-tunables.7.xml | 2 +- ctdb/doc/ctdb.1.xml| 2 +- ctdb/doc/ctdb.7.xml| 2 +- ctdb/doc/ctdb.conf.5.xml | 2 +- ctdb/doc/ctdb.sysconfig.5.xml | 2 +- ctdb/doc/ctdb_diagnostics.1.xml| 2 +- ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml| 2 +- ctdb/doc/ctdbd.1.xml | 2 +- ctdb/doc/ltdbtool.1.xml| 2 +- ctdb/doc/onnode.1.xml | 2 +- ctdb/doc/ping_pong.1.xml | 2 +- .../UNIT/eventscripts/40.vsftpd.monitor.002.sh | 39 +- ctdb/tests/UNIT/eventscripts/scripts/40.vsftpd.sh | 2 + 18 files changed, 269 insertions(+), 66 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/config/events/legacy/40.vsftpd.script b/ctdb/config/events/legacy/40.vsftpd.script index 1202812c3cd..2d2aac47033 100755 --- a/ctdb/config/events/legacy/40.vsftpd.script +++ b/ctdb/config/events/legacy/40.vsftpd.script @@ -19,11 +19,13 @@ load_script_options ctdb_setup_state_dir "service" "$service_name" +port_21="vsftpd listening on TCP port 21" + case "$1" in startup) service "$service_name" stop > /dev/null 2>&1 service
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dc7b48c4043 ctdb-common: Set immediate mode for pcap capture via ffc2ae616d8 ctdb-common: Replace pcap_open_live() by lower level calls via d87041d8968 ctdb-common: Improve error handling from 61d97ebf7d4 gitlab-ci: Add running codespell https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dc7b48c404337891b5105df4d6751cf549a533eb Author: Martin Schwenke Date: Tue Aug 15 12:34:20 2023 +1000 ctdb-common: Set immediate mode for pcap capture Fix a problem where ctdb_killtcp (almost always) fails to capture packets with --enable-pcap and libpcap ≥ 1.9.1. The problem is due to a gradual change in libpcap semantics when using pcap_get_selectable_fd(3PCAP) to get a file descriptor and then using that file descriptor in non-blocking mode. pcap_set_immediate_mode(3PCAP) says: pcap_set_immediate_mode() sets whether immediate mode should be set on a capture handle when the handle is activated. In immediate mode, packets are always delivered as soon as they arrive, with no buffering. and On Linux, with previous releases of libpcap, capture devices are always in immediate mode; however, in 1.5.0 and later, they are, by default, not in immediate mode, so if pcap_set_immediate_mode() is available, it should be used. However, it wasn't until libpcap commit 2ade7676101366983bd4f86bc039ffd25da8c126 (before libpcap 1.9.1) that it became a requirement to use pcap_set_immediate_mode(), even with a timeout of 0. More explanation in this libpcap issue comment: https://github.com/the-tcpdump-group/libpcap/issues/860#issuecomment-541204548 Do a configure check for pcap_set_immediate_mode() even though it has existed for 10 years. It is easy enough. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 15 10:53:52 UTC 2023 on atb-devel-224 commit ffc2ae616d8fab7528fbdfd8c6b94c5b9a0e3a7c Author: Martin Schwenke Date: Tue Aug 15 10:57:59 2023 +1000 ctdb-common: Replace pcap_open_live() by lower level calls A subsequent commit will insert an additional call before pcap_activate(). This sequence of calls is taken from the source for pcap_open_live(), so there should be no change in behaviour. Given the defaults set by pcap_create_common(), it would be possible to omit the calls to pcap_set_promisc() and pcap_set_timeout(). However, those defaults don't seem to be well documented, so continue to explicitly set everything that was set before. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d87041d8968e91db9d257445321b85693303f95e Author: Martin Schwenke Date: Tue Aug 15 10:43:57 2023 +1000 ctdb-common: Improve error handling Factor out a failure label, which will get more use in subsequent commits, and only set private_data when success is certain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/system_socket.c | 42 ++ ctdb/wscript| 1 + 2 files changed, 39 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/system_socket.c b/ctdb/common/system_socket.c index 06dc558eb22..273b9c3400e 100644 --- a/ctdb/common/system_socket.c +++ b/ctdb/common/system_socket.c @@ -980,15 +980,45 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data) int pcap_packet_type; const char *t = NULL; int fd; + int ret; - pt = pcap_open_live(iface, 100, 0, 0, errbuf); + pt = pcap_create(iface, errbuf); if (pt == NULL) { DBG_ERR("Failed to open pcap capture device %s (%s)\n", iface, errbuf); return -1; } - *((pcap_t **)private_data) = pt; + /* +* pcap isn't very clear about defaults... +*/ + ret = pcap_set_snaplen(pt, 100); + if (ret < 0) { + DBG_ERR("Failed to set snaplen for pcap capture\n"); + goto fail; + } + ret = pcap_set_promisc(pt, 0); + if (ret < 0) { + DBG_ERR("Failed to unset promiscuous mode for pcap capture\n"); + goto fail; + } + ret = pcap_set_timeout(pt, 0); + if (ret < 0) { +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f87f02f6f99 ctdb-doc: Fix documentation for ctdb event status via f01a179abcb ctdb-tools: Fix CID 1539212 - signed/unsigned issue from 3452b0d2cec netcmd: user: readpasswords: move syncpasswords command to readpasswords https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f87f02f6f99157601a6607927305e91835d45ab8 Author: Martin Schwenke Date: Sat Jul 29 10:07:35 2023 +1000 ctdb-doc: Fix documentation for ctdb event status Behaviour was changed, documentation wasn't. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15438 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Aug 7 09:43:33 UTC 2023 on atb-devel-224 commit f01a179abcb33d9da6097f5ae45c7e7df1bc0397 Author: Martin Schwenke Date: Sun Jul 30 11:07:47 2023 +1000 ctdb-tools: Fix CID 1539212 - signed/unsigned issue >>> CID 1539212: Control flow issues (NO_EFFECT) >>> This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "p >= 0UL". 216 while (p >= 0 && output[p] == '\n') { This is a real problem in the unlikely event that the output contains only newlines. Fix the issue by using a pointer and add a test to cover this case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15438 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/doc/ctdb.1.xml| 58 +++--- ctdb/event/event_tool.c| 9 ++-- .../etc-ctdb/events/random/02.enabled.script | 8 +++ ctdb/tests/UNIT/eventd/eventd_008.sh | 10 4 files changed, 51 insertions(+), 34 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index 65c254762eb..2973fbf2832 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@ -646,10 +646,10 @@ Interface[2]: Name:eth5 Link:up References:2 (active) The output is the list of event scripts executed. Each line shows the name, status, duration and start time - for each script. + for each script. Output from each script is shown. - Example + Example #1 # ctdb event status legacy monitor @@ -671,6 +671,28 @@ Interface[2]: Name:eth5 Link:up References:2 (active) 70.iscsi OK 0.009 Sat Dec 17 19:39:12 2016 91.lvs OK 0.007 Sat Dec 17 19:39:12 2016 + + + Example #2 + + +# ctdb event status legacy monitor +00.ctdb OK 0.011 Sat Dec 17 19:40:46 2016 +01.reclock OK 0.010 Sat Dec 17 19:40:46 2016 +05.systemOK 0.030 Sat Dec 17 19:40:46 2016 +06.nfs OK 0.014 Sat Dec 17 19:40:46 2016 +10.interface OK 0.041 Sat Dec 17 19:40:46 2016 +11.natgw OK 0.008 Sat Dec 17 19:40:46 2016 +11.routing OK 0.007 Sat Dec 17 19:40:46 2016 +13.per_ip_routingOK 0.007 Sat Dec 17 19:40:46 2016 +20.multipathdOK 0.007 Sat Dec 17 19:40:46 2016 +31.clamd OK 0.007 Sat Dec 17 19:40:46 2016 +40.vsftpdOK 0.013 Sat Dec 17 19:40:46 2016 +41.httpd OK 0.015 Sat Dec 17 19:40:46 2016 +49.winbind OK 0.022 Sat Dec 17 19:40:46 2016 +50.samba ERROR 0.077 Sat Dec 17 19:40:46 2016 + OUTPUT: ERROR: samba tcp port 445 is not responding + @@ -741,37 +763,15 @@ Interface[2]: Name:eth5 Link:up References:2 (active) scriptstatus - This command displays which event scripts where run in the previous - monitoring cycle and the result of each script. If a script - failed with an error, causing the node to become unhealthy, - the output from that script is also shown. + This is an alias for ctdb event status legacy + EVENT, where EVENT defaults to + monitor. This command is deprecated. It's provided for backward - compatibility. In place of ctdb scriptstatus, - use ctdb event status. + compatibility. Use ctdb event status + instead. - - Example - -# ctdb scriptstatus -00.ctdb OK 0.011 Sat Dec 17 19:40:46 2016 -01.reclock OK 0.010 Sat Dec 17 19:40:46 2016 -05.systemOK 0.030 Sat Dec 17 19:40:46 2016 -06.nfs OK
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6e4c7ae9a2e ctdb-tests: Log to stderr in statd-callout tests via ef15a34d5dd ctdb-scripts: Support script logging to stderr via 0ac9413735a ctdb-scripts: Avoid ShellCheck warning SC2162 via 59c5010b6ec ctdb-scripts: Reformat with "shfmt -w -p -i 0 -fn" via 2e2d81b92a9 ctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY) via 862fc5770cb ctdb: Do not use egrep via 4deb178eb3e ctdb-doc: Correct bit-rotted documenation via dbbede407f7 ctdb-utils: Drop unused scsi_io.c source file from 7c0a1c1e13f s3:winbind: Set/unset the winbind_call_flow callback if log level changes https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6e4c7ae9a2e2be4375a33e7361b8748f9307dbfe Author: Martin Schwenke Date: Sun Jul 16 20:55:57 2023 +1000 ctdb-tests: Log to stderr in statd-callout tests Errors logged when testing statd-callout don't currently go anywhere. This is because arguments to the hacked version of script_log() are ignored. Remove the hack and configure logging to stderr. This could go in the local statd-callout.sh setup script. However, make it available for other script tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jul 19 09:57:37 UTC 2023 on atb-devel-224 commit ef15a34d5dd0d90e52f0fc76123077bebba949e9 Author: Martin Schwenke Date: Sun Jul 16 20:52:54 2023 +1000 ctdb-scripts: Support script logging to stderr Logging in statd-callout tests is currently useless. This will provide a way of seeing errors in those tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0ac9413735a6da449d565ff30c1e9005c739d394 Author: Martin Schwenke Date: Sun Jul 16 20:49:57 2023 +1000 ctdb-scripts: Avoid ShellCheck warning SC2162 SC2162 read without -r will mangle backslashes. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 59c5010b6eca2f529073a348656db8f42f414365 Author: Martin Schwenke Date: Sun Jul 16 20:47:09 2023 +1000 ctdb-scripts: Reformat with "shfmt -w -p -i 0 -fn" Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2e2d81b92a98f97f404f536368178de3c1bfb284 Author: Martin Schwenke Date: Wed Oct 12 09:05:25 2022 +1100 ctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY) usecs is going to be passed as a uint32_t. There is no need to calculate it as a time_t. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 862fc5770cb672e91622fdfc01a46dc155a8c723 Author: Martin Schwenke Date: Tue Jul 11 08:03:22 2023 +1000 ctdb: Do not use egrep On some platforms, egrep prints a deprecation warning to stderr: egrep: warning: egrep is obsolescent; using grep -E Use grep -E instead. This is nice and simple, so no use splitting this commit into 2 separate commits for each of tools and test. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4deb178eb3e1c3236cc9a272336909305af0ad77 Author: Martin Schwenke Date: Fri Jun 16 13:29:22 2023 +1000 ctdb-doc: Correct bit-rotted documenation Loading tunables is now done in ctdbd, so find another example for the "setup" event. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit dbbede407f79a8e8a0526f9540bb8d70c9f1c5c8 Author: Martin Schwenke Date: Thu Mar 23 10:24:49 2023 +1100 ctdb-utils: Drop unused scsi_io.c source file It will be in the git history if we ever decide to use SCSI persistent reservations as a cluster lock. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/events/README |2 +- ctdb/config/functions | 966 ctdb/server/ctdb_recoverd.c|2 +- ctdb/tests/CLUSTER/complex/scripts/local.bash |2 +- .../INTEGRATION/simple/cluster.090.unreachable.sh |2 +- ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local |5 - ctdb/tests/UNIT/eventscripts/scripts/local.sh |4 +- ctdb/tools/ctdb_diagnostics|2 +- ctdb/utils/scsi_io/scsi_io.c | 1152 9 files changed, 495 insertions(+), 1642 deletions(-) delete mode 100644 ctdb/utils/scsi_io/scsi_io.c Changeset truncated at 500 lines: diff --git a/ctdb/config/events/README b/ctdb/config/events/README index 6ee6e6fae78..6553830326a 100644 --- a/ctdb/config/events/README +++ b/ctdb/config/events/
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 61dfc8bc069 ctdb-server: Avoid logging a count of 0 resent calls via 60bf6f68e17 ctdb-tools: Switch tickle ACK sending message to INFO level via 6dac1da9cd3 ctdb-tools: Fix a typo in a log message via 51d0445a7d7 ctdb-logging: Really make NOTICE the default debug level from edad945339f librpc/nbt: Avoid reading invalid member of union https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 61dfc8bc0695931e7dd7fed842d0561065af179c Author: Martin Schwenke Date: Thu Jun 15 10:31:07 2023 +1000 ctdb-server: Avoid logging a count of 0 resent calls This fixes a little thinko in commit 80de84d36e9c29d9506976f991560fb5dde99471, where this was overlooked. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Jul 10 15:15:06 UTC 2023 on atb-devel-224 commit 60bf6f68e17c37debc54304c45a1e3695a97c3cc Author: Martin Schwenke Date: Wed Mar 1 08:51:08 2023 +1100 ctdb-tools: Switch tickle ACK sending message to INFO level DEBUG level logging in ctdb_killtcp is very noisy. The most important messages when debugging are those for tickle ACKs and TCP RSTs. TCP RSTs are already logged at INFO level, so promote tickle ACKs to INFO level too. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6dac1da9cd303791c2b140548435a8a1417e7232 Author: Martin Schwenke Date: Wed Mar 1 08:43:30 2023 +1100 ctdb-tools: Fix a typo in a log message Signed-off-by: Martin Schwenke Reported-by: Ulrich Sibiller Reviewed-by: Amitay Isaacs commit 51d0445a7d7401699cf65d648ef007814258fb54 Author: Martin Schwenke Date: Fri Feb 10 17:57:13 2023 +1100 ctdb-logging: Really make NOTICE the default debug level NOTICE level debug messages in common/run_event.c are not logged by default. Currently eventd ends up using ERROR, since this is specified as LOGGING_LOG_LEVEL_DEFAULT. It doesn't inherit the debug level from ctdbd and only uses NOTICE level when interactive. Change the real logging default to NOTICE and use it everywhere. Followups might be: * Remove the default_log_level argument to logging_conf_init() * Kick eventd to update debug level when "ctdb setdebug" is used Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/logging_conf.c | 2 +- ctdb/server/ctdb_call.c | 4 ctdb/server/ctdb_config.c| 2 +- ctdb/tests/UNIT/cunit/config_test_001.sh | 2 +- ctdb/tests/UNIT/cunit/config_test_002.sh | 2 +- ctdb/tools/ctdb_killtcp.c| 6 +++--- 6 files changed, 11 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/logging_conf.c b/ctdb/common/logging_conf.c index 1cd929eb533..38b3003a3f7 100644 --- a/ctdb/common/logging_conf.c +++ b/ctdb/common/logging_conf.c @@ -26,7 +26,7 @@ #include "common/logging_conf.h" #define LOGGING_LOCATION_DEFAULT "file:" LOGDIR "/log.ctdb" -#define LOGGING_LOG_LEVEL_DEFAULT "ERROR" +#define LOGGING_LOG_LEVEL_DEFAULT "NOTICE" static bool logging_conf_validate_log_level(const char *key, const char *old_loglevel, diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index cef271958c5..a51a92d3e45 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -1417,6 +1417,10 @@ void ctdb_call_resend_db(struct ctdb_db_context *ctdb_db) ctdb_call_resend(state); count++; } + /* Avoid logging a 0 count below */ + if (count == 0) { + return; + } D_NOTICE("Resent calls for database=%s, generation=%u, count=%u\n", ctdb_db->db_name, ctdb_db->generation, diff --git a/ctdb/server/ctdb_config.c b/ctdb/server/ctdb_config.c index 72830278c42..3f61fdae169 100644 --- a/ctdb/server/ctdb_config.c +++ b/ctdb/server/ctdb_config.c @@ -145,7 +145,7 @@ int ctdbd_config_load(TALLOC_CTX *mem_ctx, return ret; } - logging_conf_init(conf, "NOTICE"); + logging_conf_init(conf, NULL); cluster_conf_init(conf); database_conf_init(conf); event_conf_init(conf); diff --git a/ctdb/tests/UNIT/cunit/config_test_001.sh b/ctdb/tests/UNIT/cunit/config_test_001.sh index 5dd45819968..70bf77f7939 100755 --- a/ctdb/tests/UNIT/cunit/config_test_001.sh +++ b/ctdb/tests/UNIT/cunit/config_test_001.sh @@ -30,7 +30,7 @@ database_state_dbdir=$(ctdb-config get \ ok < "$conffi
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d9dda4b7af2 ctdb-scripts: Add debugging variable CTDB_KILLTCP_DEBUGLEVEL via 9f7d69a05b6 ctdb-common: Support IB in pcap-based capture via e5541a7e022 ctdb-common: Support "any" interface for pcap-based capture via 3bf20300ac5 ctdb-common: Add packet type detection to pcap-based capture via 5dd964aa029 ctdb-tools: Improve/add debug via 33a80c1d63f ctdb-common: Improve/add debug via 075414dc054 ctdb-common: Use pcap_get_selectable_fd() via 40380a8042d ctdb-common: Stop a pcap-related crash on error via 8b54587b1ae ctdb-common: Fix a warning in the pcap code via ad445abebde ctdb-common: Do not use raw socket when ENABLE_PCAP is defined via c522f4f6045 ctdb-common: Move a misplaced comment via d1543d5c788 ctdb-build: Add --enable-pcap configure option via a83e9ca696a ctdb-build: Use pcap-config when available from 3b6255b5b90 s3:locking: remove unused get_share_mode_lock() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d9dda4b7af284ecbee4d04a89bd16fc0098e2931 Author: Martin Schwenke Date: Tue Sep 6 11:59:11 2022 +1000 ctdb-scripts: Add debugging variable CTDB_KILLTCP_DEBUGLEVEL To debug ctdb_killtcp failures, add CTDB_KILLTCP_DEBUGLEVEL=DEBUG to script.options. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Sep 20 11:42:16 UTC 2022 on sn-devel-184 commit 9f7d69a05b6114efe18bf4c86ca8de7789e9a96d Author: Martin Schwenke Date: Mon Aug 15 10:52:27 2022 +1000 ctdb-common: Support IB in pcap-based capture Add simple support for IPoIB via DLT_LINUX_SLL and DLT_LINUX_SLL2. This seems to work, even when an IB interface is specified. If this is later found to be insufficient, support for DLT_IPOIB can be implemented. See https://www.tcpdump.org/linktypes.html for a starting point. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e5541a7e0220a88d59d574d501626b0598050c52 Author: Martin Schwenke Date: Mon Aug 15 10:51:47 2022 +1000 ctdb-common: Support "any" interface for pcap-based capture This uses Linux cooked capture link-layer headers. See: https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL2.html The header type needs to be checked to ensure the protocol type (i.e. ether type, for the protocols we might be interested in) is meaningful. The size of the header needs to be known so it can be skipped, allowing the IP header to be found and parsed. It would be possible to define support for DLT_LINUX_SLL2 if it is missing. However, if a platform is missing support in the header file then it is almost certainly missing in the run-time library too. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3bf20300ac5962e71069be3998ef7f0502045d24 Author: Martin Schwenke Date: Mon Aug 15 09:43:58 2022 +1000 ctdb-common: Add packet type detection to pcap-based capture The current code will almost certainly generate ENOMSG for non-ethernet packets, even for ethernet packets when the "any" interface is used. pcap_datalink(3PCAP) says: Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the "any" device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the sys‐ tem at the time the "any" device is opened have some other data link type, such as DLT_EN10MB for Ethernet. So, pcap_datalink() must be used. Detect pcap packet types that are supported (currently only ethernet) in the open code. There is no use continuing if the read code can't parse packets. The pattern of using switch statements supports future addition of other packet types. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5dd964aa0297b6e9ab8e1d0ff9fa0565c97ea43e Author: Martin Schwenke Date: Mon Aug 15 09:41:09 2022 +1000 ctdb-tools: Improve/add debug In particular, knowing the reason fetching the packet fails can help with debugging unsupported protocols in the pcap code. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 33a80c1d63fd2e6163ef6c704b2e714e71b01384 Author: Martin Schwenke Date: Mon Aug 15 14:30:09 2022 +1000 ctdb-common: Improve/add debug Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 075414dc05455a5cd33a244efd51be6
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4f5b4bd9dfb ctdb-tests: Reformat remaining test stubs with "shfmt -w -p -i 0 -fn" via 0e388a1994e ctdb-tests: Include eventscript stub commands in shellcheck test via 4ee0abaece9 ctdb-tests: Avoid shellcheck warnings in remaining test stubs via a31fb7e5ab8 ctdb-scripts: Simplify determination of real interface via 5abaec49927 ctdb-tests: Implement "ip -brief link show" in ip stub via ef921bdbdba ctdb-tests: Avoid ShellCheck warnings via 67e0ca5e014 ctdb-tests: Reformat script with "shfmt -w -p -i 0 -fn" via 517f09eb6f3 ctdb-scripts: Drop assumption that there are VLANs with no '@' from cc64ea24daa CVE-2020-25720 s4:dsdb/descriptor: explain lack of dSHeuristics check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4f5b4bd9dfb7690359dbae6b687f97946761dd22 Author: Martin Schwenke Date: Fri Aug 26 09:16:49 2022 +1000 ctdb-tests: Reformat remaining test stubs with "shfmt -w -p -i 0 -fn" Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Sep 16 04:35:09 UTC 2022 on sn-devel-184 commit 0e388a1994e0f6715466eba1d3bdd765c36f956f Author: Martin Schwenke Date: Thu Aug 18 09:36:08 2022 +1000 ctdb-tests: Include eventscript stub commands in shellcheck test Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4ee0abaece92efd28901801c020cfdf5b80fcadb Author: Martin Schwenke Date: Thu Aug 18 08:59:28 2022 +1000 ctdb-tests: Avoid shellcheck warnings in remaining test stubs A small amount of effort... Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a31fb7e5ab8439349bc2670b3fde1020ba2c48b5 Author: Martin Schwenke Date: Wed Aug 17 11:38:44 2022 +1000 ctdb-scripts: Simplify determination of real interface This can now be made trivial. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5abaec499275bc47fb596e6bf2fa9fe98a891e79 Author: Martin Schwenke Date: Wed Aug 17 11:37:56 2022 +1000 ctdb-tests: Implement "ip -brief link show" in ip stub Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ef921bdbdbacecf39ee2a1851f16dbba62175fcc Author: Martin Schwenke Date: Wed Aug 17 12:12:30 2022 +1000 ctdb-tests: Avoid ShellCheck warnings Although this is a test stub, it is complicated enough to encourage ShellCheck cleanliness. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 67e0ca5e01439b9efe4611c5fcfd0bf2ac69423b Author: Martin Schwenke Date: Wed Aug 17 11:41:33 2022 +1000 ctdb-tests: Reformat script with "shfmt -w -p -i 0 -fn" As per current Samba convention. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 517f09eb6f325af0d69b14d5b6b0e6b84616c6ce Author: Martin Schwenke Date: Wed Aug 17 11:04:10 2022 +1000 ctdb-scripts: Drop assumption that there are VLANs with no '@' VLAN configuration on Linux often uses a convention of naming a VLAN on with VLAN ID as .. To be able to monitor the underlying interface, the original 10.interface code naively simply stripped off the '.' and everything after (i.e. ".*", as a glob pattern). Some users do not use the above convention. A VLAN can be named without including the underlying interface, but still with a tag (e.g. vlan - the word "vlan" following by the tag) or, more generally, perhaps without a tag (e.g. - an arbitrary name). The ip(8) command lists a VLAN as @. The underlying interface can be found by stripping everything up to and including an '@' (i.e. "*@"). Commit bc71251433ce618c95c674d7cbe75b01a94adad9 added support for stripping "*@". However, on suspicion, it kept support for the case where there is no '@', falling back to stripping ".*". If ip(8) ever did this then it was a long time ago - it has been printing a format including '@' since at least 2004. Stripping ".*" interferes with interesting administrative decisions, like having '.' in interface names. So, drop the fallback to stripping ".*" because it appears to be unnecessary and can cause inconvenience. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/functions | 29 +- ctdb/tests/UNIT/eventscripts/stubs/ctdb| 498 ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp|5 +- ctdb/tests/UNIT/eventscripts/stub
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a0e0fde039e ctdb-tests: Avoid shellcheck warnings via ff4935d180e ctdb-tests: Simplify IP address checking via 42aedc62e3a ctdb-tests: Fix typos via b88e7322d9b ctdb-tests: Reformat script using shfmt -w -p -i 0 -fn from f99fb9aa120 python:tests: Allocate OID range for testing to avoid collisions https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a0e0fde039e924d192294ad95da4344eff390c0c Author: Martin Schwenke Date: Mon Aug 8 18:19:34 2022 +1000 ctdb-tests: Avoid shellcheck warnings Mostly SC2086: Double quote to prevent globbing and word splitting. Use ctdb_onnode() where it simplifies code. No behaviour changes intended. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Aug 25 16:15:45 UTC 2022 on sn-devel-184 commit ff4935d180e1a290e4ba7ab0f8710d9a022d1b82 Author: Martin Schwenke Date: Thu Aug 11 09:15:38 2022 +1000 ctdb-tests: Simplify IP address checking Use a new function and wait_until() to simplify. get_test_ip_mask_and_iface() not needed here because select_test_node_and_ips() sets $test_ip, and neither $mask nor $iface is used. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 42aedc62e3a16bcdafbef06140105650f15f6269 Author: Martin Schwenke Date: Mon Aug 8 18:11:26 2022 +1000 ctdb-tests: Fix typos These lines are just wrong: try_command_on_node -v $test_node "ip addr show to ${test_node}" if -n "$out"; then The 2nd variable referenced should be $test_ip. The 2nd line causes "-n: command not found" because it is missing [] test command brackets. Both typos would probably make the test pass unconditionally. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b88e7322d9b4cf617381b12deb393edd87d1cf73 Author: Martin Schwenke Date: Mon Aug 8 18:09:56 2022 +1000 ctdb-tests: Reformat script using shfmt -w -p -i 0 -fn Whitespace changes only. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: .../CLUSTER/complex/11_ctdb_delip_removes_ip.sh| 37 +- 1 file changed, 15 insertions(+), 22 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh index dba6d075c8d..072780ac215 100755 --- a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh +++ b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh @@ -8,36 +8,29 @@ set -e +test_node_has_test_ip() +{ + # $test_node and $test_ip set by select_test_node_and_ips() + # shellcheck disable=SC2154 + try_command_on_node "$test_node" "ip addr show to ${test_ip}" + [ -n "$out" ] +} + ctdb_test_init select_test_node_and_ips -get_test_ip_mask_and_iface +# $test_node and $test_ip set by select_test_node_and_ips() +# shellcheck disable=SC2154 echo "Checking that node ${test_node} hosts ${test_ip}..." -try_command_on_node $test_node "ip addr show to ${test_ip} | grep -q ." +test_node_has_test_ip echo "Attempting to remove ${test_ip} from node ${test_node}." -try_command_on_node $test_node $CTDB delip $test_ip -try_command_on_node $test_node $CTDB ipreallocate -wait_until_ips_are_on_node '!' $test_node $test_ip +ctdb_onnode "$test_node" "delip ${test_ip}" +ctdb_onnode "$test_node" "ipreallocate" +wait_until_ips_are_on_node '!' "$test_node" "$test_ip" -timeout=60 -increment=5 -count=0 echo "Waiting for ${test_ip} to disappear from node ${test_node}..." -while : ; do -try_command_on_node -v $test_node "ip addr show to ${test_node}" -if -n "$out" ; then - echo "Still there..." - if [ $(($count * $increment)) -ge $timeout ] ; then - echo "BAD: Timed out waiting..." - exit 1 - fi - sleep_for $increment - count=$(($count + 1)) -else - break -fi -done +wait_until 60/5 '!' test_node_has_test_ip echo "GOOD: IP was successfully removed!" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3aecd6e7b50 ctdb-common: CID 1507498: Control flow issues (DEADCODE) from 7a6bd227989 lib:replace: Remove from filesys.h https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3aecd6e7b501abfd2c65f8d006a67001f79dd5fc Author: Martin Schwenke Date: Sat Jul 30 10:19:56 2022 +1000 ctdb-common: CID 1507498: Control flow issues (DEADCODE) Fix typo in error checking. While here adjust the bottom of the range, making errno 0 invalid. Add corresponding test cases using an alternative syntax for errno packets (#nnn[;] - trailing ';' is optional). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Aug 1 09:19:55 UTC 2022 on sn-devel-184 --- Summary of changes: ctdb/common/tmon.c | 2 +- ctdb/tests/UNIT/cunit/tmon_test_002.sh | 29 + ctdb/tests/src/tmon_test.c | 11 +++ 3 files changed, 41 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/tmon.c b/ctdb/common/tmon.c index 87a55e3b1e9..04bad1f3bf4 100644 --- a/ctdb/common/tmon.c +++ b/ctdb/common/tmon.c @@ -97,7 +97,7 @@ bool tmon_set_exit(struct tmon_pkt *pkt) bool tmon_set_errno(struct tmon_pkt *pkt, int err) { - if (err < 0 && err > UINT16_MAX) { + if (err <= 0 || err > UINT16_MAX) { return false; } diff --git a/ctdb/tests/UNIT/cunit/tmon_test_002.sh b/ctdb/tests/UNIT/cunit/tmon_test_002.sh index 97a17a188e5..e4118a3d09a 100755 --- a/ctdb/tests/UNIT/cunit/tmon_test_002.sh +++ b/ctdb/tests/UNIT/cunit/tmon_test_002.sh @@ -4,6 +4,7 @@ epipe=$(errcode EPIPE) etimedout=$(errcode ETIMEDOUT) +edom=$(errcode EDOM) test_cases() { @@ -35,6 +36,34 @@ WRITER OK EOF unit_test tmon_test "7" false 0 false + test_case "errno 110 packet @ 1s, no timeout" + ok <write_data[state->offset]; + err = (int)strtol(t, , 10); + state->offset += (end - t); + if (state->write_data[state->offset] == ';') { + state->offset++; + } + status = tmon_set_errno(pkt, err); + break; default: status = false; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3efa56aa61d ctdb-daemon: Fix printing of tickle ACKs from ffa84f2e5d3 py/uptodateness: more details in missing dn report https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3efa56aa61da952f869f43188b0d53a11c820ca0 Author: Martin Schwenke Date: Tue Jul 5 19:33:15 2022 +1000 ctdb-daemon: Fix printing of tickle ACKs Commit f5a20377347aba18700d010d4201775fc83a0b1b arguably got this back-to-front: 2022-07-27T09:50:01.985857+10:00 testn1 ctdbd[17820]: ../../ctdb/server/ctdb_takeover.c:514 sending TAKE_IP for '10.0.1.173' 2022-07-27T09:50:01.990601+10:00 testn1 ctdbd[17820]: Send TCP tickle ACK: 10.0.1.77:33004 -> 10.0.1.173:2049 2022-07-27T09:50:01.991323+10:00 testn1 ctdb-takeover[19758]: TAKEOVER_IP 10.0.1.173 succeeded on node 0 Unfortunately there is an inconsistency somewhere in the connection tracking code used for tickle ACKs, making this less than obvious. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Jul 28 09:02:08 UTC 2022 on sn-devel-184 --- Summary of changes: ctdb/server/ctdb_takeover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 0fb8076ad55..4d2d0416752 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -402,7 +402,7 @@ static void ctdb_control_send_arp(struct tevent_context *ev, ret = ctdb_connection_to_buf(buf, sizeof(buf), tcon, -true, +false, " -> "); if (ret != 0) { strlcpy(buf, "UNKNOWN", sizeof(buf)); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 30c40046ef0 ctdb-build: Add missing dependency on talloc via e831af7b257 ctdb-tests: Work around unreadable file test failure when root via b20ccaa36da ctdb-scripts: Use "git config" as last resort to parse nfs.conf via db37043bc5c ctdb-scripts: Avoid ShellCheck warning SC2295 via 00f1d6d9476 ctdb-common: Use POSIX if_nameindex() to check interface existence via b686bbb4ac3 replace: Add check for if_nameindex() via c77a4fde7aa ctdb-daemon: Modernise debug in ctdb_add_public_address() via d62fcba7dce ctdb-daemon: Avoid spurious error sending ARPs for released IP via f5a20377347 ctdb-daemon: Modernise debug in ctdb_control_send_arp() via ec5f6425b70 ctdb-protocol: Add separator argument to ctdb_connection_to_buf() via 440bd86a992 ctdb-daemon: Drop unused ban_state element from CTDB node structure via 9898e7c5558 ctdb-recoverd: Clean up banning culprit code via 19fbc2da383 ctdb-recoverd: Add pnn field to banning state structure via 0b5dd076046 ctdb-recoverd: Add function node_flags() and use it in elections from e396eb9fbc7 ctdb-scripts: Only run unhealthy call-out when passing threshold https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 30c40046ef0b52da1dee3a65117c20da2a75955b Author: Martin Schwenke Date: Fri Jul 22 11:41:57 2022 +1000 ctdb-build: Add missing dependency on talloc The include isn't strictly necessary, since it is included via common/reqid.c anyway. However, it is a useful hint. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 22 17:01:00 UTC 2022 on sn-devel-184 commit e831af7b25760dbbc2a0fc5366b36cd885aac838 Author: Martin Schwenke Date: Fri Jul 22 11:05:21 2022 +1000 ctdb-tests: Work around unreadable file test failure when root root can read files for which the mode prohibits reading, so this test case fails when run as root. Work around this when running as root. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b20ccaa36da23c8ee84b117b2e82e98bd2be4fcc Author: Martin Schwenke Date: Thu Jul 21 14:22:25 2022 +1000 ctdb-scripts: Use "git config" as last resort to parse nfs.conf Some versions of nfs-utils (e.g. recent CentOS 7) use /etc/nfs.conf but do not include the nfsconf utility to extract values from the file. However, git has an excellent conf file parser, so use it as a last resort. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit db37043bc5c67e536bcaaf1941cb12ec2e72efc9 Author: Martin Schwenke Date: Fri May 27 23:23:48 2022 +1000 ctdb-scripts: Avoid ShellCheck warning SC2295 For example: In /home/martins/samba/samba/ctdb/tools/onnode line 304: [ "$nodes" != "${nodes%[ ${nl}]*}" ] && verbose=true ^---^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns. Did you mean: [ "$nodes" != "${nodes%[ "${nl}"]*}" ] && verbose=true For more information: https://www.shellcheck.net/wiki/SC2295 -- Expansions inside ${..} need to b... Who knew? Thanks ShellCheck! Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 00f1d6d94764ba1312500c72fd08e7df3fae064b Author: Martin Schwenke Date: Tue Jul 5 12:31:57 2022 +1000 ctdb-common: Use POSIX if_nameindex() to check interface existence This works as an unprivileged user, so avoids unnecessary errors when running in test mode (and not as root): 2022-02-18T12:21:12.436491+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket 2022-02-18T12:21:12.436534+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket 2022-02-18T12:21:12.436557+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket 2022-02-18T12:21:12.436577+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket The corresponding porting test would now become pointless because it would just confirm that "fake" does not exist. Attempt to make it useful by using a less likely name than "fake" and attempting to detect the loopback interface. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b686bbb4ac37296e23e74c1c10145f22b6d29d42 Author: Martin Schwenke Date: Thu Jul 21 11:25:37 2022 +1000 replace: Add check for if_nameindex() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs comm
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e396eb9fbc7 ctdb-scripts: Only run unhealthy call-out when passing threshold via 36bd6fd01f2 ctdb-scripts: Always check memory usage via 5e7bbcb069e ctdb-scripts: Avoid ShellCheck info SC2162 via dc7aaca889a ctdb-scripts: Reduce length of very long lines via fc485feae81 ctdb-scripts: De-clutter validate_percentage() via a832c8e273d ctdb-scripts: Reformat using shfmt -w -p -i 0 -fn via 3df39aa7fbd ctdb-scripts: Avoid ShellCheck warning SC2164 from 21b9734cf2e smbd: Bypass the vfs_gethandle data for default share IPC$ https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e396eb9fbc7b843181cf095051221305ff3578ed Author: Martin Schwenke Date: Fri Jun 10 10:32:01 2022 +1000 ctdb-scripts: Only run unhealthy call-out when passing threshold For memory usage, no need to dump all of this data on every failed monitor event. The first call will be enough to diagnose the problem. The node will then go unhealthy, drop clients and memory usage should then drop. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 22 07:32:54 UTC 2022 on sn-devel-184 commit 36bd6fd01f2c42d818c47f7b49567c40c1aeb5b6 Author: Martin Schwenke Date: Fri Jun 10 10:03:41 2022 +1000 ctdb-scripts: Always check memory usage If filesystem usage exceeds the unhealthy threshold then checking memory usage checking is not done. Always do them both. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5e7bbcb069e45ae30bc53e9f32f3f12a7461d34d Author: Martin Schwenke Date: Fri Jun 10 10:28:56 2022 +1000 ctdb-scripts: Avoid ShellCheck info SC2162 SC2162 (info): read without -r will mangle backslashes. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit dc7aaca889a3a4d6d20b8091324ecc50e0a5a1e6 Author: Martin Schwenke Date: Thu Jun 30 08:55:28 2022 +1000 ctdb-scripts: Reduce length of very long lines Use printf to allow easier line breaks and use some early returns. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit fc485feae818c939e6f12999c7b066c1208a931a Author: Martin Schwenke Date: Fri Jun 10 10:17:28 2022 +1000 ctdb-scripts: De-clutter validate_percentage() It always takes 2 arguments. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a832c8e273dc18ab9a67ed2ed1fa98202d822f10 Author: Martin Schwenke Date: Fri Jun 10 10:13:22 2022 +1000 ctdb-scripts: Reformat using shfmt -w -p -i 0 -fn About to modify this file, so reformat first as per recent Samba convention. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3df39aa7fbd6f8712fda3d90a9c595e7d6aadeef Author: Martin Schwenke Date: Fri Jun 10 10:11:27 2022 +1000 ctdb-scripts: Avoid ShellCheck warning SC2164 SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails. A problem can only occur if /etc/ctdb/ or an important subdirectory is removed, which means the script itself would not be found. Use && to silence ShellCheck. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/ctdb-crash-cleanup.sh | 2 +- ctdb/config/debug-hung-script.sh | 2 +- ctdb/config/debug_locks.sh | 2 +- ctdb/config/events/legacy/00.ctdb.script | 2 +- ctdb/config/events/legacy/01.reclock.script| 2 +- ctdb/config/events/legacy/05.system.script | 255 +++-- ctdb/config/events/legacy/06.nfs.script| 2 +- ctdb/config/events/legacy/10.interface.script | 2 +- ctdb/config/events/legacy/11.natgw.script | 2 +- ctdb/config/events/legacy/11.routing.script| 2 +- ctdb/config/events/legacy/13.per_ip_routing.script | 2 +- ctdb/config/events/legacy/20.multipathd.script | 2 +- ctdb/config/events/legacy/31.clamd.script | 2 +- ctdb/config/events/legacy/40.vsftpd.script | 2 +- ctdb/config/events/legacy/41.httpd.script | 2 +- ctdb/config/events/legacy/48.netbios.script| 2 +- ctdb/config/events/legacy/49.winbind.script| 2 +- ctdb/config/events/legacy/50.samba.script | 2 +- ctdb/config/events/legacy/60.nfs.script| 2 +- ctdb/config/events/legacy/70.iscsi.script | 2 +- ctdb/config/events/legacy/91.lvs.script| 2 +- ctdb/config/statd-callout | 2 +- ctdb/tests/UNIT/shellcheck/scripts/local.sh| 5 +- 23 files
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via be293a125fc ctdb-tests: Add new tool unit tests to cover UNKNOWN state via 794f1258029 ctdb-tool: Add UNKNOWN pseudo state via 428bc71f98f ctdb-tests: Add runstate handling to fake ctdbd via 05601cebc91 ctdb-tests: Return error on empty fake ctdbd configuration blocks from fbf134c8d9e s3:libads: Check if we have a valid sockaddr https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit be293a125fc222867ca1c96e3898073e58f5fa0c Author: Martin Schwenke Date: Fri May 27 08:38:11 2022 +1000 ctdb-tests: Add new tool unit tests to cover UNKNOWN state Signed-off-by: Vinit Agnihotri Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Jun 28 10:16:59 UTC 2022 on sn-devel-184 commit 794f125802969a6b99f2758f70d7c2318309d924 Author: Vinit Agnihotri Date: Tue Apr 26 17:20:21 2022 +1000 ctdb-tool: Add UNKNOWN pseudo state When a node is starting, CTDB reports remote nodes as unhealthy by default. This can be misleading. To hide this, report an "UNKNOWN" pseudo state when a remote node is not disconnected and the runstate is less than or equal to "FIRST_RECOVERY". Signed-off-by: Vinit Agnihotri Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 428bc71f98fd560e1d8ea17fd76b4a34ac9421c6 Author: Vinit Agnihotri Date: Tue Apr 26 17:20:21 2022 +1000 ctdb-tests: Add runstate handling to fake ctdbd Signed-off-by: Vinit Agnihotri Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 05601cebc91e21a65837fcd8fc4635660f7d6ca1 Author: Martin Schwenke Date: Mon Jun 27 10:34:13 2022 +1000 ctdb-tests: Return error on empty fake ctdbd configuration blocks These would be unintended errors. The block should be omitted to keep the default value. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tests/UNIT/tool/ctdb.nodestatus.001.sh| 8 +-- ctdb/tests/UNIT/tool/ctdb.nodestatus.002.sh| 8 +-- ctdb/tests/UNIT/tool/ctdb.nodestatus.003.sh| 8 +-- ctdb/tests/UNIT/tool/ctdb.nodestatus.004.sh| 4 +- ctdb/tests/UNIT/tool/ctdb.nodestatus.005.sh| 4 +- ctdb/tests/UNIT/tool/ctdb.nodestatus.006.sh| 4 +- ctdb/tests/UNIT/tool/ctdb.nodestatus.007.sh| 36 ++ ctdb/tests/UNIT/tool/ctdb.status.001.sh| 8 +-- ctdb/tests/UNIT/tool/ctdb.status.002.sh| 8 +-- .../{ctdb.status.002.sh => ctdb.status.003.sh} | 15 ++-- ctdb/tests/scripts/integration.bash| 16 ++--- ctdb/tests/src/fake_ctdbd.c| 70 -- ctdb/tools/ctdb.c | 83 -- ctdb/tools/ctdb_lvs| 8 +-- ctdb/tools/ctdb_natgw | 10 +-- 15 files changed, 232 insertions(+), 58 deletions(-) create mode 100755 ctdb/tests/UNIT/tool/ctdb.nodestatus.007.sh copy ctdb/tests/UNIT/tool/{ctdb.status.002.sh => ctdb.status.003.sh} (65%) Changeset truncated at 500 lines: diff --git a/ctdb/tests/UNIT/tool/ctdb.nodestatus.001.sh b/ctdb/tests/UNIT/tool/ctdb.nodestatus.001.sh index 2217afcc0b9..3c754e2a838 100755 --- a/ctdb/tests/UNIT/tool/ctdb.nodestatus.001.sh +++ b/ctdb/tests/UNIT/tool/ctdb.nodestatus.001.sh @@ -25,9 +25,9 @@ EOF simple_test all required_result 0 <num_nodes += 1; } + if (node_map->num_nodes == 0) { + goto fail; + } + DEBUG(DEBUG_INFO, ("Parsing nodemap done\n")); return true; @@ -521,6 +525,10 @@ static bool interfaces_parse(struct interface_map *iface_map) iface_map->num += 1; } + if (iface_map->num == 0) { + goto fail; + } + DEBUG(DEBUG_INFO, ("Parsing interfaces done\n")); return true; @@ -588,6 +596,10 @@ static bool vnnmap_parse(struct vnn_map *vnn_map) vnn_map->size += 1; } + if (vnn_map->size == 0) { + goto fail; + } + DEBUG(DEBUG_INFO, ("Parsing vnnmap done\n")); return true; @@ -606,8 +618,7 @@ static bool reclock_parse(struct ctdbd_context *ctdb) } if (line[0] == '\n') { - /* Recovery lock remains unset */ - goto ok; + goto fail; } /* Get rid of pesky newline */ @@ -619,7 +630,7 @@ static bool reclock_parse(struct ctdbd_context *ctdb) if (ctdb->reclock == NULL) { goto fail; } -ok: + /* Swallow possible blank line follow
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 80ba66013ef ctdb-scripts: Drop use of eval in CTDB callout handling via 4cbb0b13ba2 ctdb-tests: Do not require eval tricks for faking NFS callout via 0247fd8a02b ctdb-scripts: Avoid ShellCheck warning SC2162 via 7f799a8d6f8 ctdb-tests: Fix faking of program stack traces via 0b728a4e8f6 ctdb-tests: Improve Debian-style event script unit testing via 7f3a0c7e9c5 ctdb-scripts: Parameterise /etc directory to aid testing via 337ef7c1b41 ctdb-scripts: Set NFS services to "AUTO" if started by another service via 8b8660d883c ctdb-scripts: Refactor the manual RPC service start/stop via cd018d0ff5c ctdb-scripts: Simplify and rename basic_stop() and basic_start() via 09fd1e55796 ctdb-scripts: Move nfslock out of basic_stop() and basic_start() via a43a1ebe51d ctdb-tests: Reformat script from 8458449ddf1 s3:waf: Fix version number of public libsmbconf https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 80ba66013efeec2f2df8429321a8630ef7780a8f Author: Martin Schwenke Date: Fri May 27 23:19:46 2022 +1000 ctdb-scripts: Drop use of eval in CTDB callout handling eval is not required and causes the follow ShellCheck warning: SC2294 (warning): eval negates the benefit of arrays. Drop eval to preserve whitespace/symbols (or eval as string). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jun 24 10:40:50 UTC 2022 on sn-devel-184 commit 4cbb0b13ba26a4b8de1334f1d166e0cb33d89383 Author: Martin Schwenke Date: Fri May 27 23:16:28 2022 +1000 ctdb-tests: Do not require eval tricks for faking NFS callout The current code requires the use of eval in the NFS callout handling to facilitate testing. Improve the code to remove this need. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0247fd8a02bf3840940d781c8323be3fa07c4d5e Author: Martin Schwenke Date: Fri Mar 18 13:40:20 2022 +1100 ctdb-scripts: Avoid ShellCheck warning SC2162 SC2162 read without -r will mangle backslashes Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7f799a8d6f89d2b9f7ae06858e901981d9cc186a Author: Martin Schwenke Date: Fri Mar 18 13:00:40 2022 +1100 ctdb-tests: Fix faking of program stack traces The current code works in all current cases but is lazy and wrong. Fix it to avoid breaking on code changes involving different thread setups. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0b728a4e8f6f81b5c2b44fa65d2b68167eb8e7ce Author: Martin Schwenke Date: Fri Mar 18 12:55:07 2022 +1100 ctdb-tests: Improve Debian-style event script unit testing Tests can be run by hand using different distro styles, such as: CTDB_NFS_DISTRO_STYLE=systemd-debian \ ./tests/run_tests.sh ./tests/UNIT/eventscripts/{06,60}.nfs.* This fixes known problems for Debian styles, so the tests now pass for the following values of CTDB_NFS_DISTRO_STYLE: systemd-redhat sysvinit-redhat systemd-debian sysvinit-debian Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7f3a0c7e9c5388b5947e0d79105335508967a7ea Author: Martin Schwenke Date: Fri Mar 18 12:52:10 2022 +1100 ctdb-scripts: Parameterise /etc directory to aid testing At the moment test results can be influenced by real system configuration files. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 337ef7c1b417cce94a6f1480f17dae477fadf565 Author: Martin Schwenke Date: Fri Mar 18 12:47:10 2022 +1100 ctdb-scripts: Set NFS services to "AUTO" if started by another service For example, in Sys-V init "rquotad" is started by the main "nfs" service. At the moment the call-out can't distinguish between this case and "should never be run". Services set to "AUTO" are hand-stopped/started via service_stop()/service_start() on failure via restart_after. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8b8660d883cb5130f40fa8993cd4cae96cf1dde4 Author: Martin Schwenke Date: Mon May 23 14:21:37 2022 +1000 ctdb-scripts: Refactor the manual RPC service start/stop This logic needs improving, so factor the decision making into new functions service_or_manual_stop() and service_or_manual_start(). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cd018d0ff5c57ccd50f64fd0ed1591e3dfe27baf Author: Martin Schwenke Date: Fri Mar 18 10:41:26 2022 +1100 ctdb-scripts: Simplify and rename basic_stop() and basic_start()
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b20ee18031c ctdb-tests: Fix a cut and paste error in a comment via 90a96f06a93 ctdb-recoverd: Do not ban on unknown error when taking cluster lock via a400f4e7cc0 ctdb-doc: Fix typos in the policy routing documentation via da9decfc5e3 ctdb-daemon: Remove unused #includes of rb_tree.h via 80de84d36e9 ctdb-daemon: Log per-database summary of resent calls from 3567f4130d8 debug: update comments about setup_logging() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b20ee18031c5280c78ad1ec9d2c5cc6d28be719f Author: Martin Schwenke Date: Tue May 24 11:30:20 2022 +1000 ctdb-tests: Fix a cut and paste error in a comment Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue May 31 05:56:43 UTC 2022 on sn-devel-184 commit 90a96f06a938d5fdae33c959c71103add3064b96 Author: Martin Schwenke Date: Thu May 19 15:09:41 2022 +1000 ctdb-recoverd: Do not ban on unknown error when taking cluster lock If the cluster filesystem is unavailable then I/O errors may occur. This is no worse than contention, so don't ban. This avoids having services unavailable for longer than necessary. Update the associated test to simply confirm that this results in a leaderless cluster, and leadership is restored when the lock can once again be taken. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a400f4e7cc0f48efd7b88354d1a550615fec6d64 Author: Martin Schwenke Date: Fri Mar 4 08:52:32 2022 +1100 ctdb-doc: Fix typos in the policy routing documentation Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit da9decfc5e35d7d59987904d4dc03cf2ce1db3e7 Author: Martin Schwenke Date: Wed Feb 23 09:57:33 2022 +1100 ctdb-daemon: Remove unused #includes of rb_tree.h ctdb_takeover.c and eventscript.c no longer use this. ipalloc_common.c has never used it. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 80de84d36e9c29d9506976f991560fb5dde99471 Author: Martin Schwenke Date: Fri Oct 15 11:10:46 2021 +1100 ctdb-daemon: Log per-database summary of resent calls After a recovery that takes a significant amount of time the logs are flooded with messages about every resent call. Log a summary instead and demote per-call messages to INFO level. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/doc/ctdb.7.xml| 4 +- ctdb/server/ctdb_call.c| 12 ++- ctdb/server/ctdb_recoverd.c| 7 -- ctdb/server/ctdb_takeover.c| 1 - ctdb/server/eventscript.c | 1 - ctdb/server/ipalloc_common.c | 1 - .../cluster.008.capability_leader_yield_no_lock.sh | 3 +- .../simple/cluster.016.reclock_move_lock_dir.sh| 90 +++--- 8 files changed, 60 insertions(+), 59 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index 6daa092f837..351f3e8b6f7 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -895,7 +895,7 @@ CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1 - 192.168.1.99 192.168.1.1/24 + 192.168.1.99 192.168.1.0/24 @@ -918,7 +918,7 @@ CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1 - This causes traffic from 192.168.1.1 to 192.168.1.0/24 go via + This causes traffic from 192.168.1.99 to 192.168.1.0/24 go via eth2. diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index 14baa797bd6..1d5dea32962 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -1398,8 +1398,10 @@ static void ctdb_call_resend(struct ctdb_call_state *state) state->c->hdr.destnode = ctdb->pnn; ctdb_queue_packet(ctdb, >c->hdr); - DEBUG(DEBUG_NOTICE,("resent ctdb_call for db %s reqid %u generation %u\n", - state->ctdb_db->db_name, state->reqid, state->generation)); + D_INFO("resent ctdb_call for db %s reqid %u generation %u\n", + state->ctdb_db->db_name, + state->reqid, + state->generation); } /* @@ -1408,11 +1410,17 @@ static void ctdb_call_resend(struct ctdb_call_state *state) void ctdb_call_resend_db(struct ctdb_db_context *ctdb_db) { struct ctdb_call_state *state, *next; + unsigned int count = 0; for (state = ctdb_db->pending_calls; state; state = next) { next = state->nex
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 64275fc1a22 ctdb-tests: Add backtrace on abort to some tests via d39377d6fc9 ctdb-tests: Provide a method to dump the stack on abort via 73b27def7b7 build: Add missing ctdb-client dependencies via d57d624a77e ctdb-build: Drop unnecessary uses of include/ sub-directory via 6d3c9e64d91 ctdb-tests: Use test_case() to help document test cases via d52b497d11a ctdb-locking: Don't pass NULL to tevent_req_is_unix_error() via 490e5f4d4ce ctdb-mutex: Don't pass NULL to tevent_req_is_unix_error() from 45b648486b9 s3:tests: Reformat test_deadtime.sh https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 64275fc1a2276adf73ab35d5df6e1a4b77058908 Author: Martin Schwenke Date: Mon Feb 28 15:44:59 2022 +1100 ctdb-tests: Add backtrace on abort to some tests These are easier to debug with a backtrace. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue May 3 10:13:23 UTC 2022 on sn-devel-184 commit d39377d6fc91763b094f2cc888475287de7fbd3b Author: Martin Schwenke Date: Wed Jan 5 13:45:33 2022 +1100 ctdb-tests: Provide a method to dump the stack on abort Some tests make generous use of assert() and it can be difficult to guess the cause of failures without resorting to GDB. This provides some help. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 73b27def7b729de7fc4e48025b1491a609e73332 Author: Martin Schwenke Date: Mon May 2 14:25:42 2022 +1000 build: Add missing ctdb-client dependencies Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d57d624a77e437769a5252584ed79da38e272fed Author: Martin Schwenke Date: Mon Feb 7 09:37:14 2022 +1100 ctdb-build: Drop unnecessary uses of include/ sub-directory None of these include any files from the include/ sub-directory. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6d3c9e64d91a67e717cd0cea1ca59faffed2c5ef Author: Martin Schwenke Date: Mon Feb 28 15:44:04 2022 +1100 ctdb-tests: Use test_case() to help document test cases Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d52b497d11a2d5d82fabc8d20d656682af2f3c9d Author: Martin Schwenke Date: Fri Jan 21 12:14:05 2022 +1100 ctdb-locking: Don't pass NULL to tevent_req_is_unix_error() If there is an error then this pointer is unconditionally dereferenced. However, the only possible error appears to be ENOMEM, where a crash caused by dereferencing a NULL pointer isn't a terrible outcome. In the absence of a security issue this is probably not worth backporting. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 490e5f4d4ce2facd4c396a2e213f53de923629c2 Author: Martin Schwenke Date: Fri Jan 21 12:09:45 2022 +1100 ctdb-mutex: Don't pass NULL to tevent_req_is_unix_error() If there is an error then this pointer is unconditionally dereferenced. However, the only possible error appears to be ENOMEM, where a crash caused by dereferencing a NULL pointer isn't a terrible outcome. In the absence of a security issue this is probably not worth backporting. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/server/ctdb_lock_helper.c | 11 +++--- ctdb/server/ctdb_mutex_fcntl_helper.c | 31 +--- ctdb/tests/UNIT/cunit/cluster_mutex_001.sh | 7 ctdb/tests/UNIT/cunit/cluster_mutex_002.sh | 11 ++ ctdb/tests/UNIT/cunit/cluster_mutex_003.sh | 7 ctdb/tests/UNIT/cunit/system_socket_test_002.sh| 6 ctdb/tests/UNIT/cunit/system_socket_test_003.sh| 3 ++ ctdb/tests/src/cluster_mutex_test.c| 4 +++ ctdb/tests/src/system_socket_test.c| 4 +++ .../{ipalloc_read_known_ips.h => test_backtrace.c} | 27 -- .../mkdir_p.h => ctdb/tests/src/test_backtrace.h | 12 --- ctdb/wscript | 41 -- 12 files changed, 121 insertions(+), 43 deletions(-) copy ctdb/tests/src/{ipalloc_read_known_ips.h => test_backtrace.c} (60%) copy lib/util/mkdir_p.h => ctdb/tests/src/test_backtrace.h (72%) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_lock_helper.c b/ctdb/server/ctdb_lock_helper.c index 6b6fbbe27a5..51d2992b64e 100644 --- a/ctdb/server/ctdb_lock_helper.c +++ b/ctdb/server/ctdb_lock_helper.c @@ -230,9 +230,9 @@ static void wait_for_parent_check(struct tevent_req *subreq) tevent_req_set_callback(subreq, wait_for_paren
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 39f70481bbd WHATSNEW: Document some CTDB changes via 8deec3bc67c ctdb-scripts: Drop unused ctdbd_wrapper via a1e78cc3726 ctdb-scripts: Drop uses of ctdbd_wrapper via aca59722338 ctdb-scripts: Remove failsafe that drops all IPs on failed shutdown via 6fb08a65804 ctdb-daemon: Don't release all public IPs during shutdown sequence via cb438ecfd48 ctdb-scripts: Drop all public IPs in the "shutdown" event via 3caddaafa0f ctdb-config: Drop CTDB_STARTUP_TIMEOUT via 208034ecfe7 ctdb-doc: Update documentation for tunables configuration via 0902553d154 ctdb-scripts: No longer load tunables via 00.ctdb.script setup event via f49446cb1e8 ctdb-daemon: Load tunables from ctdb.tunables via a509ee059ef ctdb-daemon: New function ctdb_tunables_load() via b14f2a205d2 ctdb-tests: Add unit tests for tunables code via 381134939bd ctdb-tests: Add function test_case(), tweak unit test header format via c413838f796 ctdb-tests: Strip trailing newlines from expected result output via 5fa0c86b614 ctdb-tests: Reformat script via bcd66e17eec ctdb-common: Add function ctdb_tunable_load_file() via 93824b8c331 packaging: move CTDB service file to top-level via 2f6b31788bb ctdb-packaging: Move RPM spec file to examples directory from 63bbdbae19d gpo: Improve Certificate Auto Enroll Debug messages https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 39f70481bbd87e764775f66948ecfdace3722d7a Author: Martin Schwenke Date: Wed Mar 30 11:08:45 2022 +1100 WHATSNEW: Document some CTDB changes Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Apr 6 07:32:04 UTC 2022 on sn-devel-184 commit 8deec3bc67c2831ce63ab4812b6f29baab711b50 Author: Martin Schwenke Date: Tue Feb 1 08:35:37 2022 +1100 ctdb-scripts: Drop unused ctdbd_wrapper Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a1e78cc372618159e5c95665b827936280572b61 Author: Martin Schwenke Date: Tue Feb 1 08:28:47 2022 +1100 ctdb-scripts: Drop uses of ctdbd_wrapper The only value this now provides is use of a notification script to log when start/stop are called. This was used for debugging strange start/stop failures, which have not been recently seen. Also, systemd does a good job of logging start/stop. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit aca59722338aacffc37bdb5d8c0603f1bb0c3cb4 Author: Martin Schwenke Date: Mon Jan 31 21:55:17 2022 +1100 ctdb-scripts: Remove failsafe that drops all IPs on failed shutdown IPs are dropped in the shutdown event. If a watchdog is necessary to ensure public IPs aren't on interfaces when CTDB isn't running, then see ctdb-crash-cleanup.sh. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6fb08a6580488f961c1d6bcd4b1b9bc3faaf621b Author: Martin Schwenke Date: Mon Sep 11 10:59:42 2017 +1000 ctdb-daemon: Don't release all public IPs during shutdown sequence This further untangles public IP handling from the main daemon. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cb438ecfd487c235e852fbdf85526fdc106868f3 Author: Martin Schwenke Date: Mon Sep 11 10:57:27 2017 +1000 ctdb-scripts: Drop all public IPs in the "shutdown" event This is functionally the same as ctdb_release_all_ips(). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3caddaafa0f8e3cc162df1b8a58281326f720249 Author: Martin Schwenke Date: Mon Jan 31 19:43:11 2022 +1100 ctdb-config: Drop CTDB_STARTUP_TIMEOUT This was added to be able to notice startup failures when unknown tunables were present in the configuration. Tunables are now set by the daemon, so this is no longer necessary. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 208034ecfe758e81df72b80b623cf3fa6814b64e Author: Martin Schwenke Date: Wed Mar 30 10:49:15 2022 +1100 ctdb-doc: Update documentation for tunables configuration Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0902553d1546b418e27cb14ae5146a8396accd09 Author: Martin Schwenke Date: Mon Jan 31 19:30:30 2022 +1100 ctdb-scripts: No longer load tunables via 00.ctdb.script setup event Drop related tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f49446cb1e8dba9cf9c1eff073c394049a0a0cf3 Author: Martin Schwenke Date: Mon Jan 31 14:47:11 2022 +1100 ctdb-daemon: Load tunables from ctdb.tunables Signed-off-by: Martin Schwenke Reviewed-by: Am
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0d8084ed628 ctdb-protocol: CID 1499395: Uninitialized variables (UNINIT) via 0f373443ef3 ctdb-tests: Fix missing #include for sigaction(2) via ef9017a1503 ctdb-tests: Dump a stack trace on abort from 3990c33efec examples: Reformat shell scripts https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0d8084ed6281e5f6e894315d61f196a887510f8d Author: Martin Schwenke Date: Wed Feb 16 09:32:55 2022 +1100 ctdb-protocol: CID 1499395: Uninitialized variables (UNINIT) Issue is reported here: 853 case CTDB_CONTROL_DB_VACUUM: { 854 struct ctdb_db_vacuum db_vacuum; 855 >>> CID 1499395: Uninitialized variables (UNINIT) >>> Using uninitialized value "db_vacuum.full_vacuum_run" when calling "ctdb_db_vacuum_len". 856 CHECK_CONTROL_DATA_SIZE(ctdb_db_vacuum_len(_vacuum)); 857 return ctdb_control_db_vacuum(ctdb, c, indata, async_reply); 858 } The problem is that ctdb_bool_len() unnecessarily dereferences its argument, which in this case is _vacuum.full_vacuum_run. Not a security issue because the value copied by dereferencing is not used. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Feb 23 02:02:06 UTC 2022 on sn-devel-184 commit 0f373443ef32d368c84640362786e7bd3e092c19 Author: Martin Schwenke Date: Wed Feb 16 22:12:37 2022 +1100 ctdb-tests: Fix missing #include for sigaction(2) Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ef9017a15033ec00c6661a2bab4b254dbfa41fe5 Author: Martin Schwenke Date: Tue Jan 4 22:19:19 2022 +1100 ctdb-tests: Dump a stack trace on abort Debugging a test failure here without GDB is not possible. Dumping a stack trace gives a good hint. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/protocol/protocol_basic.c | 2 +- ctdb/tests/src/protocol_common_basic.c | 4 ctdb/wscript | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/protocol/protocol_basic.c b/ctdb/protocol/protocol_basic.c index 94b18c1cd10..42f207790d0 100644 --- a/ctdb/protocol/protocol_basic.c +++ b/ctdb/protocol/protocol_basic.c @@ -162,7 +162,7 @@ int ctdb_double_pull(uint8_t *buf, size_t buflen, double *out, size_t *npull) size_t ctdb_bool_len(bool *in) { - uint8_t u8 = *in; + uint8_t u8 = 0; return ctdb_uint8_len(); } diff --git a/ctdb/tests/src/protocol_common_basic.c b/ctdb/tests/src/protocol_common_basic.c index 668fb46cfb3..7567f7b6520 100644 --- a/ctdb/tests/src/protocol_common_basic.c +++ b/ctdb/tests/src/protocol_common_basic.c @@ -18,9 +18,12 @@ */ #include "replace.h" +#include "system/wait.h" #include +#include "lib/util/fault.h" + #include "tests/src/protocol_common_basic.h" uint8_t BUFFER[1024*1024]; @@ -242,6 +245,7 @@ static void protocol_test_iterate_abort_handler(int sig) if (protocol_test_iterate_buf[0] != '\0') { fprintf(stderr, " tag: %s\n", protocol_test_iterate_buf); } + log_stack_trace(); sigaction(SIGABRT, , NULL); abort(); } diff --git a/ctdb/wscript b/ctdb/wscript index a9fef9241aa..4a28dfd3cf0 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -977,7 +977,7 @@ def build(bld): bld.SAMBA_SUBSYSTEM('ctdb-protocol-tests-basic', source=bld.SUBDIR('tests/src', 'protocol_common_basic.c'), -deps='replace talloc') +deps='samba-util replace talloc') bld.SAMBA_SUBSYSTEM('ctdb-protocol-tests-common', source=bld.SUBDIR('tests/src', -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 17d792e9aa3 ctdb-tests: Iterate protocol tests internally via 2329305019d ctdb-tests: Add iteration support for protocol tests from 331c435ce52 ctdb-tests: Add a test for stalled node triggering election https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 17d792e9aa38c3d8a2211c7b8ee3e2d88b438922 Author: Martin Schwenke Date: Tue Jan 4 12:19:49 2022 +1100 ctdb-tests: Iterate protocol tests internally Instead of repeatedly running a test binary. Run time for these tests reduces from ~90s to ~75s. When run under valgrind, the run time for protocol_test_001.sh reduces from ~390s to <1s. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Feb 14 04:32:29 UTC 2022 on sn-devel-184 commit 2329305019d2b8521c1ceed76c9a703a1b745e86 Author: Martin Schwenke Date: Tue Jan 4 12:18:33 2022 +1100 ctdb-tests: Add iteration support for protocol tests The current method of repeatedly running a binary has huge overhead, especially with valgrind. protocol_test_iterate_tag() allows output that is usually used for hinting where a test failure occurred to be replaced with a tag stored in a buffer, which is printed on test failure. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/event/event_protocol_test.c | 17 +++--- ctdb/tests/UNIT/cunit/event_protocol_test_001.sh | 22 +--- ctdb/tests/UNIT/cunit/protocol_test_001.sh | 4 +- ctdb/tests/UNIT/cunit/protocol_test_002.sh | 4 +- ctdb/tests/UNIT/cunit/protocol_test_012.sh | 4 +- ctdb/tests/UNIT/cunit/protocol_test_101.sh | 63 + ctdb/tests/UNIT/cunit/protocol_test_111.sh | 4 +- ctdb/tests/src/protocol_basic_test.c | 11 ++-- ctdb/tests/src/protocol_common_basic.c | 70 ctdb/tests/src/protocol_common_basic.h | 5 ++ ctdb/tests/src/protocol_ctdb_compat_test.c | 11 ++-- ctdb/tests/src/protocol_ctdb_test.c | 32 --- ctdb/tests/src/protocol_types_compat_test.c | 11 ++-- ctdb/tests/src/protocol_types_test.c | 11 ++-- 14 files changed, 122 insertions(+), 147 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/event/event_protocol_test.c b/ctdb/event/event_protocol_test.c index 7f939f881cf..8f34fa5b68d 100644 --- a/ctdb/event/event_protocol_test.c +++ b/ctdb/event/event_protocol_test.c @@ -311,8 +311,7 @@ static void TEST_FUNC(NAME)(uint32_t cmd) \ size_t buflen, np; \ int ret; \ \ - printf("%s %u\n", #NAME, cmd); \ - fflush(stdout); \ + protocol_test_iterate_tag("%s %u\n", #NAME, cmd); \ mem_ctx = talloc_new(NULL); \ assert(mem_ctx != NULL); \ FILL_FUNC(NAME)(mem_ctx, , cmd); \ @@ -340,8 +339,7 @@ static void TEST_FUNC(NAME)(uint32_t cmd) \ size_t buflen, len; \ int ret; \ \ - printf("%s %u\n", #NAME, cmd); \ - fflush(stdout); \ + protocol_test_iterate_tag("%s %u\n", #NAME, cmd); \ mem_ctx = talloc_new(NULL); \ assert(mem_ctx != NULL); \ fill_ctdb_event_header(); \ @@ -379,15 +377,10 @@ EVENT_PROTOCOL1_TEST(struct ctdb_event_reply, ctdb_event_reply_data); EVENT_PROTOCOL2_TEST(struct ctdb_event_request, ctdb_event_request); EVENT_PROTOCOL2_TEST(struct ctdb_event_reply, ctdb_event_reply); -int main(int argc, const char **argv) +static void event_protocol_test(void) { uint32_t cmd; - if (argc == 2) { - int seed = atoi(argv[1]); - srandom(seed); - } - TEST_FUNC(ctdb_event_script)(); TEST_FUNC(ctdb_event_script_list)(); @@ -410,6 +403,10 @@ int main(int argc, const char **argv) for (cmd=1; cmdtv_usec == p2->tv_usec); } +static unsigned int seed; +static char protocol_test_iterate_buf[1024]; + +static void protocol_test_iterate_abort_handler(int sig) +{ + struct sigaction act = { + .sa_handler = SIG_DFL, + }; + + fprintf(stderr, "Failed with seed: %d\n", seed); + if (protocol_test_iterate_buf[0] != '\0') { + fprintf(stderr, " tag: %s\n", protocol_test_iterate_buf); + } + sigaction(SIGABRT, , NULL); + abort(); +} + +void protocol_test_iterate_tag(const char *fmt, ...) +{ + va_list ap; + int count; + + va_start(ap,fmt); + count = vsnprintf(protocol_test_iterate_buf, + sizeof(protocol_test_iterate_buf), + fmt, + ap); + va_end(ap
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 331c435ce52 ctdb-tests: Add a test for stalled node triggering election via 265e44abc42 ctdb-tests: Factor out functions to detect when generation changes via 0e74e03c9cf ctdb-recoverd: Consistently log start of election via bf55a0117d0 ctdb-recoverd: Always send unknown leader broadcast when starting election via 9b3fab052bd ctdb-recoverd: Consistently have caller set election-in-progress via 188a9021565 ctdb-recoverd: Always cancel election in progress from 18437fd6a73 smbd: Simplify smbd_dirptr_lanman2_mode_fn() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 331c435ce520bef1274e076e6ed491400db3b5ad Author: Martin Schwenke Date: Sun Jan 23 07:08:02 2022 +1100 ctdb-tests: Add a test for stalled node triggering election A stalled node probably continues to hold the cluster lock, so confirm elections work in this case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Feb 14 02:46:01 UTC 2022 on sn-devel-184 commit 265e44abc42e1f5b7fef6550cd748459dbef80cb Author: Martin Schwenke Date: Sun Jan 23 06:42:52 2022 +1100 ctdb-tests: Factor out functions to detect when generation changes BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0e74e03c9cf83d5dc2d97fa9f38ff8fbaa3d2685 Author: Martin Schwenke Date: Sun Jan 23 06:21:51 2022 +1100 ctdb-recoverd: Consistently log start of election Elections should now be quite rare, so always log when one begins. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit bf55a0117d045e8ca888f7e01591cc2a2bce9223 Author: Martin Schwenke Date: Sun Jan 23 06:18:51 2022 +1100 ctdb-recoverd: Always send unknown leader broadcast when starting election This is currently missed when the cluster lock is lost. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 9b3fab052bd2dccf2fc3fe9bd2b4354dff0b9ebb Author: Martin Schwenke Date: Sun Jan 23 05:49:18 2022 +1100 ctdb-recoverd: Consistently have caller set election-in-progress The problem here is that election-in-progress must be set to potentially avoid restarting the election broadcast timeout in main_loop(), so this is already done by leader_handler(). Have force_election() set election-in-progress for all election types and do not bother setting it in cluster_lock_election(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 188a9021565bc2c1bec1d7a4830d6f47cdbc44a9 Author: Martin Schwenke Date: Fri Jan 21 18:09:47 2022 +1100 ctdb-recoverd: Always cancel election in progress Election-in-progress is set by unknown leader broadcast, so needs to be cleared in all cases when election completes. This was seen in a case where the leader node stalled, so didn't send leader broadcasts for some time. The node continued to hold the cluster lock, so another node could not become leader. However, after the node returned to normal it still did not send leader broadcasts because election-in-progress was never cleared. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/server/ctdb_recoverd.c| 17 .../simple/cluster.015.reclock_remove_lock.sh | 14 +-- .../cluster.030.node_stall_leader_timeout.sh | 48 ++ ctdb/tests/scripts/integration.bash| 44 4 files changed, 103 insertions(+), 20 deletions(-) create mode 100755 ctdb/tests/INTEGRATION/simple/cluster.030.node_stall_leader_timeout.sh Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index cc239959c56..03698ef2928 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -1836,7 +1836,7 @@ static void cluster_lock_election(struct ctdb_recoverd *rec) if (cluster_lock_held(rec)) { cluster_lock_release(rec); } - return; + goto done; } /* @@ -1844,11 +1844,10 @@ static void cluster_lock_election(struct ctdb_recoverd *rec) * attempt to retake it. This provides stability
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 57a32cebdd8 ctdb-recoverd: Pass SIGHUP to running helper via 8e949a60828 ctdb-recoverd: Record helper PID in recovery daemon context via 97a45f6f25f ctdb-recoverd: Add log reopening on SIGHUP to helpers via 51f0380e83c ctdb-daemon: Enable log reopening for event daemon via 4f14d7c0b9b ctdb-event: Reopen logs on SIGHUP via c554a325fe8 ctdb-daemon: Enable log reopening for recovery daemon via 4acfefed61f ctdb-recoverd: Add basic log reopening via 4ed37de82b1 ctdb-daemon: Add basic top-level log reopening via 72773853901 ctdb-common: Add support for reopening logs via d0a19778cdb ctdb-common: Separate sock_daemon's SIGHUP and SIGUSR1 handling via 10d15c9e5df ctdb-common: Use Samba's DEBUG_FILE logging via 666a0487074 ctdb-common: Switch initial debug type to DEBUG_DEFAULT_STDERR from 5f9dbf3decd s3: smbd: Add missing pop_sec_ctx() in error code path of close_directory() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 57a32cebdd834e24e69f524f8ffaa980472cde33 Author: Martin Schwenke Date: Thu Sep 30 21:16:44 2021 +1000 ctdb-recoverd: Pass SIGHUP to running helper The recovery and takeover helpers can run for a while and generate non-trivial logs, so have them reopen their logs to support log rotation. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Jan 17 04:36:30 UTC 2022 on sn-devel-184 commit 8e949a60828bae47a3636f051dcc86387b5fce23 Author: Martin Schwenke Date: Thu Sep 30 21:15:56 2021 +1000 ctdb-recoverd: Record helper PID in recovery daemon context Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 97a45f6f25f34fff97a9be7ba2b346a4e8b93218 Author: Martin Schwenke Date: Thu Sep 30 21:14:14 2021 +1000 ctdb-recoverd: Add log reopening on SIGHUP to helpers Recovery and takeover helpers can run for a while and generate non-trivial logs. They should support log reopening. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 51f0380e83c93702a08e29c230bb8d87d472b616 Author: Martin Schwenke Date: Thu Sep 30 21:10:33 2021 +1000 ctdb-daemon: Enable log reopening for event daemon Add and call hook to pass on SIGHUP to eventd. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4f14d7c0b9bf1f122a1e9f92c1b8bdc57c4c9e68 Author: Martin Schwenke Date: Thu Sep 30 21:11:44 2021 +1000 ctdb-event: Reopen logs on SIGHUP Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c554a325fe81aab90f4816600849f6c4f901b2f9 Author: Martin Schwenke Date: Thu Sep 30 21:08:25 2021 +1000 ctdb-daemon: Enable log reopening for recovery daemon Pass on a SIGHUP to the recovery daemon, which will then reopen its logs. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4acfefed61f2c9e069963ac76b2001469a694461 Author: Martin Schwenke Date: Thu Sep 30 21:03:15 2021 +1000 ctdb-recoverd: Add basic log reopening Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4ed37de82b1be4732f6e5936e149aae718855513 Author: Martin Schwenke Date: Thu Sep 30 21:06:16 2021 +1000 ctdb-daemon: Add basic top-level log reopening Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 72773853901832e4728e42588570d69c93976ce1 Author: Martin Schwenke Date: Thu Sep 30 20:55:27 2021 +1000 ctdb-common: Add support for reopening logs Now that CTDB uses Samba's file logging it is possible to reopen the logs, so that log rotation can be supported. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d0a19778cdbd04f8b6fca43199d7b12e1d4933b7 Author: Martin Schwenke Date: Thu Nov 18 21:17:39 2021 +1100 ctdb-common: Separate sock_daemon's SIGHUP and SIGUSR1 handling SIGHUP is for reopening logs, SIGUSR1 is for reconfigure. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 10d15c9e5dfe4e8595d0b322c96f474fc7078f46 Author: Martin Schwenke Date: Thu Sep 23 18:37:57 2021 +1000 ctdb-common: Use Samba's DEBUG_FILE logging This has support for log rotation (or re-opening). The log format is updated to use an RFC5424 timestamp and to include a hostname. The addition of the hostname allows trivial merging of log files from multiple cluster nodes. The hostname is faked from the CTDB_BASE environment variable during testing, as per the comment in the code. It is currently faked in a similar manner in local_daemons.sh when printing logs, so drop this. Unit tests need updating because stderr
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9e7d2d9794a ctdb-daemon: Don't mark a node as unhealthy when connecting to it via 7f697b1938e ctdb-daemon: Ignore flag changes for disconnected nodes via ae10a8a4b70 ctdb-daemon: Simplify ctdb_control_modflags() via 916c5ee131d ctdb-recoverd: Mark CTDB_SRVID_SET_NODE_FLAGS obsolete via e75256767ff ctdb-daemon: Don't bother sending CTDB_SRVID_SET_NODE_FLAGS via 0132bd5a223 ctdb-daemon: Modernise remaining debug macro in this function via b6d25d079e3 ctdb-daemon: Update logging for flag changes via eec44e28625 ctdb-daemon: Correct the condition for logging unchanged flags via 5914054698d ctdb-tools: Use disable and enable controls in tool via 6fe6a54e7f3 ctdb-client: Add client code for disable/enable controls via 15a6489c288 ctdb_daemon: Implement controls DISABLE_NODE/ENABLE_NODE via 60c1ef14653 ctdb-daemon: Start as disabled means PERMANENTLY_DISABLED via 1ac7bc7532b ctdb-daemon: Factor out a function to get node structure from PNN via e0a7b5a9e86 ctdb-daemon: Add a helper variable via 6845dca87e6 ctdb-protocol: Add marshalling for controls DISABLE_NODE/ENABLE_NODE via 49dc5d8cd2d ctdb-protocol: Add new controls to disable and enable nodes via 8305f6a7f13 ctdb-recoverd: Push flags for a node if any remote node disagrees via 620d0787142 ctdb-recoverd: Update the local node map before pushing out flags via 82a075d4d73 ctdb-recoverd: Add a helper variable from 4366c3bb71f gitlab-ci: run samba-fuzz autobuild target on Ubuntu 20.04-based image https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9e7d2d9794af7251c42cb22f23ee9f86c6ea05c1 Author: Martin Schwenke Date: Fri Jul 9 17:25:32 2021 +1000 ctdb-daemon: Don't mark a node as unhealthy when connecting to it Remote nodes are already initialised as UNHEALTHY when the node list is initialised at startup (ctdb_load_nodes_file() calls convert_node_map_to_list()) and when disconnected (ctdb_node_dead()). So, drop this code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 9 02:38:34 UTC 2021 on sn-devel-184 commit 7f697b1938efb3972f03f25546bf807d5af9a26c Author: Martin Schwenke Date: Tue Jul 27 15:50:54 2021 +1000 ctdb-daemon: Ignore flag changes for disconnected nodes If this node is not connected to a node then we shouldn't know anything about it. The state will be pushed later by the recovery master. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Signed-off-by: Amitay Isaacs commit ae10a8a4b70e53ea3be6257d1f86f2d9a56aa62a Author: Martin Schwenke Date: Thu Jul 8 11:11:11 2021 +1000 ctdb-daemon: Simplify ctdb_control_modflags() Now that there are separate disable/enable controls used by the ctdb tool this control can ignore any flag updates for the current nodes. These only come from the recovery master, which depends on being able to fetch flags for all nodes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 916c5ee131dc5c7f1d9c3540147d1f915c8302ad Author: Martin Schwenke Date: Wed Jan 17 19:04:34 2018 +1100 ctdb-recoverd: Mark CTDB_SRVID_SET_NODE_FLAGS obsolete CTDB_SRVID_SET_NODE_FLAGS is no longer sent so drop monitor_handler() and replace with srvid_not_implemented(). Mark the SRVID obsolete in its comment. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e75256767fffc6a7ac0b97e58737a39c63c8b187 Author: Martin Schwenke Date: Thu Jul 8 11:32:20 2021 +1000 ctdb-daemon: Don't bother sending CTDB_SRVID_SET_NODE_FLAGS The code that handles this message is ctdb_recoverd.c:monitor_handler(). Although it appears to do something potentially useful, it only logs the flags changes. All changes made are to local structures - there are no actual side-effects. It used to trigger a takeover run when the DISABLED flag changed. This was dropped back in commit 662f06de9fdce7b1bc1772a4fbe43de271564917. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0132bd5a2233193256af434a37506f86ed62c075 Author: Martin Schwenke Date: Thu Jul 8 11:34:49 2021 +1000 ctdb-daemon: Modernise remaining debug macro in this function BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke Reviewed-by: Amitay
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 466aa8b6f5a ctdb-scripts: Ignore ShellCheck SC3013 for test -nt via fc0da6b0f87 ctdb-tests: Force stub version of service in eventscript tests via 23b2fab2c88 ctdb-common: Drop unused include of mkdir_p.h via e40d452722d ctdb-daemon: Close server socket when switching to client from 62875044ec4 WHATSNEW: Document changes of trusted domains scanning and enterpise principals https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 466aa8b6f5a61d523d708ceb3d5ab1c409bccc1b Author: Martin Schwenke Date: Mon Jun 21 20:30:21 2021 +1000 ctdb-scripts: Ignore ShellCheck SC3013 for test -nt In ShellCheck 0.7.2, POSIX compatibility warnings got their own SC3xxx error codes, so now both the old and new codes need to be ignored. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jun 25 10:06:48 UTC 2021 on sn-devel-184 commit fc0da6b0f878d70ff19a568cbb2e47972b45c0b1 Author: Martin Schwenke Date: Mon Jun 21 15:26:38 2021 +1000 ctdb-tests: Force stub version of service in eventscript tests Fedora 34 now has a shell function for the which command, which causes these uses of which to return the enclosing function definition rather than the executable file as expected. The event script unit tests always expect the stub service command to be used, so the conditional in these functions is unnecessary. $CTDB_HELPER_BINDIR already conveniently points to the stub directory, so use it here. Signed-off-by: Martin Schwenke Signed-off-by: Amitay Isaacs commit 23b2fab2c886a5cdc72a87aa0d2e14c9e6b96b1c Author: Martin Schwenke Date: Tue Sep 15 13:54:30 2020 +1000 ctdb-common: Drop unused include of mkdir_p.h Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e40d452722d04d21e1c8cee2af2d175540634070 Author: Martin Schwenke Date: Tue May 19 17:57:35 2020 +1000 ctdb-daemon: Close server socket when switching to client The socket is set close-on-exec but that doesn't help for processes that do not exec(). This should be done for all child processes. This has been seen in testing where "ctdb shutdown" waits for the socket to close before succeeding. It appears that lingering vacuuming processes have not closed the socket when becoming clients so they cause "ctdb shutdown" to hang even though the main daemon process has exited. The cause of the lingering vacuuming processes has been previously examined but still isn't understood. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/system.c | 2 -- ctdb/config/nfs-linux-kernel-callout | 2 +- ctdb/server/ctdb_daemon.c | 5 + ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local | 16 +++- 4 files changed, 9 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/system.c b/ctdb/common/system.c index ab1941124d7..650b62bab16 100644 --- a/ctdb/common/system.c +++ b/ctdb/common/system.c @@ -41,8 +41,6 @@ #include #endif -#include "lib/util/mkdir_p.h" - /* if possible, make this task real time */ diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index 6a372d4b4fd..9c2d0418e55 100755 --- a/ctdb/config/nfs-linux-kernel-callout +++ b/ctdb/config/nfs-linux-kernel-callout @@ -329,7 +329,7 @@ nfs_monitor_list_shares () { _cache_file="${CTDB_NFS_CALLOUT_STATE_DIR}/list_shares_cache" # -nt operator is well supported in Linux: dash, bash, ksh, ... -# shellcheck disable=SC2039 +# shellcheck disable=SC2039,SC3013 if [ ! -r "$nfs_exports_file" ] || [ ! -r "$_cache_file" ] || \ [ "$nfs_exports_file" -nt "$_cache_file" ] ; then mkdir -p "$CTDB_NFS_CALLOUT_STATE_DIR" diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 9035f5b4748..57f80235e7c 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -2179,6 +2179,11 @@ int switch_from_server_to_client(struct ctdb_context *ctdb) { int ret; + if (ctdb->daemon.sd != -1) { + close(ctdb->daemon.sd); + ctdb->daemon.sd = -1; + } + /* get a new event context */ ctdb->ev = tevent_context_init(ctdb); if (ctdb->ev == NULL) { diff --git a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local index e9a7f99829a..2f506e907a2 100755 --- a/ctdb/tests/UNIT/eventscri
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f7cf8132b00 ctdb-tests: Add debug_locks.sh tests for mutexes via 99c3b49260f ctdb-scripts: Add lock debugging for tdb mutex locks via cb55b68b3e6 ctdb-utils: Add tdb_mutex_check utility via dd5972b6991 ctdb-scripts: Simplify logic in debug_via_proc_locks() via e62ae53ef6d ctdb-scripts: Update debug_locks.sh to handle arguments via 1dfff9751b1 ctdb-scripts: Move current lock debugging to a function via d07875330a6 ctdb-locking: Pass additional arguments to debug locks script via 2c7dbb043f3 ctdb-tests: Add debug_locks.sh testing via a3e7fd9c61b ctdb-tests: Fix nonsense arguments to ps stub via ffb56c9143d ctdb-scripts: Avoid direct /proc access via 55d4b3438f2 ctdb-scripts: Factor out function dump_stacks() from f753e2f7acf s3:lib: Remove util_cmdline https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f7cf8132b007aadc861efcb26060c075c45978b5 Author: Martin Schwenke Date: Wed Jan 6 21:38:31 2021 +1100 ctdb-tests: Add debug_locks.sh tests for mutexes Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri May 28 07:34:23 UTC 2021 on sn-devel-184 commit 99c3b49260ffcb582122017bc545502a88b3cd31 Author: Amitay Isaacs Date: Fri Feb 12 19:13:48 2021 +1100 ctdb-scripts: Add lock debugging for tdb mutex locks Signed-off-by: Amitay Isaacs Signed-off-by: Martin Schwenke commit cb55b68b3e63b438f4695e362ffa8faae47d0aee Author: Amitay Isaacs Date: Fri Feb 12 19:13:11 2021 +1100 ctdb-utils: Add tdb_mutex_check utility Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit dd5972b69916fa08b114193d644faf3ae58c550b Author: Martin Schwenke Date: Mon Jan 4 13:35:11 2021 +1100 ctdb-scripts: Simplify logic in debug_via_proc_locks() The path of the TDB is known, so calculate the file ID (device number + inode number) from it and use this to directly filter /proc/locks to find processes holding locks. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e62ae53ef6d04016e3a3453380c9add3ce888e3c Author: Martin Schwenke Date: Fri Feb 12 19:08:37 2021 +1100 ctdb-scripts: Update debug_locks.sh to handle arguments Don't use the arguments yet. They will be used in a simplified version of the code. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 1dfff9751b1ef96d0ec5e4a72f7e687702c35a78 Author: Martin Schwenke Date: Fri Feb 12 19:07:55 2021 +1100 ctdb-scripts: Move current lock debugging to a function Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d07875330a6dbf44c1d65c029af80b53e5836d2d Author: Amitay Isaacs Date: Tue Nov 24 13:25:04 2020 +1100 ctdb-locking: Pass additional arguments to debug locks script 1. PID of lock helper waiting for lock 2. Scope of lock: "record" or "db" 3. Path to database that lock helper is trying to lock 4. Whether the database uses mutexes: "mutex" or "fcntl" Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 2c7dbb043f3b7c0fa31791a033f21e249593d9f7 Author: Martin Schwenke Date: Wed Jan 6 21:38:31 2021 +1100 ctdb-tests: Add debug_locks.sh testing Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a3e7fd9c61bf37de3d6952fa8c7134a4df0b9c6c Author: Martin Schwenke Date: Fri Feb 12 18:57:58 2021 +1100 ctdb-tests: Fix nonsense arguments to ps stub These were fine (though still lazy) when these tests were the only user of this stub. However, the ps stub is about to be enhanced, so fix these uses of it to represent the intended usage. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ffb56c9143d1d4b9a2dfaa8300be6ce5d6881ab1 Author: Martin Schwenke Date: Mon Jan 4 11:54:38 2021 +1100 ctdb-scripts: Avoid direct /proc access The main reason for this is to facilitate testing. Avoid some /proc accesses entirely by using ps(1) (which can be replaced by a stub when testing) because this script might as well be more portable in case anyone wants to add lock debugging for a non-Linux platform. While the "state" format specification isn't POSIX-compliant, it works on both Linux and FreeBSD so it is a reasonable improvement. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 55d4b3438f2c44a12b4c513ef26e2d1c4fa9f5b4 Author: Martin Schwenke Date: Fri Feb 12 19:14:12 2021 +1100 ctdb-scripts: Factor out function dump_stacks() Signed-off-b
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4bf010309cd selftest: Drop dummy environment variables for CTDB daemons via 65ab8cb014c ctdb-daemon: Do not attempt to chown Unix domain socket in test mode via 78c3b5b6a83 ctdb-daemon: Clean up call to bind socket via 9404f8631ec ctdb-daemon: Clean up socket bind/secure/listen from ee79d39aa0c idmap_nss.8.xml: update manpage as discussed on the samba mailing list https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4bf010309cd747a42069cb5469ccb7711364ef18 Author: Martin Schwenke Date: Thu Oct 29 09:05:37 2020 +1100 selftest: Drop dummy environment variables for CTDB daemons This existed to avoid UID_WRAPPER_ROOT=1 causing ctdbd to fail to chown the socket. The chown is no longer done in test mode so remove this confusing hack. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Reviewed-by: Volker Lendecke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Nov 2 10:20:45 UTC 2020 on sn-devel-184 commit 65ab8cb014ca7ac97433ec53d6d163e6da5a3fe7 Author: Martin Schwenke Date: Sat Oct 24 20:35:53 2020 +1100 ctdb-daemon: Do not attempt to chown Unix domain socket in test mode If run with UID wrapper and UID_WRAPPER_ROOT=1 then securing the socket will fail. Test mode means that local daemons are in use, so securing the socket is not important. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Reviewed-by: Volker Lendecke commit 78c3b5b6a83d934c99ac25480fbc01f9aeb198e3 Author: Martin Schwenke Date: Sat Oct 24 21:54:21 2020 +1100 ctdb-daemon: Clean up call to bind socket Variable res is only used once and ret is re-used many times. Drop res, use ret, which doesn't need to be initialised. Modernise debug macro. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Reviewed-by: Volker Lendecke commit 9404f8631ecc028c4e98879fbc67ccd2be09249f Author: Martin Schwenke Date: Sat Oct 24 20:29:58 2020 +1100 ctdb-daemon: Clean up socket bind/secure/listen Obey the coding style, modernise debug macros, clean up whitespace. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Reviewed-by: Volker Lendecke --- Summary of changes: ctdb/server/ctdb_daemon.c | 54 --- selftest/target/Samba3.pm | 9 +--- 2 files changed, 33 insertions(+), 30 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 7ebb419bc1f..9035f5b4748 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1168,10 +1168,10 @@ static void ctdb_accept_client(struct tevent_context *ev, /* - create a unix domain socket and bind it - return a file descriptor open on the socket -*/ -static int ux_socket_bind(struct ctdb_context *ctdb) + * Create a unix domain socket, bind it, secure it and listen. Return + * the file descriptor for the socket. + */ +static int ux_socket_bind(struct ctdb_context *ctdb, bool test_mode_enabled) { struct sockaddr_un addr = { .sun_family = AF_UNIX }; int ret; @@ -1191,38 +1191,48 @@ static int ux_socket_bind(struct ctdb_context *ctdb) ret = set_blocking(ctdb->daemon.sd, false); if (ret != 0) { - DEBUG(DEBUG_ERR, - (__location__ - " failed to set socket non-blocking (%s)\n", - strerror(errno))); + DBG_ERR("Failed to set socket non-blocking (%s)\n", + strerror(errno)); goto failed; } - if (bind(ctdb->daemon.sd, (struct sockaddr *), sizeof(addr)) == -1) { - DEBUG(DEBUG_CRIT,("Unable to bind on ctdb socket '%s'\n", ctdb->daemon.name)); + ret = bind(ctdb->daemon.sd, (struct sockaddr *), sizeof(addr)); + if (ret == -1) { + D_ERR("Unable to bind on ctdb socket '%s'\n", ctdb->daemon.name); goto failed; } - if (chown(ctdb->daemon.name, geteuid(), getegid()) != 0 || - chmod(ctdb->daemon.name, 0700) != 0) { - DEBUG(DEBUG_CRIT,("Unable to secure ctdb socket '%s', ctdb->daemon.name\n", ctdb->daemon.name)); + if (!test_mode_enabled) { + ret = chown(ctdb->daemon.name, geteuid(), getegid()); + if (ret != 0 && !test_mode_enabled) { + D_ERR("Unable to secure (chown) ctdb socket '%s'\n", + ctdb->daemon.name); + goto failed; + } + } + + ret = c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b68105b8f7c ctdb-tests: Strengthen node state checking in ctdb disable/enable test via 4b01f54041d ctdb-recoverd: Drop unnecessary and broken code via 3ab52b52867 ctdb-recoverd: Drop unnecessary code from 5cfc9271e4e third_party: Update gpfs.h to 5.0.5.3 version https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b68105b8f7c20692d23d457f2777edcf44f12bb8 Author: Martin Schwenke Date: Wed Sep 30 10:48:38 2020 +1000 ctdb-tests: Strengthen node state checking in ctdb disable/enable test Check that the desired state is set on all nodes instead of just the test node. This ensures that node flags have correctly propagated across the cluster. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Oct 6 04:32:06 UTC 2020 on sn-devel-184 commit 4b01f54041dee469971f244e64064eed46de2ed5 Author: Martin Schwenke Date: Tue Jan 16 15:15:51 2018 +1100 ctdb-recoverd: Drop unnecessary and broken code update_flags() has already updated the recovery master's canonical node map, based on the flags from each remote node, and pushed out these flags to all nodes. If i == j then the node map has already been updated from this remote node's flags, so simply drop this case. Although update_flags() has updated flags for all nodes, it did not update each node map in remote_nodemaps[] to reflect this. This means that remote_nodemaps[] may contain inconsistent flags for some nodes so it should not be used to check consistency when i != j. Further, a meaningful difference in flags can only really occur if update_flags() failed. In that case this code is never reached. These observations combine to imply that this whole loop should be dropped. This leaves potential sub-second inconsistencies due to out-of-band healthy/unhealthy flag changes pushed via CTDB_SRVID_PUSH_NODE_FLAGS. These updates could be dropped (takeover run asks each node for available IPs rather than making centralised decisions based on node flags) but for now they will be fixed in the next iteration of main_loop(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3ab52b528673e08caa66f00e963528c591a84fe1 Author: Martin Schwenke Date: Fri Jan 19 14:55:21 2018 +1100 ctdb-recoverd: Drop unnecessary code This has already been done in update_flags(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/server/ctdb_recoverd.c| 61 -- .../failover/pubips.030.disable_enable.sh | 4 +- 2 files changed, 2 insertions(+), 63 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index aeb23276fe7..4ba8729b50e 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -2669,67 +2669,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, } } - /* -* Update node flags obtained from each active node. This ensure we have -* up-to-date information for all the nodes. -*/ - for (j=0; jnum; j++) { - if (nodemap->nodes[j].pnn == ctdb->pnn) { - continue; - } - if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { - continue; - } - nodemap->nodes[j].flags = remote_nodemaps[j]->nodes[j].flags; - } - - for (j=0; jnum; j++) { - if (nodemap->nodes[j].pnn == ctdb->pnn) { - continue; - } - if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { - continue; - } - - /* verify the flags are consistent - */ - for (i=0; inum; i++) { - if (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) { - continue; - } - - if (nodemap->nodes[i].flags != remote_nodemaps[j]->nodes[i].flags) { - DEBUG(DEBUG_ERR, (__location__ " Remote node:%u has different flags for node %u. It has 0x%02x vs our 0x%02x\n", - nodemap->nodes[j].pnn
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1bccc67ce7c provision: BIND 9.17.x is not supported via 5b2ccb1c7ca provision: Add support for BIND 9.16.x via ca3c18a236d bind9-dlz: Add support for BIND 9.16.x via 4d097976520 provision: BIND 9.15.x is not supported via 016c1174ef7 provision: Add support for BIND 9.14.x via a167a2154d4 bind9-dlz: Add support for BIND 9.14.x via 95278618829 provision: BIND 9.13.x is not supported via cdb6c5d1eca bind9-dlz: Bind 9.13.x switched to using bool as isc_boolean_t instead of int. from 68b981ee8a1 ctdb/test_ceph_rados_reclock: check for service registration https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1bccc67ce7c6364a95fbfeb095938522671578a8 Author: Amitay Isaacs Date: Mon Sep 14 09:45:50 2020 +1000 provision: BIND 9.17.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 24 05:55:43 UTC 2020 on sn-devel-184 commit 5b2ccb1c7cad5cded5dad37a18a7d42c1680b2f7 Author: Amitay Isaacs Date: Fri Sep 11 12:35:30 2020 +1000 provision: Add support for BIND 9.16.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit ca3c18a236dedfdfbf225dcfcd0418f1634d8759 Author: Amitay Isaacs Date: Fri Sep 11 12:34:07 2020 +1000 bind9-dlz: Add support for BIND 9.16.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit 4d09797652059c3ed5b2a4f94f2181ce14d39972 Author: Amitay Isaacs Date: Mon Sep 14 09:45:04 2020 +1000 provision: BIND 9.15.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit 016c1174ef783990f93e348ee82f5c989c43cbbf Author: Amitay Isaacs Date: Fri Sep 11 12:26:21 2020 +1000 provision: Add support for BIND 9.14.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit a167a2154d4909e8e1f97d9f36d0e4c947f2d944 Author: Amitay Isaacs Date: Fri Sep 11 12:24:51 2020 +1000 bind9-dlz: Add support for BIND 9.14.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit 95278618829227632b2bcb29fc272e600607ea41 Author: Amitay Isaacs Date: Mon Sep 14 09:44:10 2020 +1000 provision: BIND 9.13.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny commit cdb6c5d1eca1c0f6967941dbd1da07be6b53d302 Author: Amitay Isaacs Date: Fri Sep 11 12:16:01 2020 +1000 bind9-dlz: Bind 9.13.x switched to using bool as isc_boolean_t instead of int. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny --- Summary of changes: python/samba/provision/sambadns.py | 17 +++-- source4/dns_server/dlz_minimal.h | 24 +++- source4/dns_server/wscript_build | 20 source4/setup/named.conf.dlz | 6 ++ 4 files changed, 64 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index ffdb2559979..4aa132abfa6 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -962,6 +962,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_10 = '#' bind9_11 = '#' bind9_12 = '#' +bind9_14 = '#' +bind9_16 = '#' if bind_info.upper().find('BIND 9.8') != -1: bind9_8 = '' elif bind_info.upper().find('BIND 9.9') != -1: @@ -972,8 +974,18 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_11 = '' elif bind_info.upper().find('BIND 9.12') != -1: bind9_12 = '' +elif bind_info.upper().find('BIND 9.14') != -1: +bind9_14 = '' +elif bind_info.upper().find('BIND 9.16') != -1: +bind9_16 = '' elif bind_info.upper().find('BIND 9.7') != -1: raise ProvisioningError("DLZ option incompatible with BIND 9.7.") +elif bind_info.upper().find('BIND_9.13') != -1: +raise ProvisioningError("Only stable/esv releases of BIND are supported.") +elif bind_info.upper().find('BIND_9.15') != -1: +raise Pro
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d98f68f9182 ctdb-daemon: Drop implementation of old-style database pull/push controls via 7d826731d48 ctdb-protocol: Drop marshalling functions for old-style database pull/push via 3bbb4a85357 ctdb-protocol: Drop client functions for old-style database pull/push via 28986954738 ctdb-client: Drop unused synchronous functions for database pull/push via 2efce7d4774 ctdb-recovery: Simplify database push function names via f4e2206e88b ctdb-recovery: Drop unnecessary database push wrapper via 225a699633b ctdb-recovery: Drop passing of capabilities into database pull via 595c1a7c0fd ctdb-recovery: Simplify database pull function names via f9685766421 ctdb-recovery: Remove use of old pull and push controls via d9d8bf8c54c ctdb-tests: Simplify comment in large database recovery test from ed9abf94b31 utils/asn1: avoid undefined behaviour warning https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d98f68f9182632aa1a086084d90b745ddeaed3d7 Author: Martin Schwenke Date: Thu Aug 6 21:35:14 2020 +1000 ctdb-daemon: Drop implementation of old-style database pull/push controls Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Sep 11 06:29:32 UTC 2020 on sn-devel-184 commit 7d826731d484f79443635feb0eb9e989d893b068 Author: Martin Schwenke Date: Thu Aug 6 21:30:34 2020 +1000 ctdb-protocol: Drop marshalling functions for old-style database pull/push Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3bbb4a85357ce9dcf62f0efab7c6b3cdbd21f6c7 Author: Martin Schwenke Date: Thu Aug 6 17:30:18 2020 +1000 ctdb-protocol: Drop client functions for old-style database pull/push Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 289869547383c4b243aedd0f0e2256c94abe53fb Author: Martin Schwenke Date: Thu Aug 6 17:28:30 2020 +1000 ctdb-client: Drop unused synchronous functions for database pull/push Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2efce7d4774d4af1330722f039caaaec49cc4855 Author: Martin Schwenke Date: Thu Aug 6 17:25:26 2020 +1000 ctdb-recovery: Simplify database push function names Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f4e2206e88bbe0bc55d5b5e8071c0f70f75fa6cb Author: Martin Schwenke Date: Thu Aug 6 17:19:48 2020 +1000 ctdb-recovery: Drop unnecessary database push wrapper Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 225a699633b81568635ba18999db8088b978c56f Author: Martin Schwenke Date: Thu Aug 6 21:47:09 2020 +1000 ctdb-recovery: Drop passing of capabilities into database pull This is no longer necessary because the capability new style database pull is assumed to always be available. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 595c1a7c0fd7b6069f1bbbd055d5efe4d8eb1869 Author: Martin Schwenke Date: Thu Aug 6 17:07:09 2020 +1000 ctdb-recovery: Simplify database pull function names Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f9685766421690ee2d47f63579af21a955cb64b2 Author: Martin Schwenke Date: Wed Aug 5 18:05:51 2020 +1000 ctdb-recovery: Remove use of old pull and push controls Removes use of the old controls without cleaning up the code. Clean up can be done later. After this change the CTDB_CAP_FRAGMENTED_CONTROLS capability is no longer checked. This capability can be removed along with the controls. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d9d8bf8c54c248f1412444a065f0daeae196 Author: Martin Schwenke Date: Wed Aug 5 17:40:42 2020 +1000 ctdb-tests: Simplify comment in large database recovery test The older style controls mentioned are being removed. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/client/client_control_sync.c | 58 --- ctdb/client/client_sync.h | 9 - ctdb/include/ctdb_private.h| 4 - ctdb/protocol/protocol.h | 4 +- ctdb/protocol/protocol_api.h | 10 - ctdb/protocol/protocol_client.c| 49 --- ctdb/protocol/protocol_control.c | 48 --- ctdb/protocol/protocol_debug.c | 2 - ctdb/server/ctdb_control.c | 7 +- ctdb/server/ctdb_recover.c | 216 -- ctdb/server/ctdb_recovery_helper.c | 433
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8bb6a6607da ctdb-recoverd: Broadcast takeover run message when verifying IPs via 4aa8e72d60e ctdb-recoverd: Rename update_local_flags() -> update_flags() via 702c7c4934e ctdb-recoverd: Change update_local_flags() to use already retrieved nodemaps via 910a0b3b747 ctdb-recoverd: Get remote nodemaps earlier via d50919b0cb2 ctdb-recoverd: Do not fetch the nodemap from the recovery master via 762d1d8a960 ctdb-recoverd: Change get_remote_nodemaps() to use connected nodes via 368c83bfe3b ctdb-recoverd: Fix node_pnn check and assignment of nodemap into array via 10ce0dbf1c1 ctdb-recoverd: Add fail callback to assign banning credits via a079ee31690 ctdb-recoverd: Add an intermediate state struct for nodemap fetching via 2eaa0af6160 ctdb-recoverd: Move memory allocation into get_remote_nodemaps() via 3324dd272c7 ctdb-recoverd: Change signature of get_remote_nodemaps() via d2d90f25021 ctdb-recoverd: Fix a local memory leak via 52f520d39cd ctdb-recoverd: Basic cleanups for get_remote_nodemaps() from 20606fd0a4c WHATSNEW: list deprecated parameters https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8bb6a6607da22903be2e8f5ed2360d01a08555e9 Author: Martin Schwenke Date: Wed Jul 29 07:02:45 2020 +1000 ctdb-recoverd: Broadcast takeover run message when verifying IPs This makes it consistent with the monitoring code. If the master has changed then this means the master will always get the message. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 18 06:24:11 UTC 2020 on sn-devel-184 commit 4aa8e72d60e92951b35190d2ffcfdb1bfb756609 Author: Martin Schwenke Date: Wed Jan 24 10:21:37 2018 +1100 ctdb-recoverd: Rename update_local_flags() -> update_flags() This also updates remote flags so the name is misleading. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 702c7c4934e79a9161fdc59df70df30ae492d89f Author: Martin Schwenke Date: Thu Jan 18 20:35:55 2018 +1100 ctdb-recoverd: Change update_local_flags() to use already retrieved nodemaps BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 910a0b3b747a987ba69b6a0b6256e964b7d85dfe Author: Martin Schwenke Date: Fri Jun 14 03:51:01 2019 +1000 ctdb-recoverd: Get remote nodemaps earlier update_local_flags() will be changed to use these nodemaps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d50919b0cb28f299c9b6985271b29d4f27c5f619 Author: Martin Schwenke Date: Fri Jun 14 00:23:22 2019 +1000 ctdb-recoverd: Do not fetch the nodemap from the recovery master The nodemap has already been fetched from the local node and is actually passed to this function. Care must be taken to avoid referencing the "remote" nodemap for the recovery master. It also isn't useful to do so, since it would be the same nodemap. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 762d1d8a9605f97973a2c1176de5d29fcc61d15a Author: Martin Schwenke Date: Thu Jan 18 20:02:42 2018 +1100 ctdb-recoverd: Change get_remote_nodemaps() to use connected nodes The plan here is to use the nodemaps retrieved by get_remote_nodes() in update_local_flags(). This will improve efficiency, since get_remote_nodes() fetches flags from nodes in parallel. It also means that get_remote_nodes() can be used exactly once early on in main_loop() to retrieve remote nodemaps. Retrieving nodemaps multiple times is unnecessary and racy - a single monitoring iteration should not fetch flags multiple times and compare them. This introduces a temporary behaviour change but it will be of no consequence when the above changes are made. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 368c83bfe3bbfff568d14f65e7b1ffa41d5349ac Author: Martin Schwenke Date: Thu Jul 30 11:57:51 2020 +1000 ctdb-recoverd: Fix node_pnn check and assignment of nodemap into array This array is indexed by the same index as nodemap, not the PNN. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 10ce0dbf1c11eaaab7b28b6bbd014235a36d1962 Author: Martin Schwenke Date: Thu Jan 18 19:58:15 2018 +1100 ctdb-recoverd: Add fail ca
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0cb61c6fb6a ctdb-doc: Link to CTDB page in wiki via 8baf47916a2 WHATSNEW: Document removal of "ctdb isnotrecmaster" command via 971c20e9dc2 ctdb-tools: Drop "ctdb isnotrecmaster" command from e89ec78e9a2 util: Add cmocka unit test for directory_create_or_exists https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0cb61c6fb6a11836dfd35e5e45858ea395b13087 Author: Martin Schwenke Date: Sat Aug 8 21:05:55 2020 +1000 ctdb-doc: Link to CTDB page in wiki Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Aug 17 06:13:11 UTC 2020 on sn-devel-184 commit 8baf47916a24deda23787662f44f872ea8d427ec Author: Martin Schwenke Date: Fri Aug 7 12:21:33 2020 +1000 WHATSNEW: Document removal of "ctdb isnotrecmaster" command Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 971c20e9dc264c076b3fdfbeda71e4430919e7e4 Author: Martin Schwenke Date: Fri Aug 7 12:19:09 2020 +1000 ctdb-tools: Drop "ctdb isnotrecmaster" command This isn't used anywhere and can easily be checked via "ctdb pnn" and "ctdb recmaster" commands. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: WHATSNEW.txt | 4 +++ ctdb/doc/ctdb.1.xml| 2 +- ctdb/doc/ctdb.7.xml| 8 ++ .../simple/cluster.001.isnotrecmaster.sh | 28 - ctdb/tools/ctdb.c | 29 -- 5 files changed, 13 insertions(+), 58 deletions(-) delete mode 100755 ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 206ee6ad20d..7c155d89a39 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -29,6 +29,10 @@ CTDB CHANGES "follower-only" (from "slave-only"). Identical changes were made for LVS. +* Remove "ctdb isnotrecmaster" command. It isn't used by CTDB's + scripts and can be checked by users with "ctdb pnn" and "ctdb + recmaster". + REMOVED FEATURES diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index 217a6d3e41a..e0e05d8e542 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@ -1816,7 +1816,7 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index 7fd61af0964..274d12c7002 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -57,6 +57,12 @@ high-availablity (HA) environment for services such as clustered Samba, NFS and other services. + + +In addition to the CTDB manual pages there is much more +information available at +https://wiki.samba.org/index.php/CTDB_and_Clustered_Samba"/>. + @@ -1115,6 +1121,8 @@ correct CIFS semantics to clients. ctdb-tunables 7, + https://wiki.samba.org/index.php/CTDB_and_Clustered_Samba"/>, + http://ctdb.samba.org/"/> diff --git a/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh b/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh deleted file mode 100755 index 7d8620bc2f5..000 --- a/ctdb/tests/INTEGRATION/simple/cluster.001.isnotrecmaster.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Verify the operation of 'ctdb isnotrecmaster' - -. "${TEST_SCRIPTS_DIR}/integration.bash" - -set -e - -ctdb_test_init - -cmd="$CTDB isnotrecmaster || true" -try_command_on_node -v all "$cmd" - -num_all_lines=$(wc -l <"$outfile") -num_rm_lines=$(grep -Fc 'this node is the recmaster' "$outfile") || true -num_not_rm_lines=$(grep -Fc 'this node is not the recmaster' "$outfile") || true - -if [ $num_rm_lines -eq 1 ] ; then -echo "OK, there is only 1 recmaster" -else -die "BAD, there are ${num_rm_lines} nodes claiming to be the recmaster" -fi - -if [ $(($num_all_lines - $num_not_rm_lines)) -eq 1 ] ; then -echo "OK, all the other nodes claim not to be the recmaster" -else -die "BAD, there are only ${num_not_rm_lines} notrecmaster nodes" -fi diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 5209081f322..e21d2d4b562 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -2997,33 +2997,6 @@ static int control_ipreallocate(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, return ipreallocate(mem_ctx, ctdb); } -static int control_isnotrecmaster(TALL
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 642dc6ded64 ctdb-scripts: Use nfsconf as a last resort get nfsd thread count via 334dd8cedda ctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME from bbcab57955d WHATSNEW: Fix description of CTDB NAT gateway and LVS changes https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 642dc6ded6426ba2fbf3ac1e5cd71aae11ca245b Author: Martin Schwenke Date: Mon Jul 20 12:02:45 2020 +1000 ctdb-scripts: Use nfsconf as a last resort get nfsd thread count If nfsconf exists then use it as last resort to attempt to extract [nfsd]:threads from /etc/nfs.conf. Invocation of nfsconf requires "|| true" because this script uses "set -e". Add a stub that always fails to at least test this much. BUG: https://bugzilla.samba.org/show_bug.cgi?id=1 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Jul 27 07:06:58 UTC 2020 on sn-devel-184 commit 334dd8cedda6a341e3b89c9adc8102ea5480e452 Author: Martin Schwenke Date: Mon Jul 13 10:16:33 2020 +1000 ctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME If nfsconf exists then use it as last resort to attempt to extract [statd]:name from /etc/nfs.conf. BUG: https://bugzilla.samba.org/show_bug.cgi?id=1 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/nfs-linux-kernel-callout | 3 +++ ctdb/config/statd-callout | 21 + ctdb/tests/UNIT/eventscripts/stubs/nfsconf | 5 + 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100755 ctdb/tests/UNIT/eventscripts/stubs/nfsconf Changeset truncated at 500 lines: diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index 71d8ecf8074..6a372d4b4fd 100755 --- a/ctdb/config/nfs-linux-kernel-callout +++ b/ctdb/config/nfs-linux-kernel-callout @@ -299,6 +299,9 @@ nfs_check_thread_count () # assume that those using the default don't care about the number # of threads and that they have switched on this feature in error. _configured_threads="${RPCNFSDCOUNT:-${USE_KERNEL_NFSD_NUMBER}}" +if [ -z "$_configured_threads" ] && type nfsconf >/dev/null 2>&1 ; then + _configured_threads=$(nfsconf --get nfsd threads) || true +fi [ -n "$_configured_threads" ] || return 0 _threads_file="${PROCFS_PATH}/fs/nfsd/threads" diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout index b75135bbde5..67ed2a5bc62 100755 --- a/ctdb/config/statd-callout +++ b/ctdb/config/statd-callout @@ -3,10 +3,18 @@ # This must run as root as CTDB tool commands need to access CTDB socket [ "$(id -u)" -eq 0 ] || exec sudo "$0" "$@" -# this script needs to be installed so that statd points to it with the -H -# command line argument. The easiest way to do that is to put something like this in -# /etc/sysconfig/nfs: -# STATD_HOSTNAME="myhostname -H /etc/ctdb/statd-callout" +# statd must be configured to use this script as its high availability call-out. +# +# In most Linux versions this can be done using something like the following... +# +# /etc/sysconfig/nfs (Red Hat) or /etc/default/nfs-common (Debian): +# NFS_HOSTNAME=myhostname +# STATD_HOSTNAME="${NFS_HOSTNAME} -H /etc/ctdb/statd-callout" +# +# Newer Red Hat Linux variants instead use /etc/nfs.conf: +# [statd] +# name = myhostname +# ha-callout = /etc/ctdb/statd-callout [ -n "$CTDB_BASE" ] || \ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD") @@ -23,6 +31,11 @@ die () # Try different variables to find config file for NFS_HOSTNAME load_system_config "nfs" "nfs-common" +# If NFS_HOSTNAME not set then try to pull it out of /etc/nfs.conf +if [ -z "$NFS_HOSTNAME" ] && type nfsconf >/dev/null 2>&1 ; then + NFS_HOSTNAME=$(nfsconf --get statd name) +fi + [ -n "$NFS_HOSTNAME" ] || \ die "NFS_HOSTNAME is not configured. statd-callout failed" diff --git a/ctdb/tests/UNIT/eventscripts/stubs/nfsconf b/ctdb/tests/UNIT/eventscripts/stubs/nfsconf new file mode 100755 index 000..84dd9ea5f60 --- /dev/null +++ b/ctdb/tests/UNIT/eventscripts/stubs/nfsconf @@ -0,0 +1,5 @@ +#!/bin/sh + +# This always fails for now, since there are no tests that expect to +# use it. +exit 1 -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via db4b52b73e8 WHATSNEW: Document CTDB NAT gateway and LVS changes via f37b3cf2a64 ctdb: Change LVS to use leader/follower via 16b848553da ctdb: Change NAT gateway to use leader/follower from 5ce6133a751 ctdb-recoverd: Simplify calculation of new flags https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit db4b52b73e80d0408a6e064ca6623eba0648c8de Author: Martin Schwenke Date: Fri Jul 17 20:38:12 2020 +1000 WHATSNEW: Document CTDB NAT gateway and LVS changes Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 24 09:58:53 UTC 2020 on sn-devel-184 commit f37b3cf2a64e066d4f261d453233dc9a0988aed7 Author: Martin Schwenke Date: Fri Jul 17 20:46:07 2020 +1000 ctdb: Change LVS to use leader/follower Instead of master/slave. Nearly all of these are simple textual substitutions, which preserve the case of the original.A couple of minor cleanups were made in the documentation (such as "LVSMASTER" -> "LVS leader"). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 16b848553da47f0716d74c13bbbfba50ef5d2cd1 Author: Martin Schwenke Date: Wed Jun 24 11:20:24 2020 +1000 ctdb: Change NAT gateway to use leader/follower Instead of master/slave. Nearly all of these are simple textual substitutions, which preserve the case of the original. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: WHATSNEW.txt | 12 ++ ctdb/config/events/legacy/11.natgw.script | 44 ++-- ctdb/config/events/legacy/91.lvs.script| 12 +++--- ctdb/doc/ctdb-script.options.5.xml | 32 +++ ctdb/doc/ctdb.1.xml| 16 ctdb/doc/ctdb.7.xml| 48 +++--- ctdb/tests/UNIT/eventscripts/11.natgw.002.sh | 2 +- ctdb/tests/UNIT/eventscripts/11.natgw.003.sh | 4 +- ctdb/tests/UNIT/eventscripts/11.natgw.004.sh | 4 +- ctdb/tests/UNIT/eventscripts/11.natgw.011.sh | 6 +-- ctdb/tests/UNIT/eventscripts/11.natgw.012.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.013.sh | 6 +-- ctdb/tests/UNIT/eventscripts/11.natgw.014.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.015.sh | 20 - ctdb/tests/UNIT/eventscripts/11.natgw.021.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.022.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.023.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.024.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.025.sh | 24 +-- ctdb/tests/UNIT/eventscripts/11.natgw.031.sh | 14 +++ ctdb/tests/UNIT/eventscripts/11.natgw.041.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.042.sh | 8 ++-- ctdb/tests/UNIT/eventscripts/11.natgw.051.sh | 4 +- ctdb/tests/UNIT/eventscripts/11.natgw.052.sh | 4 +- ctdb/tests/UNIT/eventscripts/11.natgw.053.sh | 4 +- ctdb/tests/UNIT/eventscripts/11.natgw.054.sh | 4 +- .../UNIT/eventscripts/91.lvs.ipreallocated.012.sh | 2 +- .../UNIT/eventscripts/91.lvs.ipreallocated.013.sh | 4 +- .../UNIT/eventscripts/91.lvs.ipreallocated.014.sh | 4 +- ctdb/tests/UNIT/eventscripts/scripts/11.natgw.sh | 18 ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh | 10 ++--- ctdb/tests/UNIT/eventscripts/stubs/ctdb_lvs| 10 ++--- ctdb/tests/UNIT/eventscripts/stubs/ctdb_natgw | 14 +++ ctdb/tests/UNIT/tool/ctdb.lvs.001.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.002.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.003.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.004.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.005.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.006.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.007.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.lvs.008.sh | 2 +- ctdb/tests/UNIT/tool/ctdb.natgw.001.sh | 4 +- ctdb/tests/UNIT/tool/ctdb.natgw.002.sh | 4 +- ctdb/tests/UNIT/tool/ctdb.natgw.003.sh | 4 +- ctdb/tests/UNIT/tool/ctdb.natgw.004.sh | 4 +- ctdb/tests/UNIT/tool/ctdb.natgw.005.sh | 4 +- ctdb/tests/UNIT/tool/ctdb.natgw.006.sh | 10 ++--- ctdb/tests/UNIT/tool/ctdb.natgw.007.sh | 16 ctdb/tests/UNIT/tool/ctdb.natgw.008.sh | 4 +- ctdb/tools/ctdb.c | 4 +- ctdb/tools/ctdb_lvs| 16
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5707781ccf6 ctdb-tests: Stop cat command failure from causing test failure via d2f8cd835da ctdb-tests: Improve test portability/quality via a308f2534d3 ctdb-tests: Improve test quality via 1f6556916e7 ctdb-tests: Improve test portability via ea1cbff6243 ctdb-tests: Improve test quality via 1079d6e3ae5 ctdb-tests: Improve test portability via aa5b214eaa8 ctdb-tests: Drop uses of "onnode any ..." in testcases via 58f9f699f18 ctdb-tests: Don't bother shutting down daemons in ctdb_init() via e9df17b5001 ctdb-tests: Separate custom cluster startup from test initialisation via 44e05ac8515 ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init() via 30293baae5f ctdb-tests: Make unit.sh pass shellcheck via 0f04b8a70be ctdb-tests: Make integration.bash pass shellcheck via 9a7cabd342d ctdb-tests: Use "#!/usr/bin/env bash" for improved portability via 65f56505e29 ctdb-tests: Update preamble for INTEGRATION tests via a55dd6f17b6 ctdb-tests: Drop unreachable line via 847aa0e367c ctdb-tests: Redirect stderr too when checking for shellcheck via c78de201f84 ctdb-tests: Show hung script debugging output via 9694ba6fe4d ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG via 91c36c16c85 ctdb-build: Don't build/install tests in top-level build by default from da1103dbdc9 smbd: build smb_fname per file to delete in unlink_internals() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5707781ccf682d95a5a05a7c3e00a43003dbe62e Author: Martin Schwenke Date: Mon Jul 6 14:02:49 2020 +1000 ctdb-tests: Stop cat command failure from causing test failure In certain circumstance, which aren't obvious, cat(1) can fail when attempting to write a lot of data. This is due to something (probably write(2)) returning EAGAIN. Given that the -v option should only really be used for test debugging, ignore the failure instead of spending time debugging it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14446 Signed-off-by: Martin Schwenke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jul 22 04:10:47 UTC 2020 on sn-devel-184 commit d2f8cd835da39784f2d99231f9a1067ae56ede7a Author: Martin Schwenke Date: Fri Mar 6 05:10:05 2020 +1100 ctdb-tests: Improve test portability/quality Avoid use of non-portable md5sum by constructing database names using index. Improve indentation, use more modern commands, code improvements (shellcheck). Signed-off-by: Martin Schwenke commit a308f2534d3991866efa2c662921ec63b423 Author: Martin Schwenke Date: Thu Mar 5 21:53:33 2020 +1100 ctdb-tests: Improve test quality Simplify code, use more modern commands, code improvements (shellcheck). Signed-off-by: Martin Schwenke commit 1f6556916e7f3a731d7d760fa6fd857e7f571541 Author: Martin Schwenke Date: Thu Mar 5 21:48:59 2020 +1100 ctdb-tests: Improve test portability "wc -l" on some platforms (e.g. FreeBSD) contains leading spaces, so strip them. Signed-off-by: Martin Schwenke commit ea1cbff624383fb9d5b83b863fa6bd00a8fb77fa Author: Martin Schwenke Date: Thu Mar 5 20:42:01 2020 +1100 ctdb-tests: Improve test quality Select test node with IPs instead of using a fixed node. Remove unnecessary code, use more modern commands, code improvements (shellcheck). Signed-off-by: Martin Schwenke commit 1079d6e3ae5805ef65a3628edf0a3ac2cd7fac1c Author: Martin Schwenke Date: Thu Mar 5 20:21:26 2020 +1100 ctdb-tests: Improve test portability "wc -l" on some platforms (e.g. FreeBSD) contains leading spaces and stops "$num from being a number. Create a more portable solution and put it in a function instead of repeating the logic. Signed-off-by: Martin Schwenke commit aa5b214eaa88414c87410fd068fe7624e9790185 Author: Martin Schwenke Date: Tue Dec 10 11:33:02 2019 +1100 ctdb-tests: Drop uses of "onnode any ..." in testcases It would be nice to get rid of "onnode any". There's no use making tests nondeterministic. If covering different cases matters then they should be explicitly handled. In most places "any" is replaced by "$test_node". In some cases, where $test_node is not set, a fixed node that is already used elsewhere can be reused. Signed-off-by: Martin Schwenke commit 58f9f699f181ac217cda8de512b8385da173f884 Author: Martin Schwenke Date: Tue Dec 10 14:47:23 2019 +1100 ctdb-tests: Don't bother shutting down daemons in ctdb_init() They'll never be up here... Signed-off-by: Mart
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0e287127cb8 ctdb-tools: Improve onnode's ShellCheck credibility via 5f217d60376 ctdb-tools: Allow onnode -P to respect ONNODE_SSH via 00eb88b241c ctdb-tools: Whitespace fixups via bc174243d78 ctdb-tools: Drop undocumented ONNODE_SSH_OPTS variable from d8f1d267cde util: Fix a signed/unsigned comparison https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0e287127cb8d8ce93abb99ea32b146b9392b56bc Author: Martin Schwenke Date: Thu Jun 4 09:59:59 2020 +1000 ctdb-tools: Improve onnode's ShellCheck credibility Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Jul 16 06:51:47 UTC 2020 on sn-devel-184 commit 5f217d60376226d323e9d86ed094a27b7e7fa4b8 Author: Martin Schwenke Date: Thu Jun 4 09:58:41 2020 +1000 ctdb-tools: Allow onnode -P to respect ONNODE_SSH Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 00eb88b241c1451b23fdd86ec8a391c07a20fa2a Author: Martin Schwenke Date: Thu Jun 4 09:48:03 2020 +1000 ctdb-tools: Whitespace fixups Drop some unnecessary whitespace and re-indent push(). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit bc174243d789e95f9f4487f08a0998787e64f0d4 Author: Martin Schwenke Date: Thu Jun 4 09:45:26 2020 +1000 ctdb-tools: Drop undocumented ONNODE_SSH_OPTS variable Options can be set in ONNODE_SSH, so this variable is unnecessary. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tools/onnode | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index 35c46c3c779..f2be62e5af4 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -14,12 +14,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. - + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. - + # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. @@ -154,7 +154,7 @@ get_nodes_with_status () ( local i IFS="${IFS}|" - while IFS="" read i ; do + while IFS="" read -r i ; do # Intentional word splitting # shellcheck disable=SC2086 @@ -193,7 +193,7 @@ get_any_available_node () # We do a recursive onnode to find which nodes are up and running. local out line out=$("$0" -pq all ctdb pnn 2>&1) -while read line ; do +while read -r line ; do if [[ "$line" =~ ^[0-9]+$ ]] ; then local pnn="$line" # Intentional multi-word expansion @@ -254,19 +254,19 @@ get_nodes () done } -push() +push () { -local host="$1" -local files="$2" - -local f -for f in $files ; do -$verbose && echo "Pushing $f" -case "$f" in - /*) rsync "$f" "[${host}]:${f}" ;; - *) rsync "${PWD}/${f}" "[${host}]:${PWD}/${f}" ;; - esac -done + local host="$1" + local files="$2" + + local f + for f in $files ; do + $verbose && echo "Pushing $f" + case "$f" in + /*) rsync "$f" "[${host}]:${f}" ;; + *) rsync "${PWD}/${f}" "[${host}]:${PWD}/${f}" ;; + esac + done } ## @@ -275,8 +275,10 @@ parse_options "$@" ssh_opts= if $push ; then + if [ -n "$ONNODE_SSH" ] ; then + export RSYNC_RSH="$ONNODE_SSH" + fi ONNODE_SSH=push - ONNODE_SSH_OPTS="" else $current && command="cd $PWD && $command" @@ -313,7 +315,7 @@ retcode=0 for n in $nodes ; do set -o pipefail 2>/dev/null - ssh_cmd="$ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS" + ssh_cmd="$ONNODE_SSH $ssh_opts" if $parallel ; then if $verbose ; then $ssh_cmd "$n" "$command" 2>&1 | sed -e "s@^@[$n] @" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1e55591bc54 ctdb-tests: Add a new fetch ring test that also checks hot keys via fb38252677d ctdb-tests: Update fetch_ring to take database and key on command line via 53b73b9b0f9 ctdb-daemon: Fix sorting of hot keys via 5c8dfbbf9be ctdb-daemon: Add extra logging of hot keys via baf058dcf72 ctdb-daemon: Update hot key logging via 1ab39b3270e ctdb-daemon: Fix bug in slot 0 comparison optimisation via f9f60c2a604 ctdb-daemon: Switch some variables to unsigned via 21b9844bcbb ctdb-daemon: Add separate hot keys array for database statistics via c28914bfa70 ctdb-build: Fix a typo from c68133d41c3 smbd: prepare DH disconnect for AT-names https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1e55591bc54949848eeb01a8be4378a18bc9e6c3 Author: Martin Schwenke Date: Mon May 4 17:15:19 2020 +1000 ctdb-tests: Add a new fetch ring test that also checks hot keys Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri May 22 08:05:54 UTC 2020 on sn-devel-184 commit fb38252677d0dab299f3fab051eb031167b87242 Author: Martin Schwenke Date: Mon May 4 16:58:38 2020 +1000 ctdb-tests: Update fetch_ring to take database and key on command line Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 53b73b9b0f99c9683fca043f4fee74be6a488c66 Author: Martin Schwenke Date: Thu Apr 23 18:59:47 2020 +1000 ctdb-daemon: Fix sorting of hot keys The current code only ever swaps with slot 0. This will only ever happen with slots 0 and 1, so probably never sorts. Replace with qsort(). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5c8dfbbf9bea05c35fe1ce454ee47dbee5172722 Author: Martin Schwenke Date: Fri May 1 16:44:22 2020 +1000 ctdb-daemon: Add extra logging of hot keys ctdbd currently only logs when a new hot key is added. If a key gets hotter then nothing new is logged. Log hot key updates when the number of migrations has doubled since the last time that key was logged. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit baf058dcf72e4072ecc2f4bf775f04c271a6e10b Author: Martin Schwenke Date: Fri May 1 16:24:27 2020 +1000 ctdb-daemon: Update hot key logging This message indicates that a hot key was added, so say that. After all the hot key slots have been filled the id will always be 0, so don't bother logging it. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 1ab39b3270ea34a1953e79d63f3f6d9e04983898 Author: Martin Schwenke Date: Thu May 14 20:25:22 2020 +1000 ctdb-daemon: Fix bug in slot 0 comparison optimisation This is only valid if all slots are in use. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f9f60c2a60464e8773663848572ec9ec08be0ee5 Author: Martin Schwenke Date: Thu Apr 23 18:59:24 2020 +1000 ctdb-daemon: Switch some variables to unsigned These should be unsigned but luck is currently on our side. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 21b9844bcbb4d8c18d82df063d6c143b435cdfb7 Author: Martin Schwenke Date: Thu Apr 23 18:51:40 2020 +1000 ctdb-daemon: Add separate hot keys array for database statistics There are 2 reasons for this. Sorting of hot keys is broken and will be changed to an implementation that needs a named (i.e. not anonymous) structure. Also, at least one non-protocol field will be added to facilitate more useful logging. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c28914bfa7020227066387b637e0e90b8590510e Author: Martin Schwenke Date: Thu May 21 20:19:17 2020 +1000 ctdb-build: Fix a typo Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/include/ctdb_private.h| 7 + ctdb/server/ctdb_call.c| 83 +++ ctdb/server/ctdb_ltdb_server.c | 22 ++- ctdb/tests/INTEGRATION/database/fetch.001.ring.sh | 3 +- .../INTEGRATION/database/fetch.002.ring-hotkeys.sh | 161 + ctdb/tests/src/fetch_ring.c| 30 ++-- ctdb/wscript | 2 +- 7 files changed, 259 insertions(+), 49 deletions(-) create mode 100755 ctdb/tests/INTEGRATION/database/fetch.002.ring-hotkeys.sh Changeset truncated at 500 lines: diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index e532323bb34..9ca87332d61 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 23c2195e2c1 ctdb-build: Add messages_dgm build to ctdb via a59fd8164c9 lib/util: Build genrand for util core via e595d2a1fd2 wscript_build: Remove duplicate recursion in source4/smbd via 93408f60cb6 lib/messaging: Move messages_dgm out of source3 from 8d22b9edff7 Revert "smbd: fullpath based on fsp->fsp_name may contain an @GMT token" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 23c2195e2c146838cdd3e906d2a14e6c20bc3c6b Author: Amitay Isaacs Date: Fri Jun 28 23:10:38 2019 +1000 ctdb-build: Add messages_dgm build to ctdb Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed May 6 01:47:16 UTC 2020 on sn-devel-184 commit a59fd8164c949dff7cbde61d8a914c5a373cb14c Author: Amitay Isaacs Date: Fri Jun 28 23:07:34 2019 +1000 lib/util: Build genrand for util core messages_dgm depends on genrand. Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke commit e595d2a1fd208f46098bba045508db09c093a7f8 Author: Amitay Isaacs Date: Mon May 4 16:32:38 2020 +1000 wscript_build: Remove duplicate recursion in source4/smbd Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke commit 93408f60cb6812b1aa71053836379ec7396959e6 Author: Amitay Isaacs Date: Fri Jun 28 23:05:43 2019 +1000 lib/messaging: Move messages_dgm out of source3 ... so CTDB can also use it. Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke --- Summary of changes: ctdb/wscript | 8 {source3/lib => lib/messaging}/messages_dgm.c | 2 +- {source3/lib => lib/messaging}/messages_dgm.h | 0 {source3/lib => lib/messaging}/messages_dgm_ref.c | 0 {source3/lib => lib/messaging}/messages_dgm_ref.h | 0 lib/messaging/wscript_build | 16 lib/util/wscript_build| 12 ++-- source3/lib/messages.c| 4 ++-- source3/lib/serverid.c| 2 +- source3/lib/util.c| 2 +- source3/lib/util_procid.c | 2 +- source3/wscript_build | 15 --- source4/lib/messaging/messaging.c | 4 ++-- source4/lib/messaging/messaging_send.c| 4 ++-- source4/smbd/process_standard.c | 2 +- wscript_build | 2 +- 16 files changed, 42 insertions(+), 33 deletions(-) rename {source3/lib => lib/messaging}/messages_dgm.c (99%) rename {source3/lib => lib/messaging}/messages_dgm.h (100%) rename {source3/lib => lib/messaging}/messages_dgm_ref.c (100%) rename {source3/lib => lib/messaging}/messages_dgm_ref.h (100%) create mode 100644 lib/messaging/wscript_build Changeset truncated at 500 lines: diff --git a/ctdb/wscript b/ctdb/wscript index dae25e725dc..2273853c74f 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -33,6 +33,8 @@ samba_dist.DIST_DIRS('''ctdb:. lib/replace:lib/replace lib/talloc:lib/talloc lib/util:lib/util lib/tdb_wrap:lib/tdb_wrap lib/ccan:lib/ccan libcli/util:libcli/util lib/async_req:lib/async_req +lib/pthreadpool:lib/pthreadpoool +lib/messaging:lib/messaging buildtools:buildtools third_party/waf:third_party/waf''') manpages_binary = [ @@ -145,6 +147,10 @@ def configure(conf): conf.SAMBA_CHECK_PYTHON() conf.SAMBA_CHECK_PYTHON_HEADERS() +# We just want gnutls_rnd for rand subsystem +conf.CHECK_FUNCS_IN('gnutls_rnd', 'gnutls') + + if conf.CHECK_FOR_THIRD_PARTY(): conf.RECURSE('third_party/popt') if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'): @@ -359,6 +365,8 @@ def build(bld): bld.RECURSE('lib/tdb_wrap') bld.RECURSE('lib/util') bld.RECURSE('lib/async_req') +bld.RECURSE('lib/pthreadpool') +bld.RECURSE('lib/messaging') bld.RECURSE('lib/talloc') bld.RECURSE('lib/tevent') diff --git a/source3/lib/messages_dgm.c b/lib/messaging/messages_dgm.c similarity index 99% rename from source3/lib/messages_dgm.c rename to lib/messaging/messages_dgm.c index 661e032b908..b7126b9c8ca 100644 --- a/source3/lib/messages_dgm.c +++ b/lib/messaging/messages_dgm.c @@ -24,7 +24,7 @@ #include "system/dir.h" #include "system/select.h" #include "lib/util/debug.h" -#include "lib/messages_dgm.h" +#include "messages_dgm.h" #include "lib/util/genrand.h&q
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f8f3d7954da ctdb-vacuum: Reschedule vacuum event if VacuumInterval has increased via 5d03a3c86eb ctdb-vacuum: Store value of VacuumInterval in ctdb_vacuum_handle via 7ad7c0b9324 ctdb-vacuum: Use vacuum_handle local variables from c4be195da28 testprogs: Add 'net ads join createupn' test also verifying the keytab https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f8f3d7954da679c225f5f5a1f1baff0b06c88341 Author: Martin Schwenke Date: Thu Apr 2 14:42:21 2020 +1100 ctdb-vacuum: Reschedule vacuum event if VacuumInterval has increased The vacuuming integration tests set VacuumInterval to a very high number to avoid vacuuming collisions. This is done after the cluster is healthy, so Samba will have already been started and vacuuming will already be scheduled *at the default interval* for databases attached by Samba. This means that vacuuming controls used by vacuuming tests can still collide with the scheduled vacuuming events. Add some logic to reschedule a vacuuming event that has fired but where VacuumInterval has increased since it was originally scheduled. The increase in VacuumInterval is used as the time offset for rescheduling the event. Although this changes production behaviour for the convenience of testing, the new behaviour is completely reasonable and obeys the principle of least surprise. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Apr 7 03:04:57 UTC 2020 on sn-devel-184 commit 5d03a3c86ebe52832584737deb5e9dff7ccb5916 Author: Martin Schwenke Date: Fri Mar 27 14:38:09 2020 +1100 ctdb-vacuum: Store value of VacuumInterval in ctdb_vacuum_handle No behaviour change. This is final staging to make the next change completely obvious. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7ad7c0b9324c30b32e972df4cbff229e380d71f1 Author: Martin Schwenke Date: Thu Apr 2 14:18:33 2020 +1100 ctdb-vacuum: Use vacuum_handle local variables No behaviour change. This just makes future changes clearer by avoiding reformatting (or introducing local variables). Clean up error handling while touching a relevant line. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/server/ctdb_vacuum.c | 59 --- 1 file changed, 46 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 5351a3c5175..74d7215bbe8 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -62,6 +62,7 @@ struct ctdb_vacuum_child_context { struct ctdb_vacuum_handle { struct ctdb_db_context *ctdb_db; uint32_t fast_path_count; + uint32_t vacuum_interval; }; @@ -1314,7 +1315,8 @@ static uint32_t get_vacuum_interval(struct ctdb_db_context *ctdb_db) static int vacuum_child_destructor(struct ctdb_vacuum_child_context *child_ctx) { double l = timeval_elapsed(_ctx->start_time); - struct ctdb_db_context *ctdb_db = child_ctx->vacuum_handle->ctdb_db; + struct ctdb_vacuum_handle *vacuum_handle = child_ctx->vacuum_handle; + struct ctdb_db_context *ctdb_db = vacuum_handle->ctdb_db; struct ctdb_context *ctdb = ctdb_db->ctdb; CTDB_UPDATE_DB_LATENCY(ctdb_db, "vacuum", vacuum.latency, l); @@ -1324,18 +1326,20 @@ static int vacuum_child_destructor(struct ctdb_vacuum_child_context *child_ctx) ctdb_kill(ctdb, child_ctx->child_pid, SIGKILL); } else { /* Bump the number of successful fast-path runs. */ - child_ctx->vacuum_handle->fast_path_count++; + vacuum_handle->fast_path_count++; } ctdb->vacuumer = NULL; if (child_ctx->scheduled) { + vacuum_handle->vacuum_interval = get_vacuum_interval(ctdb_db); + tevent_add_timer( ctdb->ev, - child_ctx->vacuum_handle, - timeval_current_ofs(get_vacuum_interval(ctdb_db), 0), + vacuum_handle, + timeval_current_ofs(vacuum_handle->vacuum_interval, 0), ctdb_vacuum_event, - child_ctx->vacuum_handle); + vacuum_handle); } return 0; @@ -1515,9 +1519,28 @@ static void ctdb_vacuum_event(struct tevent_context *ev, struct ctdb_context *ctdb = ctdb_db->ctdb; struct ctdb_vacuum_child_
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9f9dcfb6c32 ctdb-tests: Use built-in hexdump() in system socket tests via 602694522f5 ctdb-tests: Split system socket test via b10e79f2088 ctdb-tests: Skip "ctdb process-exists" tests when not on Linux via c5dd4767156 ctdb-tests: Add function ctdb_test_check_supported_OS via 8402dabf880 ctdb-tests: Use ctdb_test_skip() when initscript can not be found via 30180ef6c28 ctdb-tests: Use ctdb_test_skip() when shellcheck is not installed via 77f6977102e ctdb-tests: Skipped tests should not cause failure from 54f26cfcf25 autobuild: Run the none env in the samba-o3 build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9f9dcfb6c3270a21f2a805b2aa308c5b584813e5 Author: Martin Schwenke Date: Wed Mar 4 14:38:15 2020 +1100 ctdb-tests: Use built-in hexdump() in system socket tests Better compatibility, since od output isn't consistent on FreeBSD. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Mar 10 09:17:12 UTC 2020 on sn-devel-184 commit 602694522f5650ebfa78adec8088002ca979af45 Author: Martin Schwenke Date: Tue Mar 10 17:32:52 2020 +1100 ctdb-tests: Split system socket test One test for each of types, TCP, ARP. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b10e79f208848956f836b908dbcb58b030fab9c0 Author: Martin Schwenke Date: Wed Mar 4 14:08:12 2020 +1100 ctdb-tests: Skip "ctdb process-exists" tests when not on Linux Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c5dd476715640d532c37ad5b5a9065b70eadeea8 Author: Martin Schwenke Date: Wed Mar 4 14:05:02 2020 +1100 ctdb-tests: Add function ctdb_test_check_supported_OS Skips test if not on one of the supported OSes. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8402dabf880a4aebca6aa6dc48e7db29a96cab28 Author: Martin Schwenke Date: Mon Mar 9 20:03:09 2020 +1100 ctdb-tests: Use ctdb_test_skip() when initscript can not be found Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 30180ef6c280a7aa3d683ae33877daa60ce6b3dd Author: Martin Schwenke Date: Tue Mar 3 17:48:40 2020 +1100 ctdb-tests: Use ctdb_test_skip() when shellcheck is not installed When the tests are run interactively this will make it more noticeable that shellcheck is not installed because the test summary will indicate missing tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 77f6977102e07286810a1f8420e63048183cfe22 Author: Martin Schwenke Date: Thu Mar 5 11:40:56 2020 +1100 ctdb-tests: Skipped tests should not cause failure Skipped tests return a status that indicates failure. In combination with the -e option this results in an exit with failure on the first skipped test. Convert skipped test status to success. The skip has already been counted. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tests/UNIT/cunit/system_socket_test_001.sh| 123 - ...ocket_test_001.sh => system_socket_test_002.sh} | 71 +--- ctdb/tests/UNIT/cunit/system_socket_test_003.sh| 39 +++ ctdb/tests/UNIT/shellcheck/init_script.sh | 3 +- ctdb/tests/UNIT/shellcheck/scripts/local.sh| 2 +- ctdb/tests/UNIT/tool/ctdb.process-exists.001.sh| 2 + ctdb/tests/UNIT/tool/ctdb.process-exists.002.sh| 2 + ctdb/tests/UNIT/tool/ctdb.process-exists.003.sh| 2 + ctdb/tests/run_tests.sh| 7 ++ ctdb/tests/scripts/common.sh | 13 +++ ctdb/tests/src/system_socket_test.c| 27 +++-- 11 files changed, 87 insertions(+), 204 deletions(-) copy ctdb/tests/UNIT/cunit/{system_socket_test_001.sh => system_socket_test_002.sh} (50%) create mode 100755 ctdb/tests/UNIT/cunit/system_socket_test_003.sh Changeset truncated at 500 lines: diff --git a/ctdb/tests/UNIT/cunit/system_socket_test_001.sh b/ctdb/tests/UNIT/cunit/system_socket_test_001.sh index 4a74b8c64a0..389cec6ac8c 100755 --- a/ctdb/tests/UNIT/cunit/system_socket_test_001.sh +++ b/ctdb/tests/UNIT/cunit/system_socket_test_001.sh @@ -2,128 +2,5 @@ . "${TEST_SCRIPTS_DIR}/unit.sh" -out_file="${CTDB_TEST_TMP_DIR}/packet.out" - -remove_file () -{ - rm -f "$out_file" -} - -test_cleanup remove_file - -d=$(dirname "$out_file") -mkdir -p "$d" - - - ok_null unit_test system_socket_test types - -arp_run () -{ - $VALGRI
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7cff3ed12cd ctdb-tests: Use a local "ctdb shutdown" command to avoid a race from 84172ae7cbc dsdb: Add debugging for a contrived situation where a non-schema attribute is on the record https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7cff3ed12cd807b1c7feb0a4e234d52ee2232138 Author: Martin Schwenke Date: Fri Feb 21 20:35:24 2020 +1100 ctdb-tests: Use a local "ctdb shutdown" command to avoid a race When "ctdb shutdown" is run with -n it does not wait for the node 's ctdbd to go down but exits immediately. This means that the local_daemons.sh shutdown command can find the PID file still present and then attempt the shutdown, but the daemon can have exited between the check and the shutdown. Although the test waits until the node is disconnected, the transport is taken down just before the exit, so this does not guarantee the daemon has exited. A local shutdown command (no -n ) waits until the socket disconnects and this happens *after* the PID file is gone, so this is safe to use with the local_daemons.sh shutdown command. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Mar 2 10:39:28 UTC 2020 on sn-devel-184 --- Summary of changes: ctdb/tests/INTEGRATION/simple/basics.003.ping.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh b/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh index b911b896f99..1ff37b903f7 100755 --- a/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh +++ b/ctdb/tests/INTEGRATION/simple/basics.003.ping.sh @@ -41,7 +41,7 @@ sanity_check_output \ 1 \ '^response from 1 time=-?[.0-9]+ sec[[:space:]]+\([[:digit:]]+ clients\)$' -try_command_on_node -v 0 "$CTDB shutdown -n 1" +ctdb_onnode -v 1 "shutdown" wait_until_node_has_status 1 disconnected 30 0 -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4de1e3207ba ctdb-docs: Provide example commands for "ctdb event ..." via 3d5de9b26d4 ctdb-tests: Flag setup, startup, shutdown failures as test errors via 455d931a168 ctdb-tests: Dump logs on shutdown failure via 03403aacfe9 ctdb-tests: Avoid shutdown error when daemon already cleanly shut down via dc076b835f3 ctdb-tests: Rationalise node stop/start/restart via a20403adf87 ctdb-daemon: Fix signed/unsigned comparison via c9405aec703 ctdb-daemon: Check for lock count underflow via c16da0e8f09 ctdb-common: Remove signed/unsigned comparisons from 195e88cea34 s3:modules: add vfs_io_uring module https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4de1e3207ba8e68e6101f5cd94cf18144fd5ed8f Author: Martin Schwenke Date: Thu Feb 13 10:09:08 2020 +1100 ctdb-docs: Provide example commands for "ctdb event ..." The example output doesn't tell a user what command generated it. Adding the command makes the examples much more useful. Reported-by: Stefan Kania Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Feb 18 04:22:56 UTC 2020 on sn-devel-184 commit 3d5de9b26d4019e25d644c6e28e5f3a58f3f8730 Author: Martin Schwenke Date: Fri Dec 6 16:12:08 2019 +1100 ctdb-tests: Flag setup, startup, shutdown failures as test errors Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 455d931a16815f3b8ee47e2b1d5aeb13e76568b2 Author: Martin Schwenke Date: Fri Dec 6 16:11:45 2019 +1100 ctdb-tests: Dump logs on shutdown failure Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 03403aacfe9664bf4cb5689ae40ac1688984d6c6 Author: Martin Schwenke Date: Mon Feb 17 16:29:05 2020 +1100 ctdb-tests: Avoid shutdown error when daemon already cleanly shut down This depends on a small amount of internal knowledge but is the cleanest way of avoiding errors for nodes that have already been shut down. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit dc076b835f30b1067155e2f440a3386331d15b5a Author: Martin Schwenke Date: Wed Dec 11 21:44:28 2019 +1100 ctdb-tests: Rationalise node stop/start/restart Separate functions are not needed for stopping/starting/restarting individual nodes. The stop and start functions essentially just use onnode, though for local daemons this is embedded in local_daemons.sh. So, just provide one stop and one start function that takes an optional nodespec, defaulting to all nodes. Restarting becomes common. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a20403adf871d2c1a646be0737935f85b55f8779 Author: Martin Schwenke Date: Mon Feb 10 17:50:30 2020 +1100 ctdb-daemon: Fix signed/unsigned comparison csbuild says: ctdb/server/ctdb_lock.c: scope_hint: In function ‘ctdb_find_lock_context’ ctdb/server/ctdb_lock.c:671:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c9405aec703a9bb90236ddcb860301339a59fee6 Author: Martin Schwenke Date: Mon Feb 17 16:20:25 2020 +1100 ctdb-daemon: Check for lock count underflow This is a programming error. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c16da0e8f09cb31baab7789ca8cd3bf34514bafc Author: Amitay Isaacs Date: Mon Feb 17 17:00:47 2020 +1100 ctdb-common: Remove signed/unsigned comparisons Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- Summary of changes: ctdb/common/cmdline.c | 10 ++--- ctdb/doc/ctdb.1.xml| 6 ++- ctdb/include/ctdb_private.h| 2 +- ctdb/server/ctdb_lock.c| 3 ++ .../tests/CLUSTER/complex/34_nfs_tickle_restart.sh | 2 +- .../INTEGRATION/database/basics.002.attach.sh | 6 +-- .../simple/cluster.091.version_check.sh| 6 +-- ctdb/tests/local_daemons.sh| 5 ++- ctdb/tests/scripts/integration.bash| 19 ++--- ctdb/tests/scripts/integration_local_daemons.bash | 45 +++--- ctdb/tests/scripts/integration_real_cluster.bash | 23 +++ 11 files changed, 66 insertions(+), 61 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c index fc4cb22f066..ce368a9b241 100644 --- a/ctdb/common/cmdline.c +++ b/ctdb/common/cmdline.c @@ -39,7 +39,7 @@ st
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bd279d3f98d ctdb-tests: Fix getdbmap test so that it actually works sanely via 224e8978723 ctdb-tests: Fix handling of --no-event-scripts option via a6d464aa2ea ctdb-tests: Use a here document to improve readability via b9f23f5b49c ctdb-tests: Use select_test_node() via 0162fd87ed7 ctdb-tests: Increase to dumping up to 500 lines of logs on error via 5a702b01f66 ctdb-tests: Fix return value of DB test tool delete command via a40fc709cc9 ctdb-tcp: Make error handling for outbound connection consistent from ad78496664c samba-tool domain join: remove sub domain join code https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bd279d3f98df58a3a8bdc84c34c2b14a650aa755 Author: Martin Schwenke Date: Tue Dec 10 12:03:10 2019 +1100 ctdb-tests: Fix getdbmap test so that it actually works sanely * Typo in variable name db_map_pattern * Variable num_db_init used before set * dbmap_pattern does not cover database flags Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Feb 12 04:38:47 UTC 2020 on sn-devel-184 commit 224e8978723bd469c2da772208a17725e868fbef Author: Martin Schwenke Date: Thu Dec 12 09:43:58 2019 +1100 ctdb-tests: Fix handling of --no-event-scripts option Shellcheck noticed that pnn was never referenced. Not sure this ever worked or whether it got broken somewhere along the way. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a6d464aa2ea9d7633581ace6834bce8b06f2bd70 Author: Martin Schwenke Date: Wed Dec 11 18:54:42 2019 +1100 ctdb-tests: Use a here document to improve readability Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b9f23f5b49cc2a541c53703c509b70583bc346b4 Author: Martin Schwenke Date: Wed Dec 11 18:47:29 2019 +1100 ctdb-tests: Use select_test_node() select_test_node_and_ips() is not required in these cases. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0162fd87ed71d6055bfa626854889dcd196b577e Author: Martin Schwenke Date: Tue Feb 11 09:26:58 2020 +1100 ctdb-tests: Increase to dumping up to 500 lines of logs on error 100 lines are not enough to debug a current issue. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5a702b01f66a2cd4c8ebbb142872dc19d584540d Author: Martin Schwenke Date: Mon Feb 10 17:19:36 2020 +1100 ctdb-tests: Fix return value of DB test tool delete command Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a40fc709cc972dadb40efbf1394b10fae3cfcc07 Author: Martin Schwenke Date: Tue Jan 28 16:49:14 2020 +1100 ctdb-tcp: Make error handling for outbound connection consistent If we can't bind the local end of an outgoing connection then something has gone wrong. Retrying is better than failing into a zombie state. The interface might come back up and/or the address my be reconfigured. While here, do the same thing for the other (potentially transient) failures. The unknown address family failure is special but just handle it via a retry. Technically it can't happen because the node address parsing can only return values with address family AF_INET or AF_INET6. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14274 Reported-by: 耿纪超 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tcp/tcp_connect.c | 36 ++ .../INTEGRATION/database/basics.001.attach.sh | 11 +-- .../simple/cluster.091.version_check.sh| 2 +- .../simple/eventscripts.090.debug_hung.sh | 10 +++--- ctdb/tests/scripts/integration_local_daemons.bash | 10 +++--- ctdb/tests/src/db_test_tool.c | 2 +- 6 files changed, 37 insertions(+), 34 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index f54086fcd3c..559442f14bf 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -181,16 +181,14 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te, tnode->out_fd = socket(sock_out.sa.sa_family, SOCK_STREAM, IPPROTO_TCP); if (tnode->out_fd == -1) { DBG_ERR("Failed to create socket\n"); - return; + goto failed; } ret = set_blocking(tnode->out_fd, false); if (ret != 0) { DBG_ERR("Failed to set socket non-blocking (%s)\n", strerror(errno)); -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0b3db29bd5f ctdb-tests: Add some tool unit tests to ensure that timeouts work via 0e59cd25e1a ctdb-tools: Allow shorter runtime limit to be specified via 39206fd327f ctdb-tools: When in test mode set process group in top-level ctdb tool via 3b0b830e403 ctdb-tests: Use $PWD/bin/ if it exists when running in-tree via b0b14e4edda ctdb-tests: Make $ctdb_dir absolute via 1a0e1f89246 ctdb-daemon: Fork when not interactive and test mode is enabled via a220e9454a6 ctdb-daemon: Make some conditions more explicit via cefb3327c67 ctdb-daemon: Pass more information to ctdb_start_daemon() via 3509aa28d4b ctdb-tests: Don't actually close stdin in fake ssh via 8de1bb75e56 ctdb-tests: Redirect stdin from /dev/null when running a test via 0737849b905 Revert "ctdb-tests: Enable job control when keeping stdin open" from 2d9841c9788 smbd: Remove overriding file_attributes with unix_mode in the VFS https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0b3db29bd5f44daa0abb64ba4a7bb5e5cad2a6ac Author: Martin Schwenke Date: Tue Jan 7 16:30:23 2020 +1100 ctdb-tests: Add some tool unit tests to ensure that timeouts work Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Feb 10 05:34:08 UTC 2020 on sn-devel-184 commit 0e59cd25e1a254fc20bf6d0227695bf67cec3d9d Author: Martin Schwenke Date: Tue Jan 7 16:26:42 2020 +1100 ctdb-tools: Allow shorter runtime limit to be specified Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 39206fd327f1ea154a8936b99cba0bf9bf221484 Author: Martin Schwenke Date: Fri Feb 7 16:11:23 2020 +1100 ctdb-tools: When in test mode set process group in top-level ctdb tool If ctdbd hangs when shutting down in post-test clean-up then killing the process group can kill the test. When in test mode, create a process group but only in the top-level ctdb tool - the natgw and lvs helpers also run the ctdb tool. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3b0b830e40330b7fa679cf3c6e25dfb29d19e969 Author: Martin Schwenke Date: Wed Feb 5 12:09:51 2020 +1100 ctdb-tests: Use $PWD/bin/ if it exists when running in-tree When running tests from a top-level build, a stale build in ctdb/bin/ will be preferred and may cause confusing results. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b0b14e4eddab78ef71bc6d39f016e4a18929fd64 Author: Martin Schwenke Date: Wed Feb 5 12:07:55 2020 +1100 ctdb-tests: Make $ctdb_dir absolute This is used to set several variables so it might as well be cd-proof. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 1a0e1f89246685730612819d23a8398b340cb673 Author: Martin Schwenke Date: Wed Jan 29 16:28:46 2020 +1100 ctdb-daemon: Fork when not interactive and test mode is enabled There is no sane way of keeping stdin open when using the shell to background ctdbd in local_daemons.sh. Instead, have ctdbd fork when not interactive and when test mode is enabled. become_daemon() can't be used for this: if it forks then it also closes stdin. For the interactive case, become_daemon() wasn't doing anything special, so do nothing instead. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a220e9454a6dd56f3b0f317d9b4361d0328ff79a Author: Martin Schwenke Date: Wed Jan 29 16:26:03 2020 +1100 ctdb-daemon: Make some conditions more explicit These don't need to depend on do_fork. Child logging should be set up whenever the daemon is not interactive. The stdin handler should be setup whenever test mode is enabled. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cefb3327c67d7632fae9a931844671b43b0c2d90 Author: Martin Schwenke Date: Wed Jan 29 16:08:56 2020 +1100 ctdb-daemon: Pass more information to ctdb_start_daemon() No functional changes. This is staging for a change that makes ctdbd fork when test mode is enabled but interactive is not set. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3509aa28d4b76799cbcbe60ae6c5455c93d74b0c Author: Martin Schwenke Date: Thu Jan 30 13:38:52 2020 +1100 ctdb-tests: Don't actually close stdin in fake ssh A subsequent file descriptor allocation may return 0 and unexpected things may then happen. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8de1bb75e56525d43665f0a48abbf47dd91aa9c3 Author: Martin Schwenke Date: Thu Jan 30 13:37:00 2020 +1100 ctdb-tests: Redirect stdin from /dev/null wh
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 85478847a1f WHATSNEW: Add CTDB changes for 4.12 via aa2977e1519 ctdb-mutex: Change default re-check time for fcntl helper to 5s via 14b1dffc27d ctdb-tests: Add some tests to check recovery from recovery lock issues via 64501f51931 ctdb-tests: Put recovery lock for local daemons into a subdirectory via 93fc31858f9 ctdb-tests: Add local_daemons.sh option for recovery lock recheck interval from 13658324a3a CVE-2019-19344 kcc dns scavenging: Fix use after free in dns_tombstone_records_zone https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 85478847a1f6bf8027a1a91df23ae746042620db Author: Martin Schwenke Date: Fri Dec 20 18:16:13 2019 +1100 WHATSNEW: Add CTDB changes for 4.12 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Jan 21 13:05:00 UTC 2020 on sn-devel-184 commit aa2977e1519b76b2c70871032bbc5ab85f8a0c45 Author: Martin Schwenke Date: Fri Jan 10 14:25:39 2020 +1100 ctdb-mutex: Change default re-check time for fcntl helper to 5s Testing against a commonly used cluster filesystem has shown no performance impact, as expected. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 14b1dffc27def76f1c69ff820f4e03dc50ddf4b6 Author: Martin Schwenke Date: Fri Jan 10 15:45:48 2020 +1100 ctdb-tests: Add some tests to check recovery from recovery lock issues Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 64501f519319f83fb6281da50c76275782ee1f6c Author: Martin Schwenke Date: Fri Jan 10 14:04:14 2020 +1100 ctdb-tests: Put recovery lock for local daemons into a subdirectory This makes it more like the way it works with a cluster filesystem. It also allows the subdirectory to be manipulated in tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 93fc31858f91c1b4080a223fed905eaac66a90d2 Author: Martin Schwenke Date: Fri Jan 17 15:30:01 2020 +1100 ctdb-tests: Add local_daemons.sh option for recovery lock recheck interval Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: WHATSNEW.txt | 11 +++ ctdb/server/ctdb_mutex_fcntl_helper.c | 2 +- .../simple/cluster.015.reclock_remove_lock.sh | 90 ++ .../simple/cluster.016.reclock_move_lock_dir.sh| 74 ++ ctdb/tests/local_daemons.sh| 17 +++- 5 files changed, 190 insertions(+), 4 deletions(-) create mode 100755 ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh create mode 100755 ctdb/tests/INTEGRATION/simple/cluster.016.reclock_move_lock_dir.sh Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 0faf69e030f..18c787d3cba 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -129,6 +129,17 @@ Heimdal-DC: removal of weak-crypto. Following removal of DES encryption types from Samba, the embedded Heimdal build has been updated to not compile weak crypto code (HEIM_WEAK_CRYPTO). +CTDB changes + + +* The ctdb_mutex_fcntl_helper periodically re-checks the lock file + + The re-check period is specified using a 2nd argument to this + helper. The default re-check period is 5s. + + If the file no longer exists or the inode number changes then the + helper exits. This triggers an election. + smb.conf changes diff --git a/ctdb/server/ctdb_mutex_fcntl_helper.c b/ctdb/server/ctdb_mutex_fcntl_helper.c index 1448a9062a0..51c46ce733f 100644 --- a/ctdb/server/ctdb_mutex_fcntl_helper.c +++ b/ctdb/server/ctdb_mutex_fcntl_helper.c @@ -398,7 +398,7 @@ int main(int argc, char *argv[]) file = argv[1]; - recheck_time = 60; + recheck_time = 5; if (argc == 3) { recheck_time = smb_strtoul(argv[2], NULL, diff --git a/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh b/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh new file mode 100755 index 000..d74bcf819b4 --- /dev/null +++ b/ctdb/tests/INTEGRATION/simple/cluster.015.reclock_remove_lock.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +# Verify that the cluster recovers if the recovery lock is removed. + +. "${TEST_SCRIPTS_DIR}/integration.bash" + +set -e + +ctdb_test_skip_on_cluster + +ctdb_test_init -r 5 + +generation_has_changed () +{ + local node="$1" + local generation_init="$2" + + # Leak this so it can be printed by test + generation_new="" + + ctdb_onnode "$node" status + # shellcheck di
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9edf15afc21 ctdb-tests: Skip some tests that don't work with IPv6 via 693080abe4d ctdb-scripts: Strip square brackets when gathering connection info from df5040b1867 Happy New Year 2020! https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9edf15afc219a1a782ec1e4d29909361bbabc744 Author: Martin Schwenke Date: Thu Nov 28 14:00:58 2019 +1100 ctdb-tests: Skip some tests that don't work with IPv6 See the comments added to the tests. It may be possible to rewrite these so they do something sane for IPv6... some other time. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14227 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jan 3 00:00:55 UTC 2020 on sn-devel-184 commit 693080abe4d8bec96280af5a6aa668251a98ec5d Author: Martin Schwenke Date: Fri Dec 13 11:09:04 2019 +1100 ctdb-scripts: Strip square brackets when gathering connection info ss added square brackets around IPv6 addresses in versions > 4.12.0 via commit aba9c23a6e1cb134840c998df14888dca469a485. CentOS 7 added this feature somewhere mid-release. So, backward compatibility is obviously needed. As per the comment protocol/protocol_util.c should probably print and parse such square brackets. However, for backward compatibility the brackets would have to be stripped in both places in update_tickles()... or added to the ss output when missing. Best to leave this until we have a connection tracking daemon. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14227 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/config/functions | 6 ++ ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh | 7 +++ ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh| 11 +++ 3 files changed, 24 insertions(+) Changeset truncated at 500 lines: diff --git a/ctdb/config/functions b/ctdb/config/functions index 994a30162fe..2395d8d4dc8 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -975,10 +975,16 @@ update_tickles () _my_connections="${tickledir}/${_port}.connections.$$" # Parentheses are needed around the filters for precedence but # the parentheses can't be empty! + # + # Recent versions of ss print square brackets around IPv6 + # addresses. While it is desirable to update CTDB's address + # parsing and printing code, something needs to be done here + # for backward compatibility, so just delete the brackets. ss -tn state established \ "${_ip_filter:+( ${_ip_filter} )}" \ "${_port_filter:+( ${_port_filter} )}" | awk 'NR > 1 {print $4, $3}' | + tr -d '][' | sort >"$_my_connections" # Record our current tickles in a temporary file diff --git a/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh b/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh index d168cf22216..efa9ef2b6a1 100755 --- a/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh +++ b/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh @@ -14,6 +14,13 @@ select_test_node_and_ips echo "Using $test_ip, which is onnode $test_node" +# This test depends on being able to assign a duplicate address on a +# 2nd node. However, IPv6 guards against this and causes the test to +# fail. +case "$test_ip" in +*:*) ctdb_test_skip "This test is not supported for IPv6 addresses" ;; +esac + get_test_ip_mask_and_iface echo "Finding another node that knows about $test_ip" diff --git a/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh b/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh index d4fee69c96d..5ee4e544eeb 100755 --- a/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh +++ b/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh @@ -14,6 +14,17 @@ select_test_node_and_ips echo "Running test against node $test_node and IP $test_ip" +# This test puts an address on an interface and then needs to quickly +# configure that address and cause an IP takeover. However, an IPv6 +# address will be tentative for a while so "quickly" is not possible". +# When ctdb_control_takeover_ip() calls ctdb_sys_have_ip() it will +# decide that the address is not present. It then attempts a takeip, +# which can fail if the address is suddenly present because it is no +# longer tentative. +case "$test_ip" in +*:*) ctdb_test_skip "This test is not supported for IPv6 addresses" ;; +esac + get_test_ip_mask_and_iface echo "Deleting IP $test_ip from all nodes" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 93b9fc3da86 build: add missing crypt dependency for auth4_unix from d6fbfb276ce lib/fuzzing: Free memory after successful load in fuzz_tiniparser https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 93b9fc3da86a09be8244859ee62063b75e002b23 Author: Amitay Isaacs Date: Fri Nov 15 13:38:43 2019 +1100 build: add missing crypt dependency for auth4_unix Commit dc5788056bc removed crypt library from replace. This breaks the build on fedora 30 ppc64. [2439/3956] Linking bin/default/source4/auth/ntlm/libauth4-samba4.so /usr/bin/ld: source4/auth/ntlm/auth_unix.c.5.o: in function `password_check': auth_unix.c:(.text+0x7e0): undefined reference to `crypt' crypt library is required to build ntlm auth_unix.c. Signed-off-by: Amitay Isaacs Reviewed-by: Andrew Bartlett Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Nov 19 04:47:47 UTC 2019 on sn-devel-184 --- Summary of changes: source4/auth/ntlm/wscript_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build index 50d301deca4..04a760c3e49 100644 --- a/source4/auth/ntlm/wscript_build +++ b/source4/auth/ntlm/wscript_build @@ -36,7 +36,7 @@ bld.SAMBA_MODULE('auth4_unix', source='auth_unix.c', subsystem='auth4', init_function='auth4_unix_init', - deps='pam PAM_ERRORS LIBTSOCKET' + deps='pam PAM_ERRORS LIBTSOCKET crypt' ) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e45feaf28da ctdb-tcp: Simplify freeing of transport data on shutdown via 750f3938e4f ctdb-daemon: Rename ctdb_context private_data to transport_data via 53f8492caaf ctdb-daemon: Rename ctdb_node private_data to transport_data via a6d99d9e5c5 ctdb-tcp: Close inflight connecting TCP sockets after fork from 231397f45ee smbd: Make share_mode_do_locked() pass TDB_DATA instead of a record https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e45feaf28da27653e9df36c7c50cbd54a792a2aa Author: Martin Schwenke Date: Tue Nov 12 12:14:18 2019 +1100 ctdb-tcp: Simplify freeing of transport data on shutdown The type-checking is superfluous and gets in the way of readability. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Nov 14 03:45:44 UTC 2019 on sn-devel-184 commit 750f3938e4fcd6743954db6b1132751a90ee6107 Author: Martin Schwenke Date: Tue Nov 12 12:12:46 2019 +1100 ctdb-daemon: Rename ctdb_context private_data to transport_data This gives a casual reader a useful clue. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 53f8492caafa8556d0c2d3f272d08ce5ce098c25 Author: Martin Schwenke Date: Tue Nov 12 12:04:22 2019 +1100 ctdb-daemon: Rename ctdb_node private_data to transport_data This gives a casual reader a useful clue. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a6d99d9e5c5bc58e6d56be7a6c1dbc7c8d1a882f Author: Volker Lendecke Date: Thu Nov 7 15:26:01 2019 +0100 ctdb-tcp: Close inflight connecting TCP sockets after fork Commit c68b6f96f26 changed the talloc hierarchy such that outgoing TCP sockets while sitting in the async connect() syscall are not freed via ctdb_tcp_shutdown() anymore, they are hanging off a longer-running structure. Free this structure as well. If an outgoing TCP socket leaks into a long-running child process (possibly the recovery daemon), this connection will never be closed as seen by the destination node. Because with recent changes incoming connections will not be accepted as long as any incoming connection is alive, with that socket leak into the recovery daemon we will never again be able to successfully connect to the node that is affected by this leak. Further attempts to connect will be discarded by the destination as long as the recovery daemon keeps this socket alive. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14175 RN: Avoid communication breakdown on node reconnect Signed-off-by: Martin Schwenke Signed-off-by: Volker Lendecke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/ib/ibw_ctdb.c | 11 --- ctdb/ib/ibw_ctdb_init.c | 13 - ctdb/include/ctdb_private.h | 4 ++-- ctdb/tcp/tcp_connect.c | 17 + ctdb/tcp/tcp_init.c | 21 - ctdb/tcp/tcp_io.c | 4 ++-- 6 files changed, 41 insertions(+), 29 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/ib/ibw_ctdb.c b/ctdb/ib/ibw_ctdb.c index b5537c8a7e5..38314c32ebc 100644 --- a/ctdb/ib/ibw_ctdb.c +++ b/ctdb/ib/ibw_ctdb.c @@ -55,7 +55,8 @@ int ctdb_ibw_get_address(struct ctdb_context *ctdb, int ctdb_ibw_node_connect(struct ctdb_node *node) { - struct ctdb_ibw_node *cn = talloc_get_type(node->private_data, struct ctdb_ibw_node); + struct ctdb_ibw_node *cn = talloc_get_type(node->transport_data, + struct ctdb_ibw_node); int rc; assert(cn!=NULL); @@ -118,7 +119,9 @@ int ctdb_ibw_connstate_handler(struct ibw_ctx *ctx, struct ibw_conn *conn) case IBWC_CONNECTED: { /* after ibw_accept or ibw_connect */ struct ctdb_node *node = talloc_get_type(conn->conn_userdata, struct ctdb_node); if (node!=NULL) { /* after ibw_connect */ - struct ctdb_ibw_node *cn = talloc_get_type(node->private_data, struct ctdb_ibw_node); + struct ctdb_ibw_node *cn = talloc_get_type( + node->transport_data, + struct ctdb_ibw_node); node->ctdb->upcalls->node_connected(node); ctdb_flush_cn_queue(cn); @@ -136,7 +139,9 @@ int ctdb_ibw_connstate_handler(struct ibw_ctx *ctx, struct ibw_conn *conn) case IBWC_ERROR: { struct ctdb_node *node = talloc_get_type(conn->conn
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f5f89b1b990 ctdb: Use TALLOC_FREE() in a few places from 8846887a55b s3:printing: Fix %J substition https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f5f89b1b990a3de0e9366beef81cf1a2ce8374da Author: Volker Lendecke Date: Thu Nov 7 12:12:45 2019 +0100 ctdb: Use TALLOC_FREE() in a few places We have a macro for NULLing out the pointer Signed-off-by: Volker Lendecke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Nov 8 01:35:11 UTC 2019 on sn-devel-184 --- Summary of changes: ctdb/common/ctdb_io.c | 9 +++-- ctdb/tcp/tcp_connect.c | 6 ++ 2 files changed, 5 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c index 000f71e4c20..bf8bc73b77d 100644 --- a/ctdb/common/ctdb_io.c +++ b/ctdb/common/ctdb_io.c @@ -290,8 +290,7 @@ static void queue_io_write(struct ctdb_queue *queue) queue->out_queue_length--; talloc_free(pkt); } - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); queue->fd = -1; tevent_schedule_immediate(queue->im, queue->ctdb->ev, queue_dead, queue); @@ -363,8 +362,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length) !(queue->ctdb->flags & CTDB_FLAG_TORTURE)) { ssize_t n = write(queue->fd, data, length2); if (n == -1 && errno != EAGAIN && errno != EWOULDBLOCK) { - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); queue->fd = -1; tevent_schedule_immediate(queue->im, queue->ctdb->ev, queue_dead, queue); @@ -430,8 +428,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length) int ctdb_queue_set_fd(struct ctdb_queue *queue, int fd) { queue->fd = fd; - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); if (fd != -1) { queue->fde = tevent_add_fd(queue->ctdb->ev, queue, fd, diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index a75f35a809e..b0572881880 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -93,8 +93,7 @@ static void ctdb_node_connect_write(struct tevent_context *ev, int one = 1; int ret; - talloc_free(tnode->connect_te); - tnode->connect_te = NULL; + TALLOC_FREE(tnode->connect_te); ret = getsockopt(tnode->out_fd, SOL_SOCKET, SO_ERROR, , ); if (ret != 0 || error != 0) { @@ -105,8 +104,7 @@ static void ctdb_node_connect_write(struct tevent_context *ev, return; } - talloc_free(tnode->connect_fde); - tnode->connect_fde = NULL; + TALLOC_FREE(tnode->connect_fde); ret = setsockopt(tnode->out_fd, IPPROTO_TCP, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bf99f820778 ctdb-tests: Make process exists test more resilient via dd9d5ec5c8d ctdb-tests: Improve code quality in ctdb_init() via 3b5ed00054e ctdb-tests: No longer retry starting the cluster via bf47bc18bb8 ctdb-tcp: Drop tracking of file descriptor for incoming connections via d0baad257e5 ctdb-tcp: Avoid orphaning the TCP incoming queue via e62b3a05a87 ctdb-tcp: Check incoming queue to see if incoming connection is up from ff47cc661d4 s3: libsmb: Ensure return from net_share_enum_rpc() sets cli->raw_status on error. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bf99f82077876fc107adb1ed4f07dd7e1351fff9 Author: Martin Schwenke Date: Tue Nov 5 15:34:18 2019 +1100 ctdb-tests: Make process exists test more resilient This can fail as follows: --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- Running test ./tests/UNIT/tool/ctdb.process-exists.003.sh (02:26:30) --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- ctdb.process-exists.003 - ctdbd process with multiple connections on node 0 Setting up fake ctdbd <10||0| OK <10|PID 26107 exists |0| OK == Running "ctdb -d NOTICE process-exists 26107 0x1234567812345678" PASSED == Running "ctdb -d NOTICE process-exists 26107 0xaebbccdd12345678" Registered SRVID 0xaebbccdd12345678 -- Output (Exit status: 1): -- PID 26107 with SRVID 0xaebbccdd12345678 does not exist -- Required output (Exit status: 0): -- PID 26107 with SRVID 0xaebbccdd12345678 exists FAILED connection to daemon closed, exiting == TEST FAILED: ./tests/UNIT/tool/ctdb.process-exists.003.sh (status 1) (duration: 0s) == This happens when dummy_client has not registered the SRVID (for its 10th connection) before the 2nd simple_test. Change the initial wait to ensure that the SRVID is registered. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Nov 6 02:46:24 UTC 2019 on sn-devel-184 commit dd9d5ec5c8de82f343369ec4b26c0f24d465ce24 Author: Martin Schwenke Date: Tue Oct 29 15:22:38 2019 +1100 ctdb-tests: Improve code quality in ctdb_init() Improve quoting and indentation. Print a clear error if the cluster goes back into recovery and doesn't come back out. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3b5ed00054e7d1e34cf33706c670e17a188c67d1 Author: Martin Schwenke Date: Tue Oct 29 15:11:31 2019 +1100 ctdb-tests: No longer retry starting the cluster Retrying like this hides bugs. The cluster should come up first time, every time. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit bf47bc18bb8a94231870ef821c0352b7a15c2e28 Author: Martin Schwenke Date: Tue Oct 29 17:28:22 2019 +1100 ctdb-tcp: Drop tracking of file descriptor for incoming connections This file descriptor is owned by the incoming queue. It will be closed when the queue is torn down. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14175 RN: Avoid communication breakdown on node reconnect Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d0baad257e511280ff3e5c7372c38c43df841070 Author: Martin Schwenke Date: Tue Oct 29 15:29:11 2019 +1100 ctdb-tcp: Avoid orphaning the TCP incoming queue CTDB's incoming queue handling does not check whether an existing queue exists, so can overwrite the pointer to the queue. This used to be harmless until commit c68b6f96f26664459187ab2fbd56767fb31767e0 changed the read callback to use a parent structure as the callback data. Instead of cleaning up an orphaned queue on disconnect, as before, this will now free the new queue. At first glance it doesn't seem possible that 2 incoming connections from the same node could be processed before the intervening disconnect. However, the incoming connections and disconnect occur on different file descriptors. The queue can become orphaned on node A when the following sequence occurs: 1. Node A comes up 2. Node A accepts an incoming connection from node B 3. Node B proces
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6de5706b4db ctdb-tests: Add vacuuming tests via 49262a6bc4d ctdb-tests: Add handling of process clean-up on a cluster node via b9654085f5f ctdb-tests: Factor out function check_cattdb_num_records() via 5a6d319eea6 ctdb-tests: Add ctdb-db-test tool via 439ef65d290 ctdb-client: Factor out function client_db_tdb() via 41a41d5f3e2 ctdb-daemon: Implement DB_VACUUM control via d462d64cdf0 ctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled via 13cedaf0195 ctdb-daemon: Factor out code to create vacuuming child via 5539edfdbe6 ctdb-vacuum: Simplify recording of in-progress vacuuming child via 496204feb0e ctdb-protocol: Add marshalling for control DB_VACUUM via a896486b62b ctdb-protocol: Add marshalling for struct ctdb_db_vacuum via b314835341e ctdb-protocol: Add new control CTDB_CONTROL_DB_VACUUM via d0cc9edc05b ctdb-vacuum: Avoid processing any more packets via 680df07630a ctdb-daemon: Avoid memory leak when packet is deferred via c6427dddf54 ctdb-recoverd: No need for database detach handler via fc81729dd2d ctdb-recoverd: Drop VACUUM_FETCH message handling via 498932c0e8e ctdb-vacuum: Replace VACUUM_FETCH message with control via 86521837b68 ctdb-vacuum: Add processing of fetch queue via da617f90d90 ctdb-daemon: Add implementation of VACUUM_FETCH control via 36f9b4953a8 ctdb-tests: Add marshalling tests for new control via b71d8cd80f8 ctdb-protocol: Add marshalling for new control VACUUM_FETCH via 0872c52ef04 ctdb-protocol: Add new control VACUUM_FETCH via 913bd331f65 ctdb-tests: Drop code releated to obsolete controls via 688567f0801 ctdb-protocol: Drop code related to obsolete controls via 9f41a9fc1ee ctdb: Avoid malloc/memcpy/free in ctdb_ltdb_fetch() from 6e8c3ae6e9b samba-tool: py3 compatiblity in 'user syncpasswords --daemon' https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6de5706b4dbe70c66872abc80dd9301dccb2ee7c Author: Martin Schwenke Date: Wed Aug 14 15:26:25 2019 +1000 ctdb-tests: Add vacuuming tests Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Oct 24 05:28:21 UTC 2019 on sn-devel-184 commit 49262a6bc4d5f8b81aa341294bfe04a22a6b32b6 Author: Martin Schwenke Date: Sun Sep 29 08:27:33 2019 +1000 ctdb-tests: Add handling of process clean-up on a cluster node Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b9654085f5facfe8a3d64667d65793146563d7f5 Author: Martin Schwenke Date: Mon Aug 12 21:02:47 2019 +1000 ctdb-tests: Factor out function check_cattdb_num_records() This can be use in multiple vacuuming tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5a6d319eea6b281e9f4c35cf6c8889856234a9fd Author: Martin Schwenke Date: Thu Aug 1 15:33:52 2019 +1000 ctdb-tests: Add ctdb-db-test tool Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 439ef65d290357e513103530183091a9a6fed197 Author: Martin Schwenke Date: Fri Sep 27 16:49:01 2019 +1000 ctdb-client: Factor out function client_db_tdb() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 41a41d5f3e2b8e16e25221e14939dc5962997ac7 Author: Martin Schwenke Date: Tue Jul 30 14:17:11 2019 +1000 ctdb-daemon: Implement DB_VACUUM control Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d462d64cdf001fd5d1cbf2a109df62e087ad0c49 Author: Martin Schwenke Date: Tue Oct 15 16:36:44 2019 +1100 ctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled At the moment vacuuming is always scheduled. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 13cedaf0195c6bda3a3820aedb1ee65f36dfc23e Author: Martin Schwenke Date: Tue Jul 30 14:16:13 2019 +1000 ctdb-daemon: Factor out code to create vacuuming child This changes the behaviour for some failures from exiting to simply attempting to schedule the next run. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5539edfdbe69d1d5f084d06753cce8ed6e524999 Author: Martin Schwenke Date: Fri Oct 4 12:06:21 2019 +1000 ctdb-vacuum: Simplify recording of in-progress vacuuming child There can only be one, so simplify the logic. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 496204feb0e2b6eb2f3d9a74e45596a3e74ad9b1 Author: Martin Schwenke Date: Tue Jul 30 10:52:05 2019 +1000 ctdb-protocol: Add marshalling for control DB_VACUUM Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0bddee8dac0 ctdb-tests: Rename functions to test_header() and test_footer() via 435d903ad84 ctdb-tests: Move test duration calculation to ctdb_test_run() via 23982477f3d ctdb-tests: Add handling for skipped tests via 473a6fed11a ctdb-tests: Add a special failure code when a test error occurs via 55dd0f047f5 ctdb-tests: Move test status interpretation to ctdb_test_run() via 47c9b79262e ctdb-tests: Move use of show_progress() into ctdb_test_run() via e7e6f4067e4 ctdb-tests: Simplify ctdb_test_run() via dc8ddbb0843 ctdb-tests: Switch TEST_CLEANUP and TEST_TIMEOUT to script variables via 0ec83f32fad ctdb-tests: Add new test functions for running commands on nodes via 38b838b59cb ctdb-tests: try_command_on_node() should return status of command via e494eb3e8c0 ctdb-tests: Drop unused function ctdb_test_check_real_cluster() via 38138b42f7c ctdb-tests: Update preamble for CLUSTER tests via 653b35764a2 ctdb-tests: Add cluster.bash include file via 5ad356c2820 ctdb-tests: Add function ctdb_test_skip_on_cluster() via 59055f4da1a ctdb-tests: Add function ctdb_test_on_cluster() via 65ca431c95e ctdb-tests: Add functions for terminating tests on failure, skip, error from 2c54f6df716 ctdb-common: Mark VacuumLimit tunable as obsolete https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0bddee8dac095016e892731abe9e5a668c38375d Author: Martin Schwenke Date: Thu Oct 3 17:25:10 2019 +1000 ctdb-tests: Rename functions to test_header() and test_footer() That's all they do now. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Oct 4 10:58:10 UTC 2019 on sn-devel-184 commit 435d903ad84e72e8223ae53ca46bb47c1cfe1293 Author: Martin Schwenke Date: Tue Sep 10 10:51:31 2019 +1000 ctdb-tests: Move test duration calculation to ctdb_test_run() It makes sense to do this in one place in case other headers/footers are added. Reindent ctdb_test_begin() while touching this function. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 23982477f3d486815974edce08a247d7280c9578 Author: Martin Schwenke Date: Wed Sep 18 12:36:05 2019 +1000 ctdb-tests: Add handling for skipped tests Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 473a6fed11a2e63d9cd557f63fdb646bd040deda Author: Martin Schwenke Date: Wed Sep 18 12:31:10 2019 +1000 ctdb-tests: Add a special failure code when a test error occurs Use it when a test is not executable. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 55dd0f047f58f9be2d1a317dfcbebe18e22201a0 Author: Martin Schwenke Date: Mon Sep 9 20:57:42 2019 +1000 ctdb-tests: Move test status interpretation to ctdb_test_run() It makes sense to do this in one place in case other headers/footers are added. Simplify ctdb_test_end() accordingly, reindenting because nearly all lines are modified. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 47c9b79262ee4101d29c977d98933bfcf22f7426 Author: Martin Schwenke Date: Wed Sep 18 12:25:06 2019 +1000 ctdb-tests: Move use of show_progress() into ctdb_test_run() This allows more variables to be set in this function because they are no longer in a sub-shell. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e7e6f4067e4a0de1ccfc8650fb0e87b8b6e0d620 Author: Martin Schwenke Date: Mon Sep 9 20:51:51 2019 +1000 ctdb-tests: Simplify ctdb_test_run() Only the test file name is ever passed. Reindent while touching many existing lines. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit dc8ddbb0843abdc547055d57184e6cd1ba8e3147 Author: Martin Schwenke Date: Mon Sep 9 16:08:41 2019 +1000 ctdb-tests: Switch TEST_CLEANUP and TEST_TIMEOUT to script variables These are not used outside this script so they do not need to be environment variables. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0ec83f32faddf6ef9f5fdd11ecd6d651459dd650 Author: Martin Schwenke Date: Mon Aug 12 21:01:20 2019 +1000 ctdb-tests: Add new test functions for running commands on nodes * ctdb_onnode() * testprog_onnode() * function_onnode() These encapsulate familiar patterns found when running try_command_on_node(). The new function names are more concise and encourage more readable tests. Test writers can do less thinking about the subtleties of running different types of commands on nodes. For example, these functions ensure that $CTDB
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2c54f6df716 ctdb-common: Mark VacuumLimit tunable as obsolete via 815ae644006 ctdb-vacuum: Drop debug level of repacking message to NOTICE via a8c4e7d1f6b ctdb-protocol: Initialise request->rdata.opcode where missing via 33f1c9d9654 ctdb-vacuum: Process all records not deleted on a remote node from fe41238097f rpcclient: Remove unused global domain sid https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2c54f6df7164d6263624a1ed72485bf4e6690bb6 Author: Martin Schwenke Date: Wed Oct 2 17:52:31 2019 +1000 ctdb-common: Mark VacuumLimit tunable as obsolete Use of this tunable was dropped over 5 years ago in commit 16837bc309aa9a86fc21d7f59a8fce0b947428a3. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Oct 4 07:07:21 UTC 2019 on sn-devel-184 commit 815ae644006a11301c1ee81fdd4dcbf13de38141 Author: Martin Schwenke Date: Wed Oct 2 17:51:12 2019 +1000 ctdb-vacuum: Drop debug level of repacking message to NOTICE This occurs rarely but can adversely impact performance, so it is worth logging it more frequently. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a8c4e7d1f6b3375e2cdac962133919cce91f7c1d Author: Martin Schwenke Date: Mon Sep 23 16:11:00 2019 +1000 ctdb-protocol: Initialise request->rdata.opcode where missing Otherwise it is uninitialised, so... ==22889== Conditional jump or move depends on uninitialised value(s) ==22889==at 0x12257B: ctdb_req_control_data_len (protocol_control.c:39) ==22889==by 0x1228E9: ctdb_req_control_len (protocol_control.c:1786) ==22889==by 0x12A51C: ctdb_client_control_send (client_control.c:101) ==22889==by 0x138BE1: ctdb_tunnel_setup_send (client_tunnel.c:100) ==22889==by 0x10EE4F: tunnel_test_send (tunnel_test.c:135) ==22889==by 0x10EE4F: main (tunnel_test.c:463) and similar. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 33f1c9d9654fbdcb99c23f9d23c4bbe2cc596b98 Author: Amitay Isaacs Date: Mon Sep 30 16:34:35 2019 +1000 ctdb-vacuum: Process all records not deleted on a remote node This currently skips the last record. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14147 RN: Avoid potential data loss during recovery after vacuuming error Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- Summary of changes: ctdb/common/tunable.c | 2 +- ctdb/doc/ctdb-tunables.7.xml | 18 -- ctdb/doc/ctdb.1.xml | 1 - ctdb/doc/examples/config_migrate.sh | 2 +- ctdb/protocol/protocol_client.c | 4 ctdb/server/ctdb_vacuum.c | 7 --- ctdb/tests/UNIT/tool/ctdb.listvars.001.sh | 1 - 7 files changed, 10 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/tunable.c b/ctdb/common/tunable.c index 8d475858c5f..70412b7f979 100644 --- a/ctdb/common/tunable.c +++ b/ctdb/common/tunable.c @@ -105,7 +105,7 @@ static struct { offsetof(struct ctdb_tunable_list, vacuum_max_run_time) }, { "RepackLimit", 10*1000, false, offsetof(struct ctdb_tunable_list, repack_limit) }, - { "VacuumLimit", 5*1000, false, + { "VacuumLimit", 5*1000, true, offsetof(struct ctdb_tunable_list, vacuum_limit) }, { "VacuumFastPathCount", 60, false, offsetof(struct ctdb_tunable_list, vacuum_fast_path_count) }, diff --git a/ctdb/doc/ctdb-tunables.7.xml b/ctdb/doc/ctdb-tunables.7.xml index 191bcaffe46..289b1d7324b 100644 --- a/ctdb/doc/ctdb-tunables.7.xml +++ b/ctdb/doc/ctdb-tunables.7.xml @@ -574,10 +574,6 @@ MonitorInterval=20 RepackLimit, then the database is repacked to get rid of the freelist records to avoid fragmentation. - -Databases are repacked only if both RepackLimit -and VacuumLimit are exceeded. - @@ -683,20 +679,6 @@ MonitorInterval=20 - - VacuumLimit - Default: 5000 - -During vacuuming, if the number of deleted records are more than -VacuumLimit, then databases are repacked to -avoid fragmentation. - - -Databases are repacked only if both RepackLimit -and VacuumLimit are exceeded. - - - VacuumMaxRunTime Default: 120 diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index 157dfad9dc1..e355752d1db 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 24f04c1cc56 ctdb-tests: Update README via 8a5c4a60e15 ctdb-tests: Move simple tests to INTEGRATION/ subdirectory via 658068184ff ctdb-tests: Move complex tests to CLUSTER/ subdirectory via df6800e330d ctdb-tests: Convert local daemons include file into top-level include via 384381fbff5 ctdb-tests: Drop use of array in run_tests() via c438e0db45d ctdb-tests: Drop custom handling for unit tests via 4046baad5c3 ctdb-tests: Skip README files in test directories/collections via 75393cab0f8 ctdb-tests: Recurse into directories instead of explicitly looping via 4947fa5ffa8 ctdb-tests: Fold find_and_run_one_test() in to run_tests() via 1061bdf29dc ctdb-tests: Move tool tests to UNIT/ subdirectory via 9585ece00c8 ctdb-tests: Move takeover_helper tests to UNIT/ subdirectory via cf0b87f9b78 ctdb-tests: Move takeover tests to UNIT/ subdirectory via 010c1a85fa9 ctdb-tests: Move shellcheck tests to UNIT/ subdirectory via a3cbb7eb21b ctdb-tests: Move onnode tests to UNIT/ subdirectory via 8ed075d396b ctdb-tests: Move eventscript tests to UNIT/ subdirectory via 330a106aaa0 ctdb-tests: Move eventd tests to UNIT/ subdirectory via 43ed3a6eb3d ctdb-tests: Move cunit tests to UNIT/ subdirectory from ab232ca77f8 waf: Use waf function to add for -Wl,--as-needed https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 24f04c1cc561d9f4b7fada1ca87f52bed2167f8d Author: Martin Schwenke Date: Wed Sep 18 16:32:40 2019 +1000 ctdb-tests: Update README Bring this up to date. Drop descriptions of command-line options because these tend to bit-rot - refer to "run_tests.sh -h" instead. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 26 06:01:33 UTC 2019 on sn-devel-184 commit 8a5c4a60e156170f8aaa738672ed6dc50712a929 Author: Martin Schwenke Date: Mon Sep 9 16:00:52 2019 +1000 ctdb-tests: Move simple tests to INTEGRATION/ subdirectory Split some tests out into database/ and failover/ subdirectories. Rename the remaining tests in simple/. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 658068184ff9437c11e5260e24a632439adb3d27 Author: Martin Schwenke Date: Mon Sep 9 15:59:31 2019 +1000 ctdb-tests: Move complex tests to CLUSTER/ subdirectory Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit df6800e330d1c1fd47ce3d2f7a5814597ed46229 Author: Martin Schwenke Date: Thu Sep 5 14:01:20 2019 +1000 ctdb-tests: Convert local daemons include file into top-level include Do the same with the alternative code for real clusters. Both of these can now be used by other test suites. Fix some basic shellcheck warnings (e.g. avoid word-splitting by quoting) while moving code and add the new files to the shellcheck test. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 384381fbff5ca900af031fb0606a270f572f5b9e Author: Martin Schwenke Date: Mon Sep 9 15:01:49 2019 +1000 ctdb-tests: Drop use of array in run_tests() This doesn't accomplish anything. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c438e0db45dd803523802055cb988c10ff277063 Author: Martin Schwenke Date: Mon Sep 9 14:59:38 2019 +1000 ctdb-tests: Drop custom handling for unit tests Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4046baad5c3a5155c18566f853a9a08eb7fa431a Author: Martin Schwenke Date: Wed Sep 25 16:37:46 2019 +1000 ctdb-tests: Skip README files in test directories/collections Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 75393cab0f87635e829b45b200cc771a0463b6f4 Author: Martin Schwenke Date: Mon Sep 9 14:47:26 2019 +1000 ctdb-tests: Recurse into directories instead of explicitly looping run_tests() already has a loop, so use it. This means collections of test suites can be handled - but explicitly check valid collection names to avoid running junk. Add special cases for simple and complex. These will be removed when those test suites are moved to collections. This seems to be the smallest amount of churn to support bisection. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4947fa5ffa8784c93f3c570e246b106b35f96a80 Author: Martin Schwenke Date: Mon Sep 9 11:40:21 2019 +1000 ctdb-tests: Fold find_and_run_one_test() in to run_tests() The additional function makes the logic harder to understand. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 1061bdf29dce60251a53dcc0623efb
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b8f4f141a2d ctdb-tests: Switch TEST_VAR_DIR to a local script variable via e78c1a0ca22 ctdb-tests: Use CTDB_TEST_TMP_DIR in integration.bash via 263890b36db ctdb-tests: Switch simple tests to use CTDB_TEST_TMP_DIR via def929954aa ctdb-tests: Switch takeover helper unit tests to use CTDB_TEST_TMP_DIR via 1934f673dc7 ctdb-tests: Switch tool unit tests to use CTDB_TEST_TMP_DIR via 18ecdbfb02e ctdb-tests: Switch onnode unit tests to use CTDB_TEST_TMP_DIR via 3b16aa2016e ctdb-tests: Switch eventscript unit tests to use CTDB_TEST_TMP_DIR via 96aa807f79d ctdb-tests: Switch eventd unit tests to use CTDB_TEST_TMP_DIR via cbd27c0a142 ctdb-tests: Switch cunit unit tests to use CTDB_TEST_TMP_DIR via cec8f3907ef ctdb-tests: Add new variable CTDB_TEST_TMP_DIR via e9ce035c2d2 ctdb-tests: Move setting of CTDB_TEST_SUITE_DIR to run_tests.sh via 02edfb0f199 ctdb-tests: Rename variable TEST_SUBDIR -> CTDB_TEST_SUITE_DIR via f331f3f723a ctdb-tests: Use local_daemons.sh onnode for local daemons tests via ae1e8002b09 ctdb-tests: Use local $ctdb_base instead of $CTDB_BASE via 08fea1ced39 ctdb-tests: Generalise pattern for matching valgrind memcheck executable from c7e6db97de9 smbd: Add an error return END_PROFILE call https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b8f4f141a2d7aed9a8af572b27e2afcc1365bf3b Author: Martin Schwenke Date: Mon Sep 9 17:59:15 2019 +1000 ctdb-tests: Switch TEST_VAR_DIR to a local script variable This is now local to run_tests.sh. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Sep 24 03:46:59 UTC 2019 on sn-devel-184 commit e78c1a0ca2254b533ffa1ab27184e73e79819962 Author: Martin Schwenke Date: Mon Sep 9 16:13:45 2019 +1000 ctdb-tests: Use CTDB_TEST_TMP_DIR in integration.bash Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 263890b36dbe23460a3d38050250d6d792907426 Author: Martin Schwenke Date: Thu Sep 5 13:57:35 2019 +1000 ctdb-tests: Switch simple tests to use CTDB_TEST_TMP_DIR CTDB_TEST_TMP_DIR repaces SIMPLE_TESTS_VAR_DIR. local.bash no longer needs to ensure that TEST_VAR_DIR is set, since it longer uses this variable. Drop the comment because state has not been maintained between tests for some time. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit def929954aa26116fc5356203b313b50fcb6d7a8 Author: Martin Schwenke Date: Fri Sep 6 21:35:39 2019 +1000 ctdb-tests: Switch takeover helper unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 1934f673dc7aadf8eb288d4ac1b46876d442e039 Author: Martin Schwenke Date: Fri Sep 6 21:35:16 2019 +1000 ctdb-tests: Switch tool unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 18ecdbfb02e64ae7942378efb69df7541b5859f0 Author: Martin Schwenke Date: Fri Sep 6 19:58:46 2019 +1000 ctdb-tests: Switch onnode unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3b16aa2016e499af96c4cbb3de4cb38515e86284 Author: Martin Schwenke Date: Fri Sep 6 20:13:19 2019 +1000 ctdb-tests: Switch eventscript unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 96aa807f79df99c0fd64ea66d7f83527d5a490c2 Author: Martin Schwenke Date: Fri Sep 6 21:35:54 2019 +1000 ctdb-tests: Switch eventd unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cbd27c0a14247477acdf158cc40864afe91e5900 Author: Martin Schwenke Date: Fri Sep 6 21:47:52 2019 +1000 ctdb-tests: Switch cunit unit tests to use CTDB_TEST_TMP_DIR Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cec8f3907ef7b324035b59f9a965c198b5d03de6 Author: Martin Schwenke Date: Thu Sep 5 13:42:26 2019 +1000 ctdb-tests: Add new variable CTDB_TEST_TMP_DIR This is a subdirectory of TEST_VAR_DIR that is unique to the current test suite. It is recreated for each individual test. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e9ce035c2d2ef6fd177a3bb10031162586b696bd Author: Martin Schwenke Date: Mon Sep 9 16:19:52 2019 +1000 ctdb-tests: Move setting of CTDB_TEST_SUITE_DIR to run_tests.sh Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 02edfb0f199fb7206df1f725aee56826d65716c1 Author: Martin Schwenke Date: Fri Sep 6 20:54:37 2019 +1000 ctdb-tests: Rename variable TEST_SUB
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 84f544b55f2 ctdb-client: Fix some typos in debug messages via fc7f3b99aca ctdb-scripts: Drop bit-rotted shellcheck directive via 80cbebce712 ctdb-scripts: Silence shellcheck warning SC2166 via 597039daeb8 ctdb-utils: CID 1273087 - Resource leak via 32b5ceb3193 ctdb-tools: Stop deleted nodes from influencing ctdb nodestatus exit code via 2b37d99a5fb ctdb-tests: Put the summary file inside $TEST_VAR_DIR via 7a5a4a4494d ctdb-tests: Drop run_tests -d option via 2730e483607 ctdb-tests: Simplify setup_ctdb() via 8443798846d ctdb-tests: Invert some logic so it makes sense via 8038f4f64f4 ctdb-tests: Avoid shellcheck warnings via 497ae563a0b ctdb-tests: Fix zero event scripts test so it tests something via 429502186a7 ctdb-tests: Drop unused code from onnode unit test ctdb stub via bb040f27985 ctdb-tests: Only set TEST_SUBDIR when needed via 284bbca7c73 ctdb-tests: Move NFS test functions to complex local script via 2c6b098c722 ctdb-tests: Don't run setup_ctdb_base() for real cluster via 8aed06ce8c8 ctdb-tests: Use db_ctdb_cattdb_count_records() via 68684377c69 ctdb-tests: Use ctdb_get_all_pnns() via 522a8480fa5 ctdb-tests: Drop reference to unused ctdb_eventd test directory from d51bb3137fa whitespace: Conform to coding convention https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 84f544b55f235e2f08596bf4b7854460af008f88 Author: Martin Schwenke Date: Wed Sep 4 14:14:22 2019 +1000 ctdb-client: Fix some typos in debug messages tdb_sore -> tdb_store SCHDULE_FOR_DELETION -> SCHEDULE_FOR_DELETION Switch to modern debug macros while touching the lines. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Sep 17 05:52:15 UTC 2019 on sn-devel-184 commit fc7f3b99acad0a1c5ebeb2bc3c0753ec7b31bb49 Author: Martin Schwenke Date: Tue Sep 3 15:24:52 2019 +1000 ctdb-scripts: Drop bit-rotted shellcheck directive The code has changed so this is no longer needed. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 80cbebce7123f934562d74e5e29dae3719e9cc37 Author: Martin Schwenke Date: Mon Sep 2 14:58:22 2019 +1000 ctdb-scripts: Silence shellcheck warning SC2166 This covers the following: SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. POSIX agrees that -a and -o should not be used: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html Fixing these doesn't cause much churn. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 597039daeb88f6d97f71ecaaa55efd7e091638ea Author: Martin Schwenke Date: Wed Jul 3 20:40:44 2019 +1000 ctdb-utils: CID 1273087 - Resource leak Ensure that p is not leaked. This is a test program and the program exits anyway. No need to backport. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 32b5ceb31936ec5447362236c1809db003561d29 Author: Martin Schwenke Date: Tue Aug 13 21:42:15 2019 +1000 ctdb-tools: Stop deleted nodes from influencing ctdb nodestatus exit code Deleted nodes should simply be ignored. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14129 RN: Stop deleted nodes from influencing ctdb nodestatus exit code Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2b37d99a5fbb08954dc4c0ff20867e9fd9dd5712 Author: Martin Schwenke Date: Wed Sep 4 15:04:05 2019 +1000 ctdb-tests: Put the summary file inside $TEST_VAR_DIR This means less random files dropped in /tmp or similar. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7a5a4a4494d5fd2514651e06c2206007b8422449 Author: Martin Schwenke Date: Wed Sep 4 14:59:22 2019 +1000 ctdb-tests: Drop run_tests -d option The usage message says it is dodgy and some test suites may not support it. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2730e48360750d4fbfd66ea76a2b0f002acfcab9 Author: Martin Schwenke Date: Tue Sep 3 19:12:45 2019 +1000 ctdb-tests: Simplify setup_ctdb() There is no point inventing a whole new set of options here. Continue to locally implement the --no-event-scripts option. This must be first, though in practice only one option is ever passed to setup_ctdb() from ctdb_test_init(). Simply pass all other options through to "local_daemons.sh setup". This has the side effect of causing failure when an invalid option is
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8190993d992 ctdb-recoverd: Fix typo in previous fix from b406b928242 WHATSNEW: Document new GnuTLS 3.4.7 requirement https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8190993d99284162bd8699780248bb2edfec2673 Author: Martin Schwenke Date: Tue Aug 27 12:13:51 2019 +1000 ctdb-recoverd: Fix typo in previous fix BUG: https://bugzilla.samba.org/show_bug.cgi?id=14085 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 27 15:29:11 UTC 2019 on sn-devel-184 --- Summary of changes: ctdb/server/ctdb_recoverd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index c1c2a88b12c..5f7fd71ae41 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -2998,7 +2998,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, continue; } if (! ctdb_node_has_capabilities(rec->caps, -ctdb->nodes[j]->pnn, +nodemap->nodes[j].pnn, CTDB_CAP_LMASTER)) { continue; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e9f2e205ee8 ctdb-daemon: Make node inactive in the NODE_STOP control via 91ac4c13d84 ctdb-daemon: Drop unused function ctdb_local_node_got_banned() via 0f5f7b7cf4e ctdb-daemon: Switch banning code to use ctdb_node_become_inactive() via a42bcaabb63 ctdb-daemon: Factor out new function ctdb_node_become_inactive() from f8e79be2c15 build: fix mandatory typo in zlib configure check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e9f2e205ee89f4f3d6302cc11b4d0eb2efaf0f53 Author: Martin Schwenke Date: Mon Aug 19 21:48:04 2019 +1000 ctdb-daemon: Make node inactive in the NODE_STOP control Currently some of this is supported by a periodic check in the recovery daemon's main_loop(), which notices the flag change, sets recovery mode active and freezes databases. If STOP_NODE returns immediately then the associated recovery can complete and the node can be continued before databases are actually frozen. Instead, immediately do all of the things that make a node inactive. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 RN: Stop "ctdb stop" from completing before freezing databases Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 20 08:32:27 UTC 2019 on sn-devel-184 commit 91ac4c13d8472955d1f04bd775ec4b3ff8bf1b61 Author: Martin Schwenke Date: Tue Aug 20 11:29:42 2019 +1000 ctdb-daemon: Drop unused function ctdb_local_node_got_banned() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0f5f7b7cf4e970f3f36c5e0b3d09e710fe90801a Author: Martin Schwenke Date: Mon Aug 19 21:52:57 2019 +1000 ctdb-daemon: Switch banning code to use ctdb_node_become_inactive() There's no reason to avoid immediately setting recovery mode to active and initiating freeze of databases. This effectively reverts the following commits: d8f3b490bbb691c9916eed0df5b980c1aef23c85 b4357a79d916b1f8ade8fa78563fbef0ce670aa9 The latter is now implemented using a control, resulting in looser coupling. See also the following commit: f8141e91a693912ea1107a49320e83702a80757a BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a42bcaabb63722411bee52b80cbfc795593defbc Author: Martin Schwenke Date: Mon Aug 19 21:47:03 2019 +1000 ctdb-daemon: Factor out new function ctdb_node_become_inactive() This is a superset of ctdb_local_node_got_banned() so will replace that function, and will also be used in the NODE_STOP control. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/include/ctdb_private.h | 3 ++- ctdb/server/ctdb_banning.c | 26 +- ctdb/server/ctdb_recover.c | 45 + 3 files changed, 48 insertions(+), 26 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 1e9619faddf..1f168dae2b8 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -481,7 +481,6 @@ int ctdb_ibw_init(struct ctdb_context *ctdb); /* from ctdb_banning.c */ -void ctdb_local_node_got_banned(struct ctdb_context *ctdb); int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata); int32_t ctdb_control_get_ban_state(struct ctdb_context *ctdb, TDB_DATA *outdata); void ctdb_ban_self(struct ctdb_context *ctdb); @@ -819,6 +818,8 @@ int32_t ctdb_control_recd_ping(struct ctdb_context *ctdb); int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata); +void ctdb_node_become_inactive(struct ctdb_context *ctdb); + int32_t ctdb_control_stop_node(struct ctdb_context *ctdb); int32_t ctdb_control_continue_node(struct ctdb_context *ctdb); diff --git a/ctdb/server/ctdb_banning.c b/ctdb/server/ctdb_banning.c index 9cd163645a1..3c711575e8c 100644 --- a/ctdb/server/ctdb_banning.c +++ b/ctdb/server/ctdb_banning.c @@ -57,30 +57,6 @@ static void ctdb_ban_node_event(struct tevent_context *ev, } } -void ctdb_local_node_got_banned(struct ctdb_context *ctdb) -{ - struct ctdb_db_context *ctdb_db; - - DEBUG(DEBUG_NOTICE, ("This node has been banned - releasing all public " -"IPs and setting the generation to INVALID.\n")); - - /* Reset the generation id to 1 to make us i
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6c9d1f855ea ctdb-daemon: Avoid signed/unsigned comparison by casting via 4bdfbbd8d4f ctdb-daemon: Avoid signed/unsigned comparison by declaring as unsigned via 5a3d99dc7ad ctdb-common: Return value of ctdb_queue_length() should be unsigned via f7f9f57d2e1 ctdb-tests: Use select_test_node() in ctdb setdebug simple test via 3ea95ab4cb7 ctdb-tests: Add function select_test_node() via a074dbf6454 ctdb-tools: Fix usage for "ctdb cattdb" via 695b3a965b8 ctdb-tests: Don't print summary on failure if -e option is specified via 7c01bf3d37b ctdb-tests: Drop mention of non-existent -s option via b3b44ae532a ctdb-tests: Add -I option for iterating tests via 91e6fc209be ctdb-tests: Factor out main test loop into run_tests() via da33fb27ab4 ctdb-tests: Add shellcheck test for some test scripts and includes via 027b7ca0036 ctdb-tests: New variable CTDB_SCRIPTS_TESTS_BIN_DIR via ba55306fce0 ctdb-tests: Rename CTDB_SCRIPTS_TESTS_BINDIR to CTDB_SCRIPTS_TESTS_LIBEXEC_DIR via 061656d3837 ctdb-tests: Simplify test_wrap script via b1d36e94d2e ctdb-tests: Avoid shellcheck warning SC2045 via 7d95cb22a4e ctdb-tests: Avoid shellcheck warning SC2034 via b198de03dce ctdb-tests: Avoid shellcheck warning SC2230 via 93b3b010327 ctdb-tests: Avoid shellcheck warning SC2188 via 45c9fe3abbf ctdb-tests: Avoid shellcheck warning SC2155 via 664968e523c ctdb-tests: Avoid shellcheck warning SC2004 via 034f4cfab8b ctdb-tests: Avoid shellcheck warning SC2164 via 83f73b5abce ctdb-tests: Avoid shellcheck warning SC2086 via 758962a0d43 ctdb-tools: Drop 'o' option from getopts command from dee721af72e torture: Fix CID 1452288 Null pointer dereferences (NULL_RETURNS) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6c9d1f855ea3fe3d12f712678b7b4347f8982977 Author: Martin Schwenke Date: Thu Aug 1 10:58:42 2019 +1000 ctdb-daemon: Avoid signed/unsigned comparison by casting Compiling with -Wsign-compare complains: 1047 | && (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) { | ^~ struct ctdb_call is a protocol element, so we can't simply change it. Found by csbuild. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Aug 14 10:29:59 UTC 2019 on sn-devel-184 commit 4bdfbbd8d4fb681d509d702a8a357b11c8dddcac Author: Martin Schwenke Date: Thu Aug 1 10:55:39 2019 +1000 ctdb-daemon: Avoid signed/unsigned comparison by declaring as unsigned Compiling with -Wsign-compare complains: ctdb/server/ctdb_call.c:831:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 831 | if (count <= ctdb_db->statistics.hot_keys[0].count) { |^~ and ctdb/server/ctdb_call.c:844:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 844 | if (count <= ctdb_db->statistics.hot_keys[i].count) { | ^~ Found by cs-build. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5a3d99dc7ad49717252d8c9625e0f8d064cffcd8 Author: Martin Schwenke Date: Thu Aug 1 10:46:36 2019 +1000 ctdb-common: Return value of ctdb_queue_length() should be unsigned Compiling with -Wsign-compare complains: ctdb/server/ctdb_daemon.c: scope_hint: In function ‘daemon_queue_send’ ctdb/server/ctdb_daemon.c:259:40: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] ... The struct ctdb_queue member out_queue_length is actually uint32_t, so just return that type. Found by csbuild. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f7f9f57d2e13e7ced1f2237273965af8dfc29335 Author: Martin Schwenke Date: Fri Jul 26 11:15:50 2019 +1000 ctdb-tests: Use select_test_node() in ctdb setdebug simple test There is no requirement for IP addresses here. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3ea95ab4cb70224b96a3f40fed9bb6dcc2abedf7 Author: Martin Schwenke Date: Fri Jul 26 11:15:05 2019 +1000 ctdb-tests: Add function select_test_node() Should be used when public IP addresses are not assigned. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a074dbf6454cc37ec9cda92dd897316cc27cd630 Author: Martin Schwenke Date: Thu Aug 1 16:16:31 2019 +1000 ctdb-
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f258cfaa1d0 vfs:glusterfs_fuse: build only if we have setmntent() from 464fef34d1d tests/ldap: Use TLDAP to check the extended DN return https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f258cfaa1d07af6ac6e996006f6e59955cfe34ce Author: Michael Adam Date: Thu Aug 1 00:47:29 2019 +0200 vfs:glusterfs_fuse: build only if we have setmntent() FreeBSD and other platforms that don't have setmntent() and friends can not compile this module. This patch lets changes the build to only compile this module if the setmntent() function is found. This is the a follow-up fix to the actual fix for bug #13972. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13972 Signed-off-by: Michael Adam Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Aug 1 09:49:04 UTC 2019 on sn-devel-184 --- Summary of changes: source3/wscript | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/wscript b/source3/wscript index ff72a173a4b..4a3e75605e7 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1713,7 +1713,6 @@ main() { vfs_media_harmony vfs_unityed_media vfs_fruit vfs_shell_snap vfs_commit vfs_worm vfs_crossrename vfs_linux_xfs_sgid vfs_time_audit vfs_offline vfs_virusfilter - vfs_glusterfs_fuse ''')) default_shared_modules.extend(TO_LIST('auth_script idmap_tdb2 idmap_script')) # these have broken dependencies @@ -1775,6 +1774,9 @@ main() { if conf.CONFIG_SET('HAVE_GLUSTERFS'): default_shared_modules.extend(TO_LIST('vfs_glusterfs')) +if conf.CONFIG_SET('HAVE_SETMNTENT'): +default_shared_modules.extend(TO_LIST('vfs_glusterfs_fuse')) + if conf.CONFIG_SET('HAVE_VXFS'): default_shared_modules.extend(TO_LIST('vfs_vxfs')) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cd0df26bdc7 WHATSNEW: Add CTDB updates for 4.11 via 753874b38fd ctdb-tools: CID 1449530 - Negative loop bound via c5803507df7 ctdb-config: depend on /etc/ctdb/nodes file from a0561c7ed44 ctdb-tests: Rename local-daemon.sh dump-logs to print-log https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cd0df26bdc71175b69e11acd5750721ba6cf67e8 Author: Martin Schwenke Date: Thu Jun 27 20:41:57 2019 +1000 WHATSNEW: Add CTDB updates for 4.11 Signed-off-by: Martin Schwenke Reviewed-by: Andrew Bartlett Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 5 08:05:00 UTC 2019 on sn-devel-184 commit 753874b38fddc05357635e13c8ce26d319b0d77f Author: Martin Schwenke Date: Wed Jul 3 20:58:54 2019 +1000 ctdb-tools: CID 1449530 - Negative loop bound Regression introduced by commit 2558f96da1f9be8034f26736c8050bb38a1f82a8. count should be signed because list_of_connected_nodes() returns -1 on failure. Variable i is used in both signed and unsigned contexts, so add new signed variable j for use in signed context. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c5803507df7def388edcd5b6cbfee30cd217b536 Author: Rafael David Tinoco Date: Thu Jun 27 20:12:25 2019 + ctdb-config: depend on /etc/ctdb/nodes file BUG: https://bugzilla.samba.org/show_bug.cgi?id=14017 CTDB should start as a disabled unit (systemd) in most of the distributions and, when trying to enable it for the first time, user should get an unconfigured, or similar, error. Depending on /etc/ctdb/nodes file will give a clear direction to final user on what is needed in order to get cluster up and running. It should work like previous ENABLED=NO variables in SySV like initialization scripts. Signed-off-by: Rafael David Tinoco Reviewed-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: WHATSNEW.txt | 24 ctdb/config/ctdb.service | 1 + ctdb/tools/ctdb.c| 10 ++ 3 files changed, 31 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 286798cc289..360fe5614ca 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -198,6 +198,30 @@ Improvements have been made to Samba's handling of subtree renames, for example of containers and organisational units, however large renames are still not recommended. +CTDB changes + + +* nfs-linux-kernel-callout now defaults to using systemd service names + + The Red Hat service names continue to be the default. + + Other distributions should patch this file when packaging it. + +* The onnode -o option has been removed + +* ctdbd logs when it is using more than 90% of a CPU thread + + ctdbd is single threaded, so can become saturated if it uses the + full capacity of a CPU thread. To help detect this situation, ctdbd + now logs messages when CPU utilisation exceeds 90%. Each change in + CPU utilisation over 90% is logged. A message is also logged when + CPU utilisation drops below the 90% threshold. + +* Script configuration variable CTDB_MONITOR_SWAP_USAGE has been removed + + 05.system.script now monitors total memory (i.e. physical memory + + swap) utilisation using the existing CTDB_MONITOR_MEMORY_USAGE + script configuration variable. REMOVED FEATURES diff --git a/ctdb/config/ctdb.service b/ctdb/config/ctdb.service index 675b3147417..fd81c38e26d 100644 --- a/ctdb/config/ctdb.service +++ b/ctdb/config/ctdb.service @@ -2,6 +2,7 @@ Description=CTDB Documentation=man:ctdbd(1) man:ctdb(7) After=network-online.target time-sync.target +ConditionFileNotEmpty=/etc/ctdb/nodes [Service] Type=forking diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 9d46c981a0f..2cc72eedc76 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -3657,7 +3657,8 @@ static int control_reloadnodes(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, struct ctdb_req_control request; struct ctdb_reply_control **reply; bool reload; - unsigned int i, count; + unsigned int i; + int count; int ret; uint32_t *pnn_list; @@ -3726,13 +3727,14 @@ static int control_reloadnodes(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, , NULL, ); if (ret != 0) { bool failed = false; + int j; - for (i=0; i
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a0561c7ed44 ctdb-tests: Rename local-daemon.sh dump-logs to print-log via e0b33c5549f ctdb-build: Tweak hacking of rpcgen output via 755a9e654fe ctdb-daemon: Don't check if lock_ctx->ctdb_db is NULL via e5a946cba5c ctdb-common: Mark ctdb_fatal() and ctdb_die() as _NORETURN_ via ba95cb2ae15 ctdb-event: Fix signed/unsigned comparisons by casting via 5527f3922fd ctdb-database: Fix signed/unsigned comparison by casting via e7b586f711f ctdb-event: Assign missing return value via d424d2197f1 ctdb-common: Fix signed/unsigned comparisons by declaring as unsigned via 271d96e4fca ctdb-common: Fix error handling via 0ab5d5cece2 ctdb-common: Fix signed/unsigned comparisons by casting via 79a7cc3fb97 ctdb-daemon: Drop unused function ctdb_vfork_with_logging() via 2a933859979 ctdb-protocol: Avoid signed/unsigned comparison by casting via 3f388076203 ctdb-protocol: Variable for return value of strlcpy() should be size_t via 248d585ab42 ctdb-protocol: Fix signed/unsigned comparison by declaring as unsigned via 4f84aafa61c ctdb-protocol: Do not ignore return value of ctdb_g_lock_pull() via 75a808fd86a ctdb-daemon: Don't index by PNN when initialising node flags via 010c1d77cd7 ctdb-daemon: Replace function ctdb_ip_to_nodeid() with ctdb_ip_to_pnn() via 888ecc74ed1 ctdb-tcp: Fix signed/unsigned comparisons by declaring as unsigned via 75747c6106f ctdb-tests: Avoid warning about NULL dereference via d855dc2a5fa ctdb-tests: Don't compare an unsigned value with -1 via 5d8531b05c4 ctdb-tests: Fix signed/unsigned comparisons by casting via 68a4588a6fb ctdb-tests: Fix signed/unsigned comparisons by declaring as unsigned via c172e0ef2e7 ctdb-tests: Fix signed/unsigned comparisons by casting via f749356d949 ctdb-tests: Add a local variable for repeated calculation via 6053bf4bab4 ctdb-tests: Declare variable for return value of write(2) as ssize_t via 914e6b210fb ctdb-tests: Fix signed/unsigned comparison by declaring as unsigned via 4c24d434b96 ctdb-cluster-mutex: Ensure that the configured command is not empty via 9c75ad68189 ctdb-daemon: Drop unused values assigned to variable via c39441f62d9 ctdb-daemon: Fix signed/unsigned comparisons by using constant via 76e930d784e ctdb-daemon: Fix signed/unsigned comparisons by casting via 1e47a1b3f6a ctdb-daemon: Fix signed/unsigned comparisons by declaring as unsigned via 3ccce53e3e6 ctdb-daemon: Make type of list_of_nodes() consistent with callers via 65563479013 ctdb-daemon: Make old list_of_nodes() function static via 6478d65a2f1 ctdb-tools: Drop separate parallel+verbose stdout/stderr filtering via f3feb4df3a9 ctdb-tools: Drop no-op stdout-filter from non-parallel case via 90de5e0594b ctdb-tools: Drop onnode -o option from b1fc6e435b4 s3:tests: Add test for manual smbtorture zero-data https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a0561c7ed44afcc978f940a7936a210f37baf273 Author: Martin Schwenke Date: Mon Jul 1 07:04:19 2019 +1000 ctdb-tests: Rename local-daemon.sh dump-logs to print-log This makes it consistent with print-socket. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 5 06:19:11 UTC 2019 on sn-devel-184 commit e0b33c5549ffb1a06270af5e2b4a199496add90d Author: Martin Schwenke Date: Tue Jun 25 10:03:44 2019 +1000 ctdb-build: Tweak hacking of rpcgen output csbuild doesn't like the hack where variable buf is initialised to itself to avoid an unused variable warning. buf is unused so remove it instead. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 755a9e654feaa7265975a1f02ea2f59fd30d09a9 Author: Martin Schwenke Date: Tue Jun 25 06:35:04 2019 +1000 ctdb-daemon: Don't check if lock_ctx->ctdb_db is NULL This can never be NULL. It could probably be NULL in the past when "all database" locks existed. There are paths where is is checked for NULL and then later dereferenced, causing static analysers to produce spurious warnings. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e5a946cba5c309a6bdd1109685866d4a1c6841be Author: Martin Schwenke Date: Mon Jun 24 17:01:07 2019 +1000 ctdb-common: Mark ctdb_fatal() and ctdb_die() as _NORETURN_ This avoids static analysers continuing analysis after calls to these functions and producing incorrect warnings. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ba95cb2ae1564edc27541c2a87e35f3
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 952437b1bdb ctdb-utils: Fix CID 1125558 (Unchecked return value from library) via b1d83fb3e88 ctdb-daemon: Attempt to silence CID 1357985 (Unchecked return value) via aa602a8cc59 ctdb-cluster: CID 1435726: NULL pointer dereference via 2db0e71d3be ctdb-ipalloc: Fix warning about unused value assigned to srcimbl via 7df15b246ab ctdb-ipalloc: Avoid -1 as a PNN, use CTDB_UNKNOWN_PNN instead via 8d6570f ctdb-ipalloc: Fix signed/unsigned comparisons by declaring as unsigned via 18b4a3a0d31 ctdb-tests: Avoid potentially uninitialised data via 0bd87d75c0d ctdb-utils: Avoid warning about unused value via 90622ab901a ctdb-recovery: Fix signed/unsigned comparisons by declaring as unsigned via 35368d871d9 ctdb-recovery: Avoid -1 as a PNN, use CTDB_UNKNOWN_PNN instead via 978c7dbd559 ctdb-recovery: Fix signed/unsigned comparison by casting via fa7bd35b6ad ctdb-recovery: Fix signed/unsigned comparisons by declaring as unsigned via 7fa6c1206a3 ctdb-tests: Fix signed/unsigned comparison by using constant via 2c76a957c0e ctdb-client: Fix potentially uninitialised data via 2be15d3c61f ctdb-client: Fix signed/unsigned comparisons by declaring as unsigned via 887dc174f23 ctdb-common: Avoid unused value warning via 94e41a8466f ctdb-common: Avoid warning for potentially uninitialised pointers via cf9199f425c ctdb-common: Use #ifdef to avoid TEST_RB_TREE not defined via 2b3150db944 ctdb-common: Fix signed/unsigned comparisons by casting via 5b9456b70b6 ctdb-common: Fix signed/unsigned comparisons by declaring as unsigned via 938df1dbc81 ctdb-tools: Fix potentially uninitialised data via 9869ac1fb76 ctdb-tools: Fix signed/unsigned conversion by declaring as size_t via 282221b0d64 ctdb-tools: Fix signed/unsigned comparison by declaring as int via 201066d2e63 ctdb-tools: Fix signed/unsigned comparison by declaring as unsigned via 4a8ca51997f ctdb-tools: Fix signed/unsigned comparisons by casting via 865f127e7d2 ctdb-tools: Fix signed/unsigned comparisons by declaring extra variable via 2558f96da1f ctdb-tools: Fix signed/unsigned comparisons by declaring as unsigned from 843fbb1207e ctdb-scripts: Fix tcp_tw_recycle existence check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 952437b1bdbe000c217836c4ecd59406e92146d7 Author: Martin Schwenke Date: Wed May 29 19:11:51 2019 +1000 ctdb-utils: Fix CID 1125558 (Unchecked return value from library) Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jun 5 12:09:56 UTC 2019 on sn-devel-184 commit b1d83fb3e88acfdfe00f06e950185ed03fee624f Author: Martin Schwenke Date: Wed May 29 19:05:49 2019 +1000 ctdb-daemon: Attempt to silence CID 1357985 (Unchecked return value) Yes, the other callers check the return value of ctdb_lockdb_mark(). However, this is called in a void function and ctdb_lockdb_mark() has already printed any error message. All we can do is explicitly ignore the return value. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit aa602a8cc590dd416764d21147545bb411e47e35 Author: Martin Schwenke Date: Wed May 29 17:38:03 2019 +1000 ctdb-cluster: CID 1435726: NULL pointer dereference Also found by csbuild. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2db0e71d3bef334dbb0a73f7118bf92af1cf0890 Author: Martin Schwenke Date: Thu May 30 15:41:42 2019 +1000 ctdb-ipalloc: Fix warning about unused value assigned to srcimbl To make this much clearer, move the declaration into the scope where it is used. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7df15b246abb9ea2f606f5739a02cfec51f6d9cb Author: Martin Schwenke Date: Thu May 30 15:40:42 2019 +1000 ctdb-ipalloc: Avoid -1 as a PNN, use CTDB_UNKNOWN_PNN instead This fixes warnings about signed versus unsigned comparisons. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8d6570f5377139a18d3e8875e89565bb8ee0 Author: Martin Schwenke Date: Thu May 30 15:37:38 2019 +1000 ctdb-ipalloc: Fix signed/unsigned comparisons by declaring as unsigned Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 18b4a3a0d316954d65617ee189dffa9c4269f42e Author: Martin Schwenke Date: Thu May 30 15:33:05 2019 +1000 ctdb-tests: Avoid potentially uninitialised data Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0bd87d75c0db076e17d2d186afbdccb3e769b125 Author: Martin Schwenke Date: Thu May 30 15:32:03
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b1f4c86eea0 ctdb-common: Fix memory leak in run_proc via 30bc6e2529c ctdb-common: Fix memory leak via 6a2941e2a9f ctdb-recoverd: Fix memory leak via dc89db8ca6a ctdb-tests: Fix logic error in simple ctdb reloadips test via 8be4ee1a28d ctdb-tests: Make ctdb reloadips tests more reliable via cf00db40355 ctdb-tests: Capture output in $out on failure as well from b1a32dd7f50 selftest: enable undefined behaviour sanitizer https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b1f4c86eea022999d5439e4a6ef3494fe41479b6 Author: Amitay Isaacs Date: Mon May 13 17:07:59 2019 +1000 ctdb-common: Fix memory leak in run_proc BUG: https://bugzilla.samba.org/show_bug.cgi?id=13943 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue May 14 08:59:03 UTC 2019 on sn-devel-184 commit 30bc6e2529cdd444d4ec7902844c3a6fb0858090 Author: Martin Schwenke Date: Sat May 11 17:33:57 2019 +1000 ctdb-common: Fix memory leak BUG: https://bugzilla.samba.org/show_bug.cgi?id=13943 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6a2941e2a9fd6ab2d5b8dbac042b61a7b1b0b914 Author: Martin Schwenke Date: Sat May 11 14:24:24 2019 +1000 ctdb-recoverd: Fix memory leak state is always freed before exiting this function, so allocate fde off it instead of long-lived ctdb context. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13943 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit dc89db8ca6aadd4a9f7e8a85843c53709d04587c Author: Martin Schwenke Date: Tue May 7 15:42:49 2019 +1000 ctdb-tests: Fix logic error in simple ctdb reloadips test There is a chance that restoring IP addresses to the test node will result in different IP addresses being assigned to that node. Removing a single IP address may then fail (or be a no-op) if it is done after the restore. So, swap the single IP address removal to happen first, then restore, then remove all IP addresses. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8be4ee1a28d5c037955832b6f827d40f28f02796 Author: Martin Schwenke Date: Tue May 7 15:29:19 2019 +1000 ctdb-tests: Make ctdb reloadips tests more reliable ctdb reloadips will fail if it can't disable takover runs. The most likely reason for this is that there is already a takeover run in progress. We can't predict when this will happen, so retry if this occurs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cf00db40355b49443263187f9d97934f91287e51 Author: Martin Schwenke Date: Mon May 13 17:40:15 2019 +1000 ctdb-tests: Capture output in $out on failure as well BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/event_script.c | 3 +- ctdb/common/run_proc.c | 7 +++- ctdb/server/ctdb_recoverd.c | 2 +- ctdb/tests/complex/18_ctdb_reloadips.sh | 35 +++-- ctdb/tests/scripts/integration.bash | 8 ++-- ctdb/tests/simple/18_ctdb_reloadips.sh | 70 +++-- 6 files changed, 94 insertions(+), 31 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/event_script.c b/ctdb/common/event_script.c index 8978d1452c0..8bdfdd0b5ca 100644 --- a/ctdb/common/event_script.c +++ b/ctdb/common/event_script.c @@ -117,7 +117,8 @@ int event_script_get_list(TALLOC_CTX *mem_ctx, } *out = script_list; - return 0; + ret = 0; + goto done; nomem: ret = ENOMEM; diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c index 037b6d9651d..0c3c1de72fe 100644 --- a/ctdb/common/run_proc.c +++ b/ctdb/common/run_proc.c @@ -302,13 +302,15 @@ again: proc->fd = -1; } + DLIST_REMOVE(run_ctx->plist, proc); + /* Active run_proc request */ if (proc->req != NULL) { run_proc_done(proc->req); + } else { + talloc_free(proc); } - DLIST_REMOVE(run_ctx->plist, proc); - goto again; } @@ -426,6 +428,7 @@ static void run_proc_done(struct tevent_req *req) if (state->proc->output != NULL) { state->output = talloc_steal(state, state->proc->output); } + talloc_steal(state, state->proc); tevent_req_done(req); } diff --gi
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c75fbeaa961 ctdb-tests: Remove old socket wrapper state directory during setup via 97ad353a67c ctdb-tests: Actually restart if cluster doesn't become healthy via a60e77157cb ctdb-tests: Add dump-logs command for local daemons via a0a82f1b6a0 ctdb-tests: Add reqid wrapping test via 8663e0a64fb ctdb-daemon: Never use 0 as a client ID from 21dc6f8e8d8 vfs_ceph: fix cephwrap_flistxattr() debug message https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c75fbeaa96108cd4dc193ef5f4170977804e5104 Author: Martin Schwenke Date: Sun May 12 07:52:13 2019 +1000 ctdb-tests: Remove old socket wrapper state directory during setup Otherwise, when looping tests for a long time, nodes are unable to connect to each other. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon May 13 08:42:44 UTC 2019 on sn-devel-184 commit 97ad353a67ce0232d7ca5637f1bf8886e2df1aca Author: Martin Schwenke Date: Fri May 10 19:22:16 2019 +1000 ctdb-tests: Actually restart if cluster doesn't become healthy BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a60e77157cb6e803ead4e93d1caeba140f955e08 Author: Martin Schwenke Date: Sun May 5 12:31:41 2019 +1000 ctdb-tests: Add dump-logs command for local daemons Dump a single merged log to stdout. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a0a82f1b6a0d7d94b99982579fe13291d1e6a1b0 Author: Amitay Isaacs Date: Tue May 7 16:29:54 2019 +1000 ctdb-tests: Add reqid wrapping test BUG: https://bugzilla.samba.org/show_bug.cgi?id=13930 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 8663e0a64fbdb9ea16babbfe87d6f5d7a7b72bbd Author: Martin Schwenke Date: Mon May 6 15:22:49 2019 +1000 ctdb-daemon: Never use 0 as a client ID ctdb_control_db_attach() and ctdb_control_db_detach() assume that any control with client ID 0 comes from another daemon and treat it specially. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13930 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/server/ctdb_daemon.c | 48 - ctdb/tests/local_daemons.sh | 28 ++ ctdb/tests/scripts/integration.bash | 1 + ctdb/tests/src/reqid_test.c | 16 + 4 files changed, 92 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index c5733bb2592..acb40bdb8df 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1051,6 +1051,44 @@ static int ctdb_clientpid_destructor(struct ctdb_client_pid_list *client_pid) return 0; } +static int get_new_client_id(struct reqid_context *idr, +struct ctdb_client *client, +uint32_t *out) +{ + uint32_t client_id; + + client_id = reqid_new(idr, client); + /* +* Some places in the code (e.g. ctdb_control_db_attach(), +* ctdb_control_db_detach()) assign a special meaning to +* client_id 0. The assumption is that if client_id is 0 then +* the control has come from another daemon. Therefore, we +* should never return client_id == 0. +*/ + if (client_id == 0) { + /* +* Don't leak ID 0. This is safe because the ID keeps +* increasing. A test will be added to ensure that +* this doesn't change. +*/ + reqid_remove(idr, 0); + + client_id = reqid_new(idr, client); + } + + if (client_id == REQID_INVALID) { + return EINVAL; + } + + if (client_id == 0) { + /* Every other ID must have been used and we can't use 0 */ + reqid_remove(idr, 0); + return EINVAL; + } + + *out = client_id; + return 0; +} static void ctdb_accept_client(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, @@ -1094,7 +1132,15 @@ static void ctdb_accept_client(struct tevent_context *ev, client->ctdb = ctdb; client->fd = fd; - client->client_id = reqid_new(ctdb->idr, client); + + ret = get_new_client_id(ctdb->idr, client, >client_id); + if (ret != 0) { + DBG_ERR("Unable to get client ID (%d)\n", re
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5a9e338330f ctdb-tests: Don't clean up test var directory in autotest target via a2ab6485e02 ctdb-tests: Fix usage message via 3cb53a7a054 ctdb-tests: Wait to allow database attach/detach to take effect via 066cc5b0c56 ctdb-tests: Avoid bulk output in $out, prefer $outfile via 9d02452a246 ctdb-tests: Make try_command_on_node less error-prone via 7c3819d1ac2 ctdb-tests: Change sanity_check_output() to internally use $out via b80967f5dcc ctdb-scripts: Drop script configuration variable CTDB_MONITOR_SWAP_USAGE via 8108b3134c0 ctdb-tests: Extend test to cover ctdb rddumpmemory via f78d9388fb4 ctdb-tools: Fix ctdb dumpmemory to avoid printing trailing NUL via 95477e69e3e ctdb-daemon: Log when ctdbd CPU utilisation exceeds a threshold via 87032ccebdd ctdb-build: Add check for getrusage() from 3d42e257a61 s4 dns_server Bind9: Log opertion durations https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5a9e338330fe136908a3a17a5df81c054c5cc5b0 Author: Martin Schwenke Date: Wed May 1 15:17:14 2019 +1000 ctdb-tests: Don't clean up test var directory in autotest target If the directory is always cleaned up then it is not possible to look at daemon logs to debug test failures. This target is only really used by autobuild.py, which (optionally) cleans up the parent directory anyway. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue May 7 06:56:01 UTC 2019 on sn-devel-184 commit a2ab6485e027ebb13871c7d83b7626ac5c9b98c0 Author: Martin Schwenke Date: Wed May 1 15:10:28 2019 +1000 ctdb-tests: Fix usage message Since commit 0e9ead8f28fced3ebfa888786a1dc5bb59e734a3 daemons have been shut down after each test, so this option no longer has anything to do with killing daemons. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3cb53a7a05409925024d6a67bcfaeb962d896e0b Author: Martin Schwenke Date: Sat Apr 27 14:54:09 2019 +1000 ctdb-tests: Wait to allow database attach/detach to take effect Sometimes the detach test fails: Check detaching single test database detach_test1.tdb BAD: database detach_test1.tdb is still attached Number of databases:4 dbid:0x5ae995ee name:detach_test4.tdb path:tests/var/simple/node.0/db/volatile/detach_test4.tdb.0 dbid:0xd84cc13c name:detach_test3.tdb path:tests/var/simple/node.0/db/volatile/detach_test3.tdb.0 dbid:0x8e8e8cef name:detach_test2.tdb path:tests/var/simple/node.0/db/volatile/detach_test2.tdb.0 dbid:0xc62491f4 name:detach_test1.tdb path:tests/var/simple/node.0/db/volatile/detach_test1.tdb.0 Number of databases:3 dbid:0x5ae995ee name:detach_test4.tdb path:tests/var/simple/node.1/db/volatile/detach_test4.tdb.1 dbid:0xd84cc13c name:detach_test3.tdb path:tests/var/simple/node.1/db/volatile/detach_test3.tdb.1 dbid:0x8e8e8cef name:detach_test2.tdb path:tests/var/simple/node.1/db/volatile/detach_test2.tdb.1 Number of databases:4 dbid:0x5ae995ee name:detach_test4.tdb path:tests/var/simple/node.2/db/volatile/detach_test4.tdb.2 dbid:0xd84cc13c name:detach_test3.tdb path:tests/var/simple/node.2/db/volatile/detach_test3.tdb.2 dbid:0x8e8e8cef name:detach_test2.tdb path:tests/var/simple/node.2/db/volatile/detach_test2.tdb.2 dbid:0xc62491f4 name:detach_test1.tdb path:tests/var/simple/node.2/db/volatile/detach_test1.tdb.2 *** TEST COMPLETED (RC=1) AT 2019-04-27 03:35:40, CLEANING UP... When issued from a client, the detach control re-broadcasts itself asynchronously to all nodes and then returns success. The controls to some nodes to do the actual detach may still be in flight when success is returned to the client. Therefore, the test should wait for a few seconds to allow the asynchronous controls to complete. The same is true for the attach control, so workaround the problem in the attach test too. An alternative is to make the attach and detach controls synchronous by avoiding the broadcast and waiting for the results of the individual controls sent to the nodes. However, a simple implementation would involve adding new nested event loops. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 066cc5b0c561464ed08890d9aa1a1a55b545e9cc Author: Martin Schwenke Date: Thu Apr 11 20:55:20 2019 +1000 ctdb-tests: Avoid bulk output in $out, prefer $outfile BUG: https
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 289201277cd ctdb-common: Avoid race between fd and signal events via 38dc6d11a26 ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake" via 10291d91f2a Revert "ctdb-scripts: Do not "correct" number of nfsd threads when it is 0" from bfd762b53ab selftest: rename schemaupgrade_dc (+pair) to schema_dc https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 289201277cd983b27cdfd5376c607eab112b4082 Author: Amitay Isaacs Date: Tue Apr 9 14:44:04 2019 +1000 ctdb-common: Avoid race between fd and signal events BUG: https://bugzilla.samba.org/show_bug.cgi?id=13895 In run_proc, there was an implicit assumption that when a process exits, fd event (pipe between parent and child) would be processed first and signal event (SIGCHLD for the child) would be processed later. However, that is not the case. SIGCHLD can be received asynchronously any time even when the pipe data has not fully been read. This causes run_proc to miss some of the output from child process in tests. When SIGCHLD is being processed, if the pipe between parent and child is still open, then do an explict read from the pipe to ensure we read any data still in the pipe before closing the pipe. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Apr 12 08:19:29 UTC 2019 on sn-devel-144 commit 38dc6d11a26c2e9a2cae7927321f2216ceb1c5ec Author: Martin Schwenke Date: Fri Apr 5 16:17:35 2019 +1100 ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake" We also can not assume that nodes can be marked as connected via only the keepalive mechanism. Keepalives are not sent to disconnected nodes so, in the absence of other packets (e.g. broadcasts), 2 nodes may never become marked as connected to each other. Revert to marking nodes as connected in the TCP transport code. If a connection is to a non(-operational) ctdbd then it will revert to disconnected after a short while and may actually flap. This should be rare. This reverts commit 66919db3d7ab1e091223faf515b183af8bfddc83. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13888 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 10291d91f2a087ff959676f2e2a04b41ae5afd68 Author: Martin Schwenke Date: Thu Apr 4 18:21:49 2019 +1100 Revert "ctdb-scripts: Do not "correct" number of nfsd threads when it is 0" I thought this was being triggered during automated testing. However, it appears that a poor choice of fixed ports for NFS RPC services was the real problem. Revert, since the original behaviour may be useful. This reverts commit f1a1c300e192d43f5c9faf9450ffbf16341a2661. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/run_proc.c | 7 +++ ctdb/config/nfs-linux-kernel-callout | 6 ++ ctdb/tcp/tcp_connect.c | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c index 97895b383b9..037b6d9651d 100644 --- a/ctdb/common/run_proc.c +++ b/ctdb/common/run_proc.c @@ -295,6 +295,13 @@ again: proc->result.sig = WTERMSIG(status); } + /* Confirm that all data has been read from the pipe */ + if (proc->fd != -1) { + proc_read_handler(ev, proc->fde, 0, proc); + TALLOC_FREE(proc->fde); + proc->fd = -1; + } + /* Active run_proc request */ if (proc->req != NULL) { run_proc_done(proc->req); diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index 868f3279cf2..def69a04649 100755 --- a/ctdb/config/nfs-linux-kernel-callout +++ b/ctdb/config/nfs-linux-kernel-callout @@ -313,10 +313,8 @@ nfs_check_thread_count () # Intentionally not arithmetic comparison - avoids extra errors # when above read fails in an unexpected way... -if [ "$_running_threads" != "0" ] && \ - [ "$_running_threads" != "$_configured_threads" ] ; then - printf 'Attempting to correct number of nfsd threads from %s to %s\n' \ - "$_running_threads" "$_configured_threads" +if [ "$_running_threads" != "$_configured_threads" ] ; then + echo "Attempting to correct number of nfsd threads from ${_r
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via edd4a23d763 ctdb-version: Simplify version string usage via 148306674d0 ctdb-build: Drop creation of .distversion in tarball via 05c28fee21c ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING via 2c3df581329 ctdb-tests: Add a test for version consistency checking via 8c2ff3f2b52 ctdb-daemon: Add an environment variable to set version via 627a5cf1e71 ctdb-tests: Fix remaining common.sh ShellCheck hits via 6555fbce995 ctdb-tests: Shell cleanups in wait_until() function via 2fce893b2c8 ctdb-tests: export CTDB_SCRIPTS_TOOLS_BIN_DIR via 957c38b65ca ctdb-packaging: Test package requires tcpdump via b2b8dce4fc5 ctdb-packaging: ctdb package should not own system library directory via d9286701cd9 ctdb-tests: Add some testing for IPv4-mapped IPv6 address parsing via 539b5ff32b3 ctdb: Initialize addr struct to zero before reparsing as IPV4 via a215d2017f9 ctdb-tests: Build cluster mutex path manually from a2c5f8cf41c dbcheck: don't check expired tombstone objects by default anymore https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit edd4a23d7632af51f4d7b4287917b7fa0dced963 Author: Amitay Isaacs Date: Fri Mar 15 12:14:27 2019 +1100 ctdb-version: Simplify version string usage There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING. Wherever required use SAMBA_VERSION_STRING directly. Avoids the confusion with two version.h files. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144 commit 148306674d0e4706adca3e5dcbb779c51a2c03da Author: Martin Schwenke Date: Thu Mar 7 17:53:25 2019 +1100 ctdb-build: Drop creation of .distversion in tarball BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 05c28fee21c0cc986cb8301f4199595cdb13faee Author: Stefan Metzmacher Date: Fri Jun 16 12:15:25 2017 +0200 ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING This way we don't get constant rebuild as SAMBA_VERSION_STRING is "4.7.0pre1.DEVELOPERBUILD" for the binaries under bin/ instead of "4.7.0pre1.GIT.59e51f6". BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Stefan Metzmacher Reviewed-by: Martin Schwenke commit 2c3df58132939bbb17a448ef12d5f376244b7545 Author: Martin Schwenke Date: Fri Feb 8 13:32:16 2019 +1100 ctdb-tests: Add a test for version consistency checking Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8c2ff3f2b52e679a8e14cf97b51927a20bd1 Author: Martin Schwenke Date: Wed Feb 6 13:57:00 2019 +1100 ctdb-daemon: Add an environment variable to set version This can be used to test the version checking logic. Cache the version to avoid re-checking the environment variable each time. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 627a5cf1e717aab65b99eaba4e2efe78307adbf2 Author: Martin Schwenke Date: Thu Mar 7 15:46:48 2019 +1100 ctdb-tests: Fix remaining common.sh ShellCheck hits Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6555fbce995d3d3a7b162ea49a4a9844e234fed8 Author: Martin Schwenke Date: Thu Mar 7 15:40:59 2019 +1100 ctdb-tests: Shell cleanups in wait_until() function This file is included by local_daemons.sh, which is not a bash script and wait_until() uses the "local" keyword. Prefixing variable names with '_' to indicate that they are local changes a lot of lines in this function. So, fix indentation, potential quoting problems and other ShellCheck hits while touching this function. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2fce893b2c8f63c72c5e0fb177ca61c93317b751 Author: Martin Schwenke Date: Thu Mar 7 15:26:27 2019 +1100 ctdb-tests: export CTDB_SCRIPTS_TOOLS_BIN_DIR This isn't used anywhere that requires it to be exported, but the lack of consistency will cause problems and confusion at some later stage. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 957c38b65ca060eabe1e676f8dfb54839d706155 Author: Martin Schwenke Date: Wed Mar 6 19:16:55 2019 +1100 ctdb-packaging: Test package requires tcpdump BUG: https://bugzilla.samba.org/show_bug.cgi?id=13838 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b2b8dce4fc56c27ef0131104b316346565369dd7 Author: Martin Schwenke Date: Wed Mar 6 14:36:01 2019 +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c93430fe8fe ctdb-cluster-mutex: Separate out command and file handling via ebc082122fb ctdb-tests: Add a test for configuring the recovery lock as a command via e74f5243fcb ctdb-tests: Add -R option for local daemons to use recovery lock command via ce09d9c3e4c ctdb-tests: Force test failure if local daemon setup fails via 13a1a480893 ctdb-recoverd: Time out attempt to take recovery lock after 120s via 45a77d65b2e ctdb-recoverd: Ban node on unknown error when taking recovery lock via c0fb62ed395 ctdb-recoverd: Make recoverd context available in recovery lock handle via 7e4aae69432 ctdb-recoverd: Clean up logging on failure to take recovery lock via 621658cbed5 ctdb-recoverd: Free cluster mutex handler on failure to take lock via 82e7f382148 ctdb-config: Change example recovery lock setting to one that fails from 12da33e2bbc smbd: unix_convert: Ensure we don't call get_real_filename on POSIX paths. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c93430fe8fe530a55b9a04cf6cc660c3d420e333 Author: Martin Schwenke Date: Mon Jan 21 12:16:43 2019 +1100 ctdb-cluster-mutex: Separate out command and file handling This code is difficult to read and there really is no common code between the 2 cases. For example, there is no need to split a filename into words. Separating each of the 2 cases into its own function makes the logic much easier to understand. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Feb 25 03:40:16 CET 2019 on sn-devel-144 commit ebc082122fb34ffb8cbcafde9ad39bcc241d33ed Author: Martin Schwenke Date: Mon Jan 21 12:15:33 2019 +1100 ctdb-tests: Add a test for configuring the recovery lock as a command BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e74f5243fcb7594939769c16f3c79ab167dd1227 Author: Martin Schwenke Date: Mon Jan 21 12:13:29 2019 +1100 ctdb-tests: Add -R option for local daemons to use recovery lock command Under the covers, a command is always used. However, there is no way of testing of the code path where a command is explicitly configured. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ce09d9c3e4c72ebec7a21686ae913398a5c9020f Author: Martin Schwenke Date: Mon Jan 21 12:13:08 2019 +1100 ctdb-tests: Force test failure if local daemon setup fails BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 13a1a4808935290dceb219daccd7aac3fda4e184 Author: Martin Schwenke Date: Fri Feb 22 15:09:33 2019 +1100 ctdb-recoverd: Time out attempt to take recovery lock after 120s Currently this will wait forever. It really needs a timeout in case the cluster filesystem (or other lock mechanism) is completely wedged. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 45a77d65b2e39b4af94da4ab99575f4ee08a7ebd Author: Martin Schwenke Date: Thu Jan 10 14:01:57 2019 +1100 ctdb-recoverd: Ban node on unknown error when taking recovery lock We really shouldn't see unknown errors. They probably represent a misconfigured recovery lock or similar. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c0fb62ed3954fc6e8667480aba92003fc270f257 Author: Martin Schwenke Date: Thu Jan 10 13:24:34 2019 +1100 ctdb-recoverd: Make recoverd context available in recovery lock handle BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 7e4aae6943291c3144c8a3ff97537e8d4c7dc7c9 Author: Martin Schwenke Date: Mon Jan 21 16:36:13 2019 +1100 ctdb-recoverd: Clean up logging on failure to take recovery lock Add an explicit case for a timeout and clean up the other messages. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 621658cbed5d91d7096fc208bac2ff93a1880e7d Author: Martin Schwenke Date: Mon Jan 21 16:28:28 2019 +1100 ctdb-recoverd: Free cluster mutex handler on failure to take lock If nested events occur while the file descriptor handler is still active then chaos can ensue. For example, if a node is banned and the lock is explicitly cancelled
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 944c92a15db ctdb-daemon: Modernise debug during record deletion for vacuuming via cdca0d7e78a ctdb-daemon Add extra debug during record deletion for vacuuming via 2e3ad8c20d2 ctdb-tests: Minimise chances of test interfering with itself via f1b594dce1c ctdb-daemon: Do not force full vacuum on first vacuuming run via 9bdd6814e4c ctdb-packaging: Update library versions to upstream versions via 59e244c9d04 ctdb-packaging: Match configure command as per spec file via 4443124fe8d ctdb-packaging: Call waf with python wrapper via 9912709eca2 ctdb-build: Use open() instead of file() for python3 via 1e061ff1e3f ctdb-tool: Avoid data uninitialized warnings from 1ed91f0e102 ctdb-tests: Do not force TEST_VAR_DIR to be absolute https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 944c92a15dbbcaaea1cd4e63bf2a109a33126437 Author: Martin Schwenke Date: Wed Oct 24 12:29:54 2018 +1100 ctdb-daemon: Modernise debug during record deletion for vacuuming Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Dec 18 10:13:50 CET 2018 on sn-devel-144 commit cdca0d7e78a4cad797ff457f860a37de78bcdb44 Author: Martin Schwenke Date: Mon Oct 15 21:21:25 2018 +1100 ctdb-daemon Add extra debug during record deletion for vacuuming It isn't currently possible to distinguish these 2 cases. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2e3ad8c20d2964fba14d0d5b0b36c334ac22caa5 Author: Martin Schwenke Date: Tue Dec 18 14:31:24 2018 +1100 ctdb-tests: Minimise chances of test interfering with itself Checking that the database contains 0 records cause a traverse. This may take a lock and cause vacuuming to fail (or be deferred for a particular record/chain). Minimise the chance of this happening by only checking for 0 records every 10 seconds. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f1b594dce1c081924b16c52c8c50c984a16df098 Author: Martin Schwenke Date: Mon Oct 22 21:40:22 2018 +1100 ctdb-daemon: Do not force full vacuum on first vacuuming run When the number of fast path vacuuming runs is 0 then a full vacuuming run is done. This means the first one is a full run, which is almost certainly not what is intended. Combine the 2 conditionals to only flag a full vacuuming run when the count exceeds the configured limit. This means that the full_vacuum_run flag is set in both parent and child, but this is harmless... and is better than getting it wrong. Also tweak the comparison to be less-than-or-equal, since the zeroth run needs to be counted. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 9bdd6814e4c64f3be04daa7e8739e141d2d664b7 Author: Amitay Isaacs Date: Tue Dec 18 13:37:40 2018 +1100 ctdb-packaging: Update library versions to upstream versions Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 59e244c9d0402062ae77c882e2af28d00da9 Author: Amitay Isaacs Date: Tue Dec 18 11:01:35 2018 +1100 ctdb-packaging: Match configure command as per spec file Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 4443124fe8d7c12dfab62f9962939d14cbed1291 Author: Amitay Isaacs Date: Tue Dec 18 11:03:51 2018 +1100 ctdb-packaging: Call waf with python wrapper This allows to build packages even when python3 is not available by setting PYTHON variable. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 9912709eca29d21cf56f342079db6b5cc02bbea2 Author: Amitay Isaacs Date: Tue Dec 18 10:54:50 2018 +1100 ctdb-build: Use open() instead of file() for python3 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 1e061ff1e3fcfcd020df1a35c1c0697c114cb209 Author: Amitay Isaacs Date: Tue Dec 18 11:33:30 2018 +1100 ctdb-tool: Avoid data uninitialized warnings ../../tools/ctdb.c: In function 'str_to_data': ../../tools/ctdb.c:624: warning: 'data.dsize' may be used uninitialized in this function ../../tools/ctdb.c:624: warning: 'data.dptr' may be used uninitialized in this function Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- Summary of changes: ctdb/configure.rpm | 4 +++- ctdb/packaging/RPM/ctdb.spec.in| 7 --- ctdb/server/ctdb_recover.c | 23 -- ctdb/server/ctdb_vacuum.c | 13 ++-- ctdb/tests/simple/69_recovery_resurrect_deleted.sh | 5
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1ed91f0e102 ctdb-tests: Do not force TEST_VAR_DIR to be absolute via 61b54193fe4 ctdb-event: Force symbolic link targets to be absolute via 108aca0a9e7 ctdb-event: Declare and construct data_script only if needed via 63a4c634a65 ctdb-tests: Force symbolic link targets to be absolute via 45f96c73463 ctdb-event: Force EVENTSCRIPTS_TESTS_VAR_DIR to be absolute via ba83aa9d8b2 ctdb-event: Force script directory to be absolute via da8aaf2aee2 ctdb-recoverd: Call an election when the recovery lock is lost via 9d1d5fa4ac3 ctdb-doc: Add non-breaking space to lock_buckets documentation via 93284ed0321 ctdb-daemon: Divide by 2 when calculating hop count bucket from b77fae3281a smbd: Don't try to release a kernel oplock for a leased file https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1ed91f0e102e3cb67b69e146b8b587e4d0222a8a Author: Martin Schwenke Date: Fri Sep 7 14:48:17 2018 +1000 ctdb-tests: Do not force TEST_VAR_DIR to be absolute This can result in Unix domain socket names that are too long. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Dec 18 05:31:00 CET 2018 on sn-devel-144 commit 61b54193fe4e7c122bd06b98a7090a245d54250e Author: Martin Schwenke Date: Fri Sep 7 14:47:24 2018 +1000 ctdb-event: Force symbolic link targets to be absolute If CTDB_BASE is relative then symbolic link targets will be incorrect. Don't force CTDB_BASE to be absolute because this can result in Unix domain socket names that are too long. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 108aca0a9e71f2efb699dfeb5e3a1d7e24002de7 Author: Martin Schwenke Date: Fri Sep 7 14:35:15 2018 +1000 ctdb-event: Declare and construct data_script only if needed Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 63a4c634a65afbf04080d3958d1b91d3a8770cc7 Author: Martin Schwenke Date: Fri Sep 7 14:45:00 2018 +1000 ctdb-tests: Force symbolic link targets to be absolute If CTDB_BASE is relative then the symbolic link target will be incorrect. Don't force CTDB_BASE to be absolute because this can result in Unix domain socket names that are too long. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 45f96c73463a1f17e48610e88a6e103f845fb0c1 Author: Martin Schwenke Date: Fri Sep 7 16:02:25 2018 +1000 ctdb-event: Force EVENTSCRIPTS_TESTS_VAR_DIR to be absolute Event scripts (well, statd_callout) can change directory, causing stubs to be unable to locate EVENTSCRIPTS_TESTS_VAR_DIR if it is relative. Don't force TEST_VAR_DIR to be absolute because this can result in Unix domain socket names that are too long. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ba83aa9d8b20b11f1febb77d2607ee2a38456f6e Author: Martin Schwenke Date: Fri Sep 7 13:39:49 2018 +1000 ctdb-event: Force script directory to be absolute If TEST_VAR_DIR is relative then symbolic link targets will be incorrect. Don't force TEST_VAR_DIR to be absolute because this can result in Unix domain socket names that are too long. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit da8aaf2aee2ff145f3001ae1fcf3626d6a9bc17d Author: Martin Schwenke Date: Thu Nov 8 15:49:30 2018 +1100 ctdb-recoverd: Call an election when the recovery lock is lost The lock may have been lost due to a failure in the underlying locking mechanism. This could be due to quorum loss or similar. It is best to call an election to confirm that this node should still be master. At worst, the node will reelect itself, fail to take the lock and then ban itself. This is a suitable outcome for a node that has been partitioned from others in the cluster. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 9d1d5fa4ac3abfe464dda1c7adc4616927855b57 Author: Martin Schwenke Date: Thu Dec 13 12:16:16 2018 +1100 ctdb-doc: Add non-breaking space to lock_buckets documentation Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 93284ed0321ff96a97d4b56deedbca62c5852c06 Author: Martin Schwenke Date: Thu Nov 15 13:58:53 2018 +1100 ctdb-daemon: Divide by 2 when calculating hop count bucket This provides finer resolution while still maintaining a reasonable maximum. In this case the top bucket contains any hop counts >= 16384, compared to the current situation where the top bucket contains hop counts >= 268435456. Signed-off-by: Martin Schwenke Reviewed-by: Amitay
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7d271450f71 ctdb: Remove parameter from pfetch usage info via 81de8f06414 ctdb: Fix hex to int conversion in h2i from 90de1431b91 rpcclient: Use dom_sid_str_buf https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7d271450f71a168898482d8c8a0f1f6bbf875804 Author: Christof Schmitt Date: Mon May 22 16:28:40 2017 -0700 ctdb: Remove parameter from pfetch usage info The code does not implement saving the record data to a file, so update the usage info accordingly. Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Dec 10 05:02:13 CET 2018 on sn-devel-144 commit 81de8f0641484729e4fbfc055a1a52dcd15cd32e Author: Christof Schmitt Date: Mon May 22 12:31:35 2017 -0700 ctdb: Fix hex to int conversion in h2i Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tools/ctdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index f96167f9366..b598a866c9b 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -587,7 +587,7 @@ static int h2i(char h) return h - 'a' + 10; } if (h >= 'A' && h <= 'F') { - return h - 'f' + 10; + return h - 'A' + 10; } return h - '0'; } @@ -4804,7 +4804,7 @@ static int control_pfetch(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, TDB_DATA key, data; int ret; - if (argc < 2 || argc > 3) { + if (argc != 2) { usage("pfetch"); } @@ -5973,7 +5973,7 @@ static const struct ctdb_cmd { { "setdbsticky", control_setdbsticky, false, true, "enable sticky records", ""}, { "pfetch", control_pfetch, false, false, - "fetch record from persistent database", " []" }, + "fetch record from persistent database", " " }, { "pstore", control_pstore, false, false, "write record to persistent database", " " }, { "pdelete", control_pdelete, false, false, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dd7574afd1b ctdb-daemon: Exit with error if a database directory does not exist from 46a6c6ff6d2 vfs_fruit: avoid dereferencing fsp->base_fsp in fruit_fstat_meta_stream() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dd7574afd1b2fb6a88defa154bc3d15e94f9ce0d Author: Martin Schwenke Date: Fri Nov 30 12:44:26 2018 +1100 ctdb-daemon: Exit with error if a database directory does not exist Since 4.9.0, the log messages can be confusing if a required database directory does not exist. Explicitly check for database directories, logging a clear error and exiting if one is missing. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13696 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Dec 3 06:56:41 CET 2018 on sn-devel-144 --- Summary of changes: ctdb/server/ctdbd.c | 20 1 file changed, 20 insertions(+) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index a2870d0d111..7e71d6e8272 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -311,8 +311,28 @@ int main(int argc, const char *argv[]) */ ctdb->db_directory = ctdb_config.dbdir_volatile; + ok = directory_exist(ctdb->db_directory); + if (! ok) { + D_ERR("Volatile database directory %s does not exist\n", + ctdb->db_directory); + goto fail; + } + ctdb->db_directory_persistent = ctdb_config.dbdir_persistent; + ok = directory_exist(ctdb->db_directory_persistent); + if (! ok) { + D_ERR("Persistent database directory %s does not exist\n", + ctdb->db_directory_persistent); + goto fail; + } + ctdb->db_directory_state = ctdb_config.dbdir_state; + ok = directory_exist(ctdb->db_directory_state); + if (! ok) { + D_ERR("State database directory %s does not exist\n", + ctdb->db_directory_state); + goto fail; + } if (ctdb_config.lock_debug_script != NULL) { ret = setenv("CTDB_DEBUG_LOCKS", -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6e16e95 ctdb-daemon: Do not fork when CTDB_TEST_MODE is set via 01f6fbb ctdb-daemon: Switch interactive variable to a bool via 804bdf9 ctdb-tests: Add local_daemons.sh onnode and socket commands via 19de5f4 ctdb-tests: Use local_daemons.sh in local_daemons.bash via 46fd4f1 ctdb-tests: Add local_daemons.sh via 25efb92 ctdb-tests: Allow use of setup_ctdb_base() outside of test cases via 9679c9e ctdb-build: Don't set unused variable TEST_BIN_DIR via aa0c7cc ctdb-tests: Move setting of ctdb_dir and top_dir via 1d86fd5 ctdb-tests: Use $CTDB_SCRIPTS_TOOLS_BIN_DIR via 7ac5e7a ctdb-tests: Use $CTDB_SCRIPTS_TESTS_BINDIR via bde73c7 ctdb-tests: Add new variable CTDB_SCRIPTS_TESTS_BINDIR via 2cb82ef ctdb-tests: Change all cluster setup to use ctdb_test_init() via 9a2910c ctdb-tests: Drop passing of test arguments to ctdb_test_init() via d762e52 ctdb-tests: Drop ctdb_restart_when_done() via 79db138 ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled via bc8df71 ctdb-tests: Drop tests that only start and stop daemons via 412fb7b ctdb-tests: Move enabling of event scripts to setup_ctdb() via aa2ee4b ctdb-tests: Improve signal handling trap via 9233723 ctdb-tests: Drop cleanup_handler() via 0e9ead8 ctdb-tests: Start daemons in ctdb_test_init(), stop them in ctdb_test_exit() via e733e4c ctdb-tests: Ignore SIGPIPE during simple test cleanup via 6d9c89b ctdb-tests: Drop setting of unused variable scriptname via 5205680 ctdb-tests: Drop use of confusing testfailures variable via 9ebcebe ctdb-tests: Drop useless "ctdb version" test via 43c26e1 ctdb-tests: Rationalise tunable simple tests via ba86eac ctdb-tests: Rationalise ctdb stop/continue/disable/enable simple tests via 5fdac51 ctdb-tests: Use wait_until_node_has_no_ips() in some tests via eda1296 ctdb-tests: Add function wait_until_node_has_no_ips() via 698a9ef lib: ldb: Remove use of talloc_autofree_context(). via f420e8d lib: talloc: Mark talloc_autofree_context() as deprecated. via 44019b5 ctdb-event: Only run talloc report if CTDB_INTERACTIVE is set via e952f03 ctdb-event: Never fork to become daemon in eventd via 4e6bd42 ctdb-daemon: Improve documentation for -i option via 9c41481 ctdb-daemon: Don't set log_to_stdout for become_daemon() via c84254d ctdb-daemon: Avoid unnecessarily spamming the logs when in test mode via 1bbc4fa ctdb-tools: Detect unknown node number via 0846940 ctdb-tests: README updates via 4f4a835 ctdb-tests: Remove export of CTDB_SOCKET via d246b1d ctdb-tests: Use path_socket() in dummy client via 3b1e597 ctdb-tests: Drop incorrect comment, unused function via 82e589e ctdb-tests: Drop setting of CTDB_SOCKET and CTDB_PIDFILE via d75fa2c ctdb-daemon: Drop unused function ctdb_set_socketname() via 5f478b7 ctdb-daemon: Use path functions for socket and PID file via cd02159 ctdb-tests: Use path_socket() in test client tools via cc3aedd ctdb-tools: Use path_socket() in ctdb tool via 3856678 ctdb-tests: Use ctdb-path for fake_ctdbd directory setup via d4a1f89 ctdb-tests: Use ctdb-path-like values for local daemons socket and PID file via 32c2ec8 ctdb-common: Allow path_socket() to use $CTDB_SOCKET from 2229f46 drs_utils: Avoid invalid dereference of v8 requests https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6e16e95f74c06bf381db666007a30ecb0e1ff7ce Author: Martin Schwenke Date: Thu Oct 18 18:02:13 2018 +1100 ctdb-daemon: Do not fork when CTDB_TEST_MODE is set Explicitly background ctdbd instead. This has the advantage of leaving stdin open. ctdbd can then be enhanced to exit when stdin closes, allowing better cleanup in a test environment. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Nov 6 10:30:14 CET 2018 on sn-devel-144 commit 01f6fbba4e5823f2cc028ba6f094b55812dff6ee Author: Martin Schwenke Date: Tue Nov 6 14:06:14 2018 +1100 ctdb-daemon: Switch interactive variable to a bool popt uses an int in place of a bool, so declare an extra int and make the conversion explicit. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 804bdf9719cdc128df7ba4dfe7564e5339426b35 Author: Martin Schwenke Date: Fri Oct 12 13:49:58 2018 +1100 ctdb-tests: Add local_daemons.sh onnode and socket commands These aren't used by simple tests but they will be useful for integrating ctdbd local daemons into other t
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 27df4f0 ctdb-recovery: Ban a node that causes recovery failure from 3338a3e traffic: Machine accounts were generated as critical objects https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 27df4f002a594dbb2f2a38afaccf3e22f19818e1 Author: Martin Schwenke Date: Mon Oct 29 14:33:08 2018 +1100 ctdb-recovery: Ban a node that causes recovery failure ... instead of applying banning credits. There have been a couple of cases where recovery repeatedly takes just over 2 minutes to fail. Therefore, banning credits expire between failures and a continuously problematic node is never banned, resulting in endless recoveries. This is because it takes 2 applications of banning credits before a node is banned, which generally involves 2 recovery failures. The recovery helper makes up to 3 attempts to recover each database during a single run. If a node causes 3 failures then this is really equivalent to 3 recovery failures in the model that existed before the recovery helper added retries. In that case the node would have been banned after 2 failures. So, instead of applying banning credits to the "most failing" node, simply ban it directly from the recovery helper. If multiple nodes are causing recovery failures then this can cause a node to be banned more quickly than it might otherwise have been, even pre-recovery-helper. However, 90 seconds (i.e. 3 failures) is a long time to be in recovery, so banning earlier seems like the best approach. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13670 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Nov 5 06:52:33 CET 2018 on sn-devel-144 --- Summary of changes: ctdb/server/ctdb_recovery_helper.c | 46 +- 1 file changed, 31 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_recovery_helper.c b/ctdb/server/ctdb_recovery_helper.c index 7495eb3..7fdcc2e 100644 --- a/ctdb/server/ctdb_recovery_helper.c +++ b/ctdb/server/ctdb_recovery_helper.c @@ -2571,22 +2571,28 @@ static void recovery_db_recovery_done(struct tevent_req *subreq) /* If pulling database fails multiple times */ if (max_credits >= NUM_RETRIES) { - struct ctdb_req_message message; - - D_ERR("Assigning banning credits to node %u\n", - max_pnn); - - message.srvid = CTDB_SRVID_BANNING; - message.data.pnn = max_pnn; - - subreq = ctdb_client_message_send( - state, state->ev, state->client, - ctdb_client_pnn(state->client), - ); + struct ctdb_ban_state ban_state = { + .pnn = max_pnn, + .time = state->tun_list->recovery_ban_period, + }; + + D_ERR("Banning node %u for %u seconds\n", + ban_state.pnn, + ban_state.time); + + ctdb_req_control_set_ban_state(, + _state); + subreq = ctdb_client_control_send(state, + state->ev, + state->client, + ban_state.pnn, + TIMEOUT(), + ); if (tevent_req_nomem(subreq, req)) { return; } - tevent_req_set_callback(subreq, recovery_failed_done, + tevent_req_set_callback(subreq, + recovery_failed_done, req); } else { tevent_req_error(req, EIO); @@ -2609,15 +2615,25 @@ static void recovery_failed_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); + struct recovery_state *state = tevent_req_data( + req, struct recovery_state); + struct ctdb_reply_control *reply; int ret; bool status; - status = ctdb_client_message_rec
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fbea9d3 ctdb-daemon: Fix valgrind hit in event code via a190960 ctdb-event: Check the return status of sock_daemon_set_startup_fd via 8054992 ctdb-common: Set close-on-exec for startup fd via c9e1603 ctdb-daemon: Exit if eventd goes away via a3d1225 ctdb-daemon: Return early when refusing to run an event script from d15a00b s3:smbcontrol: Simplify the return code check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fbea9d36996f248ba2b077f12ad16c199b853134 Author: Martin Schwenke Date: Wed Oct 17 17:19:06 2018 +1100 ctdb-daemon: Fix valgrind hit in event code ==25741== Syscall param write(buf) points to uninitialised byte(s) ==25741==at 0x4939291: write (write.c:27) ==25741==by 0x4868285: sys_write (sys_rw.c:68) ==25741==by 0x13915D: sock_queue_trigger (sock_io.c:316) ==25741==by 0x4DE6478: tevent_common_invoke_immediate_handler (in /usr/lib/x86_64-linux-gnu/libtevent.so.0.9.37) ==25741==by 0x4DE64A2: tevent_common_loop_immediate (in /usr/lib/x86_64-linux-gnu/libtevent.so.0.9.37) ==25741==by 0x4DEBE5A: ??? (in /usr/lib/x86_64-linux-gnu/libtevent.so.0.9.37) ==25741==by 0x4DEA2D6: ??? (in /usr/lib/x86_64-linux-gnu/libtevent.so.0.9.37) ==25741==by 0x4DE57E3: _tevent_loop_once (in /usr/lib/x86_64-linux-gnu/libtevent.so.0.9.37) ==25741==by 0x15D1BA: ctdb_event_script_args (eventscript.c:821) ==25741==by 0x13B437: ctdb_start_daemon (ctdb_daemon.c:1315) ==25741==by 0x110642: main (ctdbd.c:393) ==25741== Address 0x57888a4 is 100 bytes inside a block of size 144 alloc'd ==25741==at 0x48357BF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==25741==by 0x4B9B7C0: talloc_named_const (in /usr/lib/x86_64-linux-gnu/libtalloc.so.2.1.14) ==25741==by 0x15CCC6: eventd_client_write (eventscript.c:430) ==25741==by 0x15CCC6: eventd_client_run (eventscript.c:556) ==25741==by 0x15CCC6: ctdb_event_script_run (eventscript.c:649) ==25741==by 0x15D198: ctdb_event_script_args (eventscript.c:812) ==25741==by 0x13B437: ctdb_start_daemon (ctdb_daemon.c:1315) ==25741==by 0x110642: main (ctdbd.c:393) ==25741== BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Pair-programmed-with: Amitay Isaacs Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Oct 22 09:27:15 CEST 2018 on sn-devel-144 commit a1909603808b994b7822b697494e39e8da4aaa66 Author: Amitay Isaacs Date: Wed Oct 10 18:19:32 2018 +1100 ctdb-event: Check the return status of sock_daemon_set_startup_fd BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit 80549927bc1741a4b8af8b8e830de4d37fa0c4a8 Author: Amitay Isaacs Date: Wed Oct 10 18:16:33 2018 +1100 ctdb-common: Set close-on-exec for startup fd The startup_fd should not be propagated to the child processes created from a daemon. It should only be used in the daemon code to return the status of the startup. Another use of startup_fd is to notify the parent if the daemon process has exited. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke commit c9e1603a5d0c1a216439d4a2b0e7cdc05181e898 Author: Martin Schwenke Date: Thu Oct 11 11:26:06 2018 +1100 ctdb-daemon: Exit if eventd goes away ctdbd enters a broken state if eventd goes away. A clean shutdown is not possible because that involves running events. Restarting eventd is possible but this might mask a serious problem and it is possible that eventd might keep on disappearing. Just exit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a3d12252fa8e0a7e900b819dec30bdb9da458254 Author: Martin Schwenke Date: Wed Oct 10 13:35:00 2018 +1100 ctdb-daemon: Return early when refusing to run an event script BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/sock_daemon.c | 8 +++- ctdb/common/sock_daemon.h | 3 ++- ctdb/event/event_daemon.c | 7 ++- ctdb/server/eventscript.c | 12 4 files changed, 19 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c index 90f6bce..e5e16f8 100644 --- a/ctdb/common/sock_daemon.c +++ b/ctdb/common/sock_daemon.c @@ -523,9 +523,15
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 80f3f7c ctdb-tests: Improve counting of database records via 52dcecb ctdb-tests: Add extra debug to large database recovery test via d67d8ed ctdb-tests: Shut down transaction_loop clients more cleanly via 2aa006a ctdb-tools: Have onnode pass -n option even when regular ssh not in use via 6ac5124 ctdb-tests: Support closing of stdin in local daemons ssh stub via 0dfb3c8 ctdb-tests: Be more careful when building public IP addresses via 36eb738 ctdb-tests: Be more careful when building node addresses via 03dddc3 ctdb-tests: Don't format IPv4 octets as hex digits via 0eabac5 ctdb-tests: Be more efficient about starting/stopping local daemons via a9ac330 ctdb-tests: Do not use ctdbd_wrapper in local daemon tests via 8bde6fa ctdb-tests: Don't remove non-existent test database directory via f2e4a5e ctdb-tests: Drop unused function maybe_stop_ctdb() via 2cd6a00 ctdb-tests: Explicitly check for local daemons when shutting down via 90f6b0a ctdb-tests: Drop functions daemons_start(), daemons_stop() via f1ede41 ctdb-tests: Don't used daemons_start()/daemons_stop() directly in tests via 4642a34 ctdb-tests: Rename _ctdb_start_all() -> ctdb_start_all() via f57e5bb ctdb-tests: Rename ctdb_start_all() -> ctdb_init() via a66a969 ctdb-tests: Drop ps_ctdbd() via 83b3c56 ctdb-tests: Drop code for RECEIVE_RECORDS control via 2f89bd9 ctdb-protocol: Drop marshalling code for RECEIVE_RECORDS control via 81dae71 ctdb-protocol: Mark RECEIVE_RECORDS control obsolete via d18385e ctdb-daemon: Drop implementation of RECEIVE_RECORDS control via e15cdc6 ctdb-vacuum: Remove unnecessary check for zero records in delete list via ef05239 ctdb-vacuum: Fix the incorrect counting of remote errors via 202b902 ctdb-vacuum: Simplify the deletion of vacuumed records via dcc9935 ctdb-tests: Add recovery record resurrection test for volatile databases via c4ec99b ctdb-daemon: Invalidate records if a node becomes INACTIVE via 040401c ctdb-daemon: Don't pull any records if records are invalidated via 71896fd ctdb-daemon: Add invalid_records flag to ctdb_db_context from 6784ff2 ctdbd_conn: Generalise inaccurate error message https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 80f3f7c1889d225dcc1e7841e28e9a3f7918c99c Author: Martin Schwenke Date: Fri Oct 5 10:34:29 2018 +1000 ctdb-tests: Improve counting of database records Record counts are sometimes incomplete for large databases when relevant tests are run on a real cluster. This probably has something to do with ssh, pipes and buffering, so move the filtering and counting to the remote end. This means that only the count comes across the pipe, instead of all the record data. Instead of explicitly excluding the key for persistent database sequence numbers, just exclude any key starting with '_'. Such keys are not used in tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Oct 8 05:36:11 CEST 2018 on sn-devel-144 commit 52dcecbc923ec16e85f01f822b1450ab7b91900d Author: Martin Schwenke Date: Thu Oct 4 16:30:47 2018 +1000 ctdb-tests: Add extra debug to large database recovery test This test sometimes fails, probably because the test is flakey. Either the records aren't being added correctly or the counting of records loses records. Try to debug both possibilities. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d67d8ed44ac9beba7fdec0ceda56136f781fe19b Author: Martin Schwenke Date: Wed Oct 3 16:39:16 2018 +1000 ctdb-tests: Shut down transaction_loop clients more cleanly A transaction_loop client can exit with a transaction active when its time limit expires. This causes a recovery and causes problems with the test cleanup, which detects unwanted recoveries and fails. Set a flag when the time limit expires and exit cleanly before the next transaction is started. Pair-programmed-with: Amitay Isaacs Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 2aa006a31117769dd440661cf54394590c4b8f11 Author: Martin Schwenke Date: Wed Oct 3 19:13:57 2018 +1000 ctdb-tools: Have onnode pass -n option even when regular ssh not in use ONNODE_SSH is really a test hook, so it doesn't need to support completely random values. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 6ac5124b0117b7b5f3c5402934c93633ce186896 Author: Martin Schwenke Date: Sat Apr 14 21:27:20 2018 +1000 ctdb-tests: Support c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3903f6c ctdb-build: Fix version handling when building tarball from 0993141 smbd:vfs: fix mis-spellings of hierarchy in comments https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3903f6c365014af804066f916a27fa6d886846e3 Author: Martin Schwenke Date: Sun Sep 9 08:11:33 2018 +1000 ctdb-build: Fix version handling when building tarball Split get_version() into 2 functions, so that .distversion file can be created. Pair-programmed-with: Amitay Isaacs Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Sep 12 05:50:46 CEST 2018 on sn-devel-144 --- Summary of changes: ctdb/wscript | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/wscript b/ctdb/wscript index 06cc154..6d4fee5 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -64,12 +64,15 @@ manpages_ceph = [ VERSION = '' def get_version(): -if Context.g_module.VERSION: -return Context.g_module.VERSION import samba_version env = samba_utils.LOAD_ENVIRONMENT() -version = samba_version.samba_version_file('%s/VERSION' % vdir, vdir, env) +return samba_version.samba_version_file('%s/VERSION' % vdir, vdir, env) + +def get_version_string(): +if Context.g_module.VERSION: +return Context.g_module.VERSION +version = get_version() Context.g_module.VERSION = version.STRING.replace('-', '.') return Context.g_module.VERSION @@ -341,7 +344,7 @@ def gen_ctdb_version(task): fp.write('/* This file is auto-generated from waf */\n') fp.write('#include "version.h"\n') fp.write('\n') -fp.write('#define CTDB_VERSION_STRING "%s"\n' % get_version()) +fp.write('#define CTDB_VERSION_STRING "%s"\n' % get_version_string()) fp.close() @@ -357,7 +360,7 @@ def build(bld): target='include/ctdb_version.h', rule=gen_ctdb_version, dep_vars=['VERSION']) -t.env.VERSION = get_version() +t.env.VERSION = get_version_string() bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' @@ -1136,7 +1139,7 @@ def autotest(ctx): def show_version(ctx): -print get_version() +print get_version_string() def manpages(ctx): @@ -1162,6 +1165,8 @@ def manpages(ctx): def distonly(ctx): samba_dist.DIST_FILES('VERSION:VERSION', extend=True) +version = get_version() + distfile = file('.distversion', 'w') for field in version.vcs_fields: distfile.write('%s=%s\n' % (field, str(version.vcs_fields[field]))) @@ -1169,7 +1174,7 @@ def distonly(ctx): samba_dist.DIST_FILES('ctdb/.distversion:.distversion', extend=True) t = 'ctdb.spec' -sed_expr1 = 's/@VERSION@/%s/g' % get_version() +sed_expr1 = 's/@VERSION@/%s/g' % get_version_string() sed_expr2 = 's/@RELEASE@/%s/g' % '1' cmd = 'sed -e "%s" -e "%s" packaging/RPM/ctdb.spec.in > %s' % ( sed_expr1, sed_expr2, t) @@ -1195,7 +1200,8 @@ def dist(): def rpmonly(ctx): opts = os.getenv('RPM_OPTIONS') or '' -cmd = 'rpmbuild -ta --clean --rmsource %s ctdb-%s.tar.gz' % (opts, get_version()) +cmd = 'rpmbuild -ta --clean --rmsource %s ctdb-%s.tar.gz' % \ + (opts, get_version_string()) ret = samba_utils.RUN_COMMAND(cmd) if ret != 0: print('rpmbuild exited with exit status %d' % ret) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bc62182 ctdb-tests: Check result of write() in ARP and TCP tests from 05862b7 s4/selftest: enable samba4.schemaInfo.python for py3 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bc62182ff46023494f710a78d5a57a7baffa8780 Author: Martin Schwenke Date: Wed Sep 5 12:42:07 2018 +1000 ctdb-tests: Check result of write() in ARP and TCP tests CTDB -O3 --picky-developer build is failing. Not sure how this slipped through. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 6 08:33:59 CEST 2018 on sn-devel-144 --- Summary of changes: ctdb/tests/src/system_socket_test.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/src/system_socket_test.c b/ctdb/tests/src/system_socket_test.c index 6dd9e43..f7d0c7c 100644 --- a/ctdb/tests/src/system_socket_test.c +++ b/ctdb/tests/src/system_socket_test.c @@ -59,6 +59,7 @@ static void test_arp(const char *addr_str, const char *hwaddr_str, bool reply) uint8_t buf[512]; size_t buflen = sizeof(buf); size_t len; + ssize_t num_written; int ret; ret = ctdb_sock_addr_from_string(addr_str, , false); @@ -80,7 +81,8 @@ static void test_arp(const char *addr_str, const char *hwaddr_str, bool reply) assert(ret == 0); - write(STDOUT_FILENO, buf, len); + num_written = write(STDOUT_FILENO, buf, len); + assert(num_written == len); } #else /* HAVE_PACKETSOCKET */ @@ -104,6 +106,7 @@ static void test_tcp(const char *src_str, uint8_t buf[512]; struct ether_header *eth; size_t expected_len, len; + ssize_t num_written; char src_str_out[64], dst_str_out[64]; uint32_t seq_out, ack_out; int rst_out; @@ -156,7 +159,10 @@ static void test_tcp(const char *src_str, assert(ret == 0); assert(len == expected_len); - write(STDOUT_FILENO, buf + sizeof(struct ether_header), len); + num_written = write(STDOUT_FILENO, + buf + sizeof(struct ether_header), + len); + assert(num_written == len); switch (ntohs(eth->ether_type)) { case ETHERTYPE_IP: -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated
On Wed, Sep 5, 2018 at 6:52 PM, Amitay Isaacs wrote: > Hi Alexander, > > On Wed, Sep 5, 2018 at 6:41 PM, Alexander Bokovoy wrote: >> On ke, 05 syys 2018, Andrew Bartlett wrote: >>> The branch, master has been updated >>> >>> https://git.samba.org/?p=samba.git;a=shortlog;h=master >> Thank you, Andrew, for the reviews and persistent push to complete this! >> >> We are using WAF 2.x now which should allow us to concentrate on >> switching to Python 3 for the build process as well for all our >> libraries and components. >> >> If you see any build issues related to the WAF, please report them. >> Autobuild succeeded but we might still have pieces of Python code that >> aren't excercised through the autobuild targets. > > Great job updating to the latest waf. > > Now fixing all the corner cases... ;-) > Here's another one This time on AIX using xlc... $ ./configure --enable-developer Setting top to : /home/jenkins/workspace/samba-master/label/ppc64-aix7 Setting out to : /home/jenkins/workspace/samba-master/label/ppc64-aix7/ctdb/bin Checking for 'xlc' (C compiler) : Traceback (most recent call last): File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point run_commands() File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Scripting.py", line 251, in run_commands ctx = run_command(cmd_name) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Scripting.py", line 235, in run_command ctx.execute() File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Configure.py", line 159, in execute super(ConfigurationContext, self).execute() File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Context.py", line 204, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Context.py", line 286, in recurse user_function(self) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/ctdb/wscript", line 118, in configure conf.RECURSE('lib/replace') File "./../buildtools/wafsamba/samba_utils.py", line 30, in fun return f(*k, **kw) File "./../buildtools/wafsamba/samba_utils.py", line 433, in RECURSE return ctx.recurse(relpath) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Context.py", line 286, in recurse user_function(self) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Utils.py", line 816, in wrap ret = fun(*k) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/lib/replace/wscript", line 30, in configure conf.RECURSE('buildtools/wafsamba') File "./../buildtools/wafsamba/samba_utils.py", line 30, in fun return f(*k, **kw) File "./../buildtools/wafsamba/samba_utils.py", line 433, in RECURSE return ctx.recurse(relpath) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Context.py", line 286, in recurse user_function(self) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Utils.py", line 816, in wrap ret = fun(*k) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/buildtools/wafsamba/wscript", line 234, in configure conf.load('compiler_cc') File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Configure.py", line 270, in load func(self) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Tools/compiler_c.py", line 79, in configure conf.load(compiler) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Configure.py", line 270, in load func(self) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Tools/xlc.py", line 59, in configure conf.find_xlc() File "./../buildtools/wafsamba/samba_utils.py", line 30, in fun return f(*k, **kw) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Tools/xlc.py", line 17, in find_xlc conf.get_xlc_version(cc) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Configure.py", line 316, in fun return f(*k, **kw) File "/home/jenkins/workspace/samba-master/label/ppc64-aix7/third_party/waf/waflib/Tools/c_config.py", line 1097, in get_xlc_version cmd = cc + ['-qversion'] TypeError: unsupported operand type(s) for +: 'NoneType' and 'list' I don't have time to dig deeper this week. Will spend some time next week if this issue is not resolved by then. Amitay.
Re: [SCM] Samba Shared Repository - branch master updated
Hi Alexander, On Wed, Sep 5, 2018 at 6:41 PM, Alexander Bokovoy wrote: > On ke, 05 syys 2018, Andrew Bartlett wrote: >> The branch, master has been updated >>via 8de348e third_party: Import exact files from waf-2.0.8/waflib >>via 8f022a0 script/autobuild: Fix formatting in send_email >>via 67ed1ea script/autobuild: re-use CACHE_SUFFIX from waflib >>via 72c3ff9 buildtools/wafsamba: use CACHE_SUFFIX instead of a >> hard-coded name >>via 6fc9f1a lib/mscat: fix logging in wscript >>via 4c7c10b lib/audit_logging: update to waf 2.0 >>via f495f64 buildtools/wafsamba: remove ENFORCE_GROUP_ORDERING >>via 0a9d98b ctdb/wscript: rework how version number is retrieved >>via fdd89fe selftest/tests.py: update to support waf 2.0 >>via 72a9e6d wscript: port build_system_heimdal to waf 2.0 >>via 1efe689 wscript: port build_system_mitkrb5 to waf 2.0 >>via 7944ed6 buildtools/wafsamba: port stale_files to waf 2.0 >>via 2a3fcdf buildtools/wafsamba: generate build options output with >> waf 2.0 >>via 75d5bcb selftest/wscript: properly handle env.cwd which is a >> list, not a string >>via 31f8945 wafsamba: install Python modules back to bin/python, not >> bin/python_modules >>via 77f3a13 buildtools/wafsamba: use cflags instead of ccflags for >> waf 2.0 >>via 1d25ae5 buildtools/wafsamba: use context instead of options for >> cross-compile checks for waf 2.0 >>via aebcd69 buildtools/wafsamba: crosscompile should use >> Utils.subprocess in waf 2.0 >>via fb43723 buildtools/wafsamba: use top and out for waf 2.0 >>via 5c3d31e cdtb/wscript: use top and out for waf 2.0 >>via 699977a wscript: adopt to waf 2.0 >>via 0fdba4b buildtools/wafsamba: use top for waf 2.0 >>via cdda0d9 buildtools/wafsamba: change SAMBA_BUILD_ENV to use >> bldnode.abspath() >>via 35ebfd3 selftest/wscript: handle lists in environmental >> variables in waf >>via 2a63619 waf heimdal: use absolute path to compile_et >>via 1fdcbd0 wafsamba: use correct context for APPNAME >>via 850ceec buildtools/wafsamba: compile asn1 files by adding >> missing code from compat15 >>via 2e401d2 wscript: adopt to waf-2.0 >>via 175be93 ctdb/wscript: adopt to waf-2.0 >>via 7aaa1e6 buildtools/wafsamba/samba_abi: always_run helper was >> deprecated in waf 2.0 >>via 9f2f5b4 source3/libsmb/wscript: remove unneeded import >>via d00ba40 nsswitch/libwbclient/wscript: import from waflib >>via 944fce2 auth/wscript: import from waflib >>via 3fc4786 buildtools/wafsamba: add install_dir to build context >>via 69c655f buildtools/wafsamba: reduce imports >>via 7eab91a buildtools/wafsamba: adopt to waf 2.0.8 >>via 3b7dfc5 third_party/waf: upgrade to waf 2.0.8 >>via 79c4ba2 auth/wscript: fix options use >>via c5ab9ea heimdal wscript changes >>via ef4b2d4 wscript_configure_system_mitkrb5: update to handle waf >> 2.0.4 >>via e58ca30 wscript_build_embedded_heimdal: update to handle waf >> 2.0.4 >>via 1dc80eb wscript_build: update to handle waf 2.0.4 >>via c73b779 wscript: update to handle waf 2.0.4 >>via 0119a87 third_party/wscript: update to handle waf 2.0.4 >>via f14b8cb third_party/uid_wrapper/wscript: update to handle waf >> 2.0.4 >>via 051e7e7 third_party/socket_wrapper/wscript: update to handle waf >> 2.0.4 >>via 4c44153 third_party/resolv_wrapper/wscript: update to handle waf >> 2.0.4 >>via 7e2deed third_party/popt/wscript: update to handle waf 2.0.4 >>via 2847a38 third_party/pam_wrapper/wscript: update to handle waf >> 2.0.4 >>via 2b21e67 third_party/nss_wrapper/wscript: update to handle waf >> 2.0.4 >>via 3e71f06 third_party/cmocka/wscript: update to handle waf 2.0.4 >>via ba03d12 third_party/aesni-intel/wscript: update to handle waf >> 2.0.4 >>via ca5008a testsuite/headers/wscript_build: update to handle waf >> 2.0.4 >>via 0c423a3 source4/lib/tls/wscript: update to handle waf 2.0.4 >>via c797e92 source4/heimdal_build/wscript_configure: update to >> handle waf 2.0.4 >>via 055aae9 source4/heimdal_build/wscript_build: update to handle >> waf 2.0.4 >>via 029ac7d source4/dsdb/samdb/ldb_modules/wscript: update to handle >> waf 2.0.4 >>via 8b5ad02 source3/wscript_configure_system_ncurses: update to >> handle waf 2.0.4 >>via 91e099d source3/wscript: update to handle waf 2.0.4 >>via c898f18 source3/build/charset.py: update to handle waf 2.0.4 >>via 0de67cf selftest/wscript: update to handle waf 2.0.4 >>via fa1ca71 python/wscript: update to handle waf 2.0.4 >>via 7f6ce8f pidl/wscript: update to handle waf 2.0.4 >>via
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 30eb288 ctdb-tests: Don't run valgrind or other tracing in simple_test_command() via 8aacde3 ctdb-tests: Use known install paths in local daemon tests via eed738a ctdb-tests: If bin/ isn't in ctdb/ then look one level higher via 4f1727f ctdb-common: Process the whole config file even if an error occurs via 920ed66 ctdb-common: Avoid ENOENT for unknown conf options via f108440 ctdb-common: Avoid ENOENT for unknown conf type tags via a017d31 ctdb-common: Log a message when an invalid conf value is encountered via ebb28c5 ctdb-common: Log a message for unknown conf option via 421d828 ctdb-common: Fix log message for conf option with unknown section via b5453bc ctdb-daemon: Drop incorrect log message via 6d3d9a8 ctdb-daemon: Log complete eventd startup command from 74357bf selftest: Split up password_lockout into tests with and without a call to sleep() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 30eb28818d5fbbb35d0965a92f721243aca6ab54 Author: Martin Schwenke Date: Mon Aug 20 14:55:17 2018 +1000 ctdb-tests: Don't run valgrind or other tracing in simple_test_command() This function is used to run a extra command to check a result. This command is usually a script (often a stub) or an external command, so no need to trace it with valgrind or whatever else might be specified. In the worst case the command being run is a shell function, which valgrind won't be able to find. There is little use running the event script tests under valgrind. However, when the whole test suite is being run under valgrind then it should work. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Sep 3 14:04:00 CEST 2018 on sn-devel-144 commit 8aacde3c5d86d8a0216b3bba200a39ca9a561653 Author: Martin Schwenke Date: Thu Aug 30 09:37:53 2018 +1000 ctdb-tests: Use known install paths in local daemon tests The in-tree local daemons tests don't work from a top-level Samba compile. The simple test suite was the first test suite and things have generally worked, so it has been slow to adopt general test infrastructure changes. Instead of re-calculating script and helper locations, use the paths from script_install_paths.sh. The bin/ directory is already added to PATH in common.sh, so don't add it here. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit eed738a37a6f40ca259153979f364c17e77f52ea Author: Martin Schwenke Date: Thu Aug 30 09:35:58 2018 +1000 ctdb-tests: If bin/ isn't in ctdb/ then look one level higher CTDB's test suite doesn't work from a top-level compile. The first step to fixing this is to correctly locate the bin/ directory. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4f1727fe0bf2b0962a5d131d60a416b8f459ad94 Author: Martin Schwenke Date: Fri Aug 31 09:35:14 2018 +1000 ctdb-common: Process the whole config file even if an error occurs At the moment multiple errors will be encountered one at a time, on each load or validate. Instead, allow all configuration errors to printed in a single pass. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 920ed66ba7e874ca23d72fff9342fbd64a1e329f Author: Martin Schwenke Date: Fri Aug 31 08:42:04 2018 +1000 ctdb-common: Avoid ENOENT for unknown conf options Only use ENOENT for missing configuration file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f1084400387c0b1257b6d92ee6e8a89504d788fc Author: Martin Schwenke Date: Fri Aug 31 08:45:25 2018 +1000 ctdb-common: Avoid ENOENT for unknown conf type tags Only use ENOENT for missing configuration file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a017d3181ac1062b66ae506a8a523f7455630fce Author: Martin Schwenke Date: Fri Aug 31 09:34:12 2018 +1000 ctdb-common: Log a message when an invalid conf value is encountered BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit ebb28c57a1ea15afab63cd0742dd79b30ffe Author: Martin Schwenke Date: Fri Aug 31 08:32:12 2018 +1000 ctdb-common: Log a message for unknown conf option BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 58b8f2a ctdb-common: Clean up comments in TCP packet parsing via 53ceac9 ctdb-common: Check the version field in IPv6 packets via 924a655 ctdb-common: Improve TCP packet size and offset calculations via 43a2022 ctdb-tests: Extend TCP packet test to also do packet extraction via e2ac368 ctdb-common: Factor out TCP packet parsing code via 028fdc1 ctdb-common: Clean up types/declarations in TCP socket reading via cb4848e ctdb-common: Fix error handling when parsing TCP packets via f3a1f1e ctdb-common: Fix a bug in non-Linux (PCAP) TCP packet capturing via 0beb16f ctdb-common: Don't modify a const argument via 8fcf1af ctdb-common: Avoid magic numbers when building TCP packets via a02cba1 ctdb-tests: Add tests for TCP packet marshalling via d7d23e7 ctdb-common: Factor out TCP packet marshalling code via a678995 ctdb-common: Avoid single line multi-assignment via af5a42b ctdb-common: Set version more obviously in IPv6 NA packet via ca0db67 ctdb-common: Clarify offset and packet length calculations via 6b1e9a4 ctdb-common: Use struct ether_arp to avoid manual offset calculations via e2a00fe ctdb-common: Be more careful with packet sizes via 87088af ctdb-tests: Add tests for ARP and IPv6 NA marshalling via 39cfd51 ctdb-common: Separate ARP and IPv6 NA marshalling code via 50a6d15 ctdb-common: Fix error handling when sending ARPs via 2ebb25d ctdb-common: Factor out common ARP code via 172b87c ctdb-common: Initialise structures when declared via 0927b38 ctdb-tests: Add basic test to sanity check types in socket marshalling via 7c361f4 ctdb-common: Restore dropped copyright attributions via 0325934 ctdb-common: Fix CID 1414745 - Out-of-bounds access via b430a1a ctdb-daemon: Do not retry connection to eventd via 62ec1ab ctdb-daemon: Wait for eventd to be ready before connecting via c446ae5 ctdb-daemon: Open eventd pipe earlier via e357b62 ctdb-daemon: Improve error handling consistency via 11ee92d ctdb-event: Add support to eventd for the startup notification FD via dc6040c ctdb-common: Add support for sock daemon to notify of successful startup from 99d6237 pidl/tests: fix ndr_push_init_ctx() usage https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 58b8f2a31e30a9fe9180f3758acaebf7deffbd91 Author: Martin Schwenke Date: Fri Aug 17 21:33:39 2018 +1000 ctdb-common: Clean up comments in TCP packet parsing Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Aug 30 07:50:04 CEST 2018 on sn-devel-144 commit 53ceac9694f2f530e875ec56ec15867205ae088e Author: Martin Schwenke Date: Tue Aug 28 16:10:21 2018 +1000 ctdb-common: Check the version field in IPv6 packets Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 924a655b2a56edea66064dd1fdf67d9b7e093b64 Author: Martin Schwenke Date: Fri Aug 17 21:26:04 2018 +1000 ctdb-common: Improve TCP packet size and offset calculations The IPv4 check for short packets was strange. It appeared to ensure that the capture included everything up to and including the window size. The checksum field immediately follows the window size field, so just ensure that the packet is large enough to contain everything up to the start of the checksum. Add a similar check for IPv6 packets. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 43a2022596ed3bde1e2c833070b531a4b7289b84 Author: Martin Schwenke Date: Fri Aug 17 16:02:50 2018 +1000 ctdb-tests: Extend TCP packet test to also do packet extraction Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e2ac36867d616d06ac37498534ba89eb77f5d833 Author: Martin Schwenke Date: Fri Aug 17 15:00:31 2018 +1000 ctdb-common: Factor out TCP packet parsing code This can be tested separately. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 028fdc12e7399dae23fec20deb3ec0284f9d0ce2 Author: Martin Schwenke Date: Fri Aug 17 14:35:07 2018 +1000 ctdb-common: Clean up types/declarations in TCP socket reading Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit cb4848e35951d8dc232643b45116fb54655ffa30 Author: Martin Schwenke Date: Fri Aug 17 14:14:12 2018 +1000 ctdb-common: Fix error handling when parsing TCP packets Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit f3a1f1e1fa9a8a0fe6ffd3809a64d8185cb561b7 Author: Martin Schwenke Date: Fri Aug 17 15:36:41 2018 +1000 ctdb-common: Fix a bug in non-Linux (PCAP) TCP
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6fb80cb ctdb-tests: Check that no IPs are assigned when failover is disabled via 55893bf ctdb-tests: Add an extra conf loading test case via 78aad76 ctdb-doc: Switch tunable DisableIPFailover to a config option via 9296341 ctdb-config: Switch tunable DisableIPFailover to a config option via d003a41 ctdb-config: Integrate failover options into conf-tool via 893dd62 ctdb-failover: Add failover configuration options via 8e160d3 ctdb-tests: Drop DisableIPFailover simple test via 914e9f2 ctdb-daemon: Pass DisableIPFailover tunable via environment variable via 21de59a ctdb-common: Allow boolean configuration values to have yes/no values via a9758f4 ctdb-doc: Switch tunable TDBMutexEnabled to a config option via f42486e ctdb-config: Switch tunable TDBMutexEnabled to a config option via 8ddfc26 ctdb-doc: Add support for migrating tunables to ctdb.conf options via 43adcd7 ctdb-doc: Change option "no realtime" option to "realtime scheduling" via 17068e7 ctdb-config: Change option "no realtime" option to "realtime scheduling" via 64d4a7a ctdb-doc: Handle boolean options in config migration more carefully via d4afb60 ctdb-doc: Make config migration script notice removed CTDB_BASE option via 4833572 ctdb-common: Fix aliasing issue in IPv6 checksum from 0f3f63f PEP8: line up a couple of lists https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6fb80cbffb9cb8cba6abc3fbce228811d36e8c9a Author: Martin Schwenke Date: Fri Aug 24 17:37:38 2018 +1000 ctdb-tests: Check that no IPs are assigned when failover is disabled BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Aug 24 14:13:12 CEST 2018 on sn-devel-144 commit 55893bf8d2cc7e01b3a93d8e1fde16408244cb65 Author: Martin Schwenke Date: Tue Aug 21 06:55:33 2018 +1000 ctdb-tests: Add an extra conf loading test case This shows that config file loading continues in spite of unknown keys if ignore_unknown is true. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 78aad7623e100f05a7dfc142fba7ff2b0eba1913 Author: Martin Schwenke Date: Tue Aug 21 17:25:53 2018 +1000 ctdb-doc: Switch tunable DisableIPFailover to a config option BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 929634126a334e380f16c080b59d062873b4e5f9 Author: Martin Schwenke Date: Tue Aug 21 13:41:22 2018 +1000 ctdb-config: Switch tunable DisableIPFailover to a config option Use the "failover:disabled" option instead. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit d003a41a9cb9ea97a7da9dbb5bd3138f82da6cf1 Author: Martin Schwenke Date: Tue Aug 21 11:44:03 2018 +1000 ctdb-config: Integrate failover options into conf-tool Update and add tests accordingly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 893dd623dfdec4d5c5da07f933069e4534fe58ae Author: Martin Schwenke Date: Tue Aug 21 11:30:39 2018 +1000 ctdb-failover: Add failover configuration options Only a "disabled" option for now. Not documented because it isn't used yet. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8e160d331aaccd64b1a767c0bde9e310c80afe06 Author: Martin Schwenke Date: Tue Aug 21 11:18:34 2018 +1000 ctdb-tests: Drop DisableIPFailover simple test This is about to become a config file option that can't be dynamically changed at run-time, so drop this test for now. This test will be added once the tunable becomes a config file option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 914e9f22d85b9274871b7c7d5486354928080e51 Author: Martin Schwenke Date: Tue Aug 21 09:36:00 2018 +1000 ctdb-daemon: Pass DisableIPFailover tunable via environment variable Preparation for obsoleting this tunable. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 21de59ab7fe53240380b9a9a5b32d5af32d34237 Author: Martin Schwenke Date: Mon Aug 20 13:43:38 2018 +1000 ctdb-comm
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f7b2e5e ctdb-eventd: Fix CID 1438155 via 33d012c ctdb: Fix a cut error from e053aad s3/utils: fix regression where specifying -Unetbios/root works https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f7b2e5eec5ba1fa5f26694e6555a98cab0594a27 Author: Amitay Isaacs Date: Tue Jul 31 17:44:25 2018 +1000 ctdb-eventd: Fix CID 1438155 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13554 Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Aug 3 11:14:01 CEST 2018 on sn-devel-144 commit 33d012c3cebb5625e02450ac3b08c4245a3e985d Author: Volker Lendecke Date: Tue Jul 31 21:53:39 2018 +0200 ctdb: Fix a cut error BUG: https://bugzilla.samba.org/show_bug.cgi?id=13554 Signed-off-by: Volker Lendecke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/path.c | 2 +- ctdb/event/event_tool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/path.c b/ctdb/common/path.c index 36706e4..1656646 100644 --- a/ctdb/common/path.c +++ b/ctdb/common/path.c @@ -149,7 +149,7 @@ const char *path_vardir(void) { bool ok; - if (! ctdb_paths.rundir_set) { + if (! ctdb_paths.vardir_set) { ok = path_construct(ctdb_paths.vardir, "var"); if (!ok) { D_ERR("Failed to construct VARDIR\n"); diff --git a/ctdb/event/event_tool.c b/ctdb/event/event_tool.c index 4768c67..f18deb8 100644 --- a/ctdb/event/event_tool.c +++ b/ctdb/event/event_tool.c @@ -320,7 +320,7 @@ static int event_command_script_list(TALLOC_CTX *mem_ctx, subdir = talloc_asprintf(mem_ctx, "events/%s", argv[0]); if (subdir == NULL) { - ret = ENOMEM; + return ENOMEM; } data_dir = path_datadir_append(mem_ctx, subdir); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e3ce1a2 ctdb-docs: Update documentation for "ctdb event" command via 5017325 ctdb-event: Implement event tool "script list" command via 295826f ctdb-event: Change event-tool script enable/disable to chmod file directly via 82e6248 ctdb-common: Use script abstraction in run_event via a7a4ee4 ctdb-common: Factor out basic script abstraction via 56e248d ctdb-event: Fix "ctdb event status" usage message from a44e698 ctdb-docs: Replace obsolete reference to CTDB_DEBUG_HUNG_SCRIPT option https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e3ce1a2dfc4cbba4bf22381b91e9a14c8f240f5d Author: Martin Schwenke Date: Mon Jul 23 14:07:08 2018 +1000 ctdb-docs: Update documentation for "ctdb event" command BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Sat Jul 28 20:03:52 CEST 2018 on sn-devel-144 commit 5017325c2ef84b10ccd23328f5d62ac5b246bbb3 Author: Martin Schwenke Date: Thu Jul 12 13:47:51 2018 +1000 ctdb-event: Implement event tool "script list" command BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 295826f1b83b6e59d24e4da43b290242c17f44af Author: Martin Schwenke Date: Thu Jul 12 13:27:16 2018 +1000 ctdb-event: Change event-tool script enable/disable to chmod file directly They no longer go over the socket to eventd to enable and disable scripts. Use the event script abstraction to chmod them directly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 82e62488027302e541739628210292c2d95717e1 Author: Martin Schwenke Date: Thu Jul 12 13:26:27 2018 +1000 ctdb-common: Use script abstraction in run_event BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a7a4ee439dc1cf262b4da9fbcb38a2f69c62744c Author: Martin Schwenke Date: Thu Jul 12 13:20:55 2018 +1000 ctdb-common: Factor out basic script abstraction Provides for listing of scripts and chmod enable/disable. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 56e248de6072063308786ea83282aaecc8d7e62a Author: Martin Schwenke Date: Thu Jul 12 10:44:20 2018 +1000 ctdb-event: Fix "ctdb event status" usage message BUG: https://bugzilla.samba.org/show_bug.cgi?id=13551 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/event_script.c | 246 + ctdb/common/event_script.h | 72 ++ ctdb/common/run_event.c| 217 +- ctdb/doc/ctdb.1.xml| 95 ctdb/event/event_tool.c| 228 --- ctdb/tests/cunit/event_script_test_001.sh | 125 +++ .../01.disabled.script => data/03.notalink.script} | 1 - .../data/{01.dummy.script => 02.disabled.script} | 0 .../etc-ctdb/{ => share}/events/empty/README | 0 .../{ => share}/events/random/01.disabled.script | 0 .../{ => share}/events/random/02.enabled.script| 0 .../{ => share}/events/random/README.script| 0 .../etc-ctdb/{ => share}/events/random/a.script| 0 ctdb/tests/eventd/eventd_001.sh| 5 + ctdb/tests/eventd/eventd_002.sh| 2 + ctdb/tests/eventd/eventd_003.sh| 9 + ctdb/tests/eventd/eventd_009.sh| 116 ++ ctdb/tests/src/event_script_test.c | 119 ++ ctdb/tests/src/run_event_test.c| 1 + ctdb/wscript | 4 +- 20 files changed, 1000 insertions(+), 240 deletions(-) create mode 100644 ctdb/common/event_script.c create mode 100644 ctdb/common/event_script.h create mode 100755 ctdb/tests/cunit/event_script_test_001.sh copy ctdb/tests/eventd/etc-ctdb/events/{random/01.disabled.script => data/03.notalink.script} (94%) copy ctdb/tests/eventd/etc-ctdb/share/events/data/{01.dummy.script => 02.disabled.script} (100%) copy ctdb/tests/eventd/etc-ctdb/{ => share}/events/empty/README (100%) copy ctdb/tests/eventd/etc-ctdb/{ => share}/events/random/01.disabled.script (100%) copy ctdb/tests/eventd/etc-ctdb/{ => sh
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e7ef0c9 ctdb-common: Drop unused function mkdir_p_or_die() via 77242e7 ctdb-common: Drop function parse_ip_mask() and supporting functions via b1fed7e ctdb-daemon: Switch to using ctdb_sock_addr_mask_from_string() via efaa769 ctdb-tools: Switch to using ctdb_sock_addr_mask_from_string() via 4a1fb72 ctdb-protocol: Add function ctdb_sock_addr_mask_from_string() via 3b56f20 ctdb-protocol: Fix compilation issue with strncpy() via 5dd84bf ctdb-common: Fix compilation issue with strncpy() from 2dffcde smbd: Remove "share_mode_entry->lease" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e7ef0c97e981ff6097eeca5b7ecf5136955b23fe Author: Martin Schwenke Date: Fri Jun 8 18:48:07 2018 +1000 ctdb-common: Drop unused function mkdir_p_or_die() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jul 27 08:42:20 CEST 2018 on sn-devel-144 commit 77242e7631514b80a84146b2f4f232dab28d978b Author: Martin Schwenke Date: Fri Jun 8 07:33:32 2018 +1000 ctdb-common: Drop function parse_ip_mask() and supporting functions Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b1fed7e14c7e2bdfa88f8e502d5256c555dcae90 Author: Martin Schwenke Date: Fri Jun 8 07:27:07 2018 +1000 ctdb-daemon: Switch to using ctdb_sock_addr_mask_from_string() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit efaa7690d01faa1f24c21920666f644c9d42ca11 Author: Martin Schwenke Date: Fri Jun 8 07:26:51 2018 +1000 ctdb-tools: Switch to using ctdb_sock_addr_mask_from_string() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4a1fb7296ca1c32fbb85ade2d5f104690b83929b Author: Martin Schwenke Date: Fri Jun 8 07:13:25 2018 +1000 ctdb-protocol: Add function ctdb_sock_addr_mask_from_string() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3b56f2002a35b55b46958178c79aee519f0c5880 Author: Martin Schwenke Date: Thu Jul 26 11:01:30 2018 +1000 ctdb-protocol: Fix compilation issue with strncpy() When configured with --picky-developer and using -O3 with gcc 8.1: ../protocol/protocol_util.c: In function ‘ctdb_sock_addr_from_string’: ../protocol/protocol_util.c:282:2: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] strncpy(s, str, len+1); ^~ ../protocol/protocol_util.c:277:8: note: length computed here len = strlen(str); ^~~ Use strlcpy() instead and check the result. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13545 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 5dd84bf5d73e4afab094834bc317da7884b9b9b3 Author: Martin Schwenke Date: Thu Jul 26 11:00:28 2018 +1000 ctdb-common: Fix compilation issue with strncpy() When configured with --picky-developer and using -O3 with gcc 8.1: ../common/system_socket.c: In function ‘parse_ip_mask’: ../common/system_socket.c:229:2: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] strncpy(s, str, len+1); ^~ ../common/system_socket.c:223:8: note: length computed here len = strlen(str); ^~~ Use strlcpy() instead and check the result. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13545 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/common/system.c| 14 ctdb/common/system.h| 2 - ctdb/common/system_socket.c | 137 ctdb/common/system_socket.h | 5 -- ctdb/protocol/protocol_util.c | 45 +++- ctdb/protocol/protocol_util.h | 3 + ctdb/server/ctdb_takeover.c | 17 - ctdb/tests/src/protocol_util_test.c | 35 + ctdb/tools/ctdb.c | 3 +- 9 files changed, 97 insertions(+), 164 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/system.c b/ctdb/common/system.c index a95f314..51149ed 100644 --- a/ctdb/common/system.c +++ b/ctdb/common/system.c @@ -143,20 +143,6 @@ void lockdown_memory(bool valgrinding) #endif } -void mkdir_p_or_die(const char *dir, int mode) -{ - int ret; - - ret = mkdir_p(dir, mode); - if (ret != 0) { - DEBUG(DEBUG_ALERT, - ("ctdb exiting with error: " - "failed to create directory \"%s\" (%s)\n",
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 359e521 ctdb-tests: Loosen match against pstree output in simple test via da115ef ctdb-tests: Simplify pstree output in eventd unit tests from 7b0c1f8 dsdb: Fix the 32-bit build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 359e52187fbc9b5f94570ff8d12607b4fc42e4f2 Author: Martin Schwenke Date: Wed Jul 18 15:24:05 2018 +1000 ctdb-tests: Loosen match against pstree output in simple test As per previous commit, pstree can truncate output if it gets too wide. Instead of matching against the script's full path and arguments, just match against the script name. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13531 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jul 18 14:53:39 CEST 2018 on sn-devel-144 commit da115efd2b89e10767e9bec7343dce65ffd3c68b Author: Martin Schwenke Date: Wed Jul 18 12:01:27 2018 +1000 ctdb-tests: Simplify pstree output in eventd unit tests pstree truncates output when it exceeds a maximum width - the default is 132 columns. A couple of recent commits (12fd8d7a5c5d14d403aac6cd9e318afcd0a8e159, b23f3f996038626f618c5b5aa552686c1b852f44) lengthened the command string in the output so that it is more likely to exceed this limit and be truncated, as below: == Running "cat /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/debug_script.log" -- Output (Exit status: 0): -- 02.enabled.scri,PID /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/events/random/02.enabled.script ... `-sleep,PID 99 01.disabled DISABLED 02.enabled TIMEDOUT DATETIME OUTPUT: Sleeping for 99 seconds -- Required output (Exit status: 0): -- 02.enabled.scri,PID /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/events/random/02.enabled.script verbosetimeout `-sleep,PID 99 01.disabled DISABLED 02.enabled TIMEDOUT DATETIME OUTPUT: Sleeping for 99 seconds FAILED It isn't clear that the above example exceeds 132 characters, given that the PID has been filtered into a fixed string, but it certainly goes close. Whether or not it is truncated probably depends on the width of the PID in the unfiltered output. This would explain why the test flaps. Avoid the output truncation by dropping the -a and -p options to simplify the pstree output. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13531 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tests/eventd/etc-ctdb/debug-script.sh | 2 +- ctdb/tests/eventd/eventd_022.sh| 3 +-- ctdb/tests/eventd/eventd_024.sh| 2 +- ctdb/tests/simple/90_debug_hung_script.sh | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/eventd/etc-ctdb/debug-script.sh b/ctdb/tests/eventd/etc-ctdb/debug-script.sh index 04618cf..47c75a7 100755 --- a/ctdb/tests/eventd/etc-ctdb/debug-script.sh +++ b/ctdb/tests/eventd/etc-ctdb/debug-script.sh @@ -8,7 +8,7 @@ case "$2" in ;; "verbosetimeout") - (pstree -p -a $1 ; ctdb-event status random $2) > "$log" + (pstree $1 ; ctdb-event status random $2) > "$log" ;; "verbosetimeout2") diff --git a/ctdb/tests/eventd/eventd_022.sh b/ctdb/tests/eventd/eventd_022.sh index b71f7c3..dc9455a 100755 --- a/ctdb/tests/eventd/eventd_022.sh +++ b/ctdb/tests/eventd/eventd_022.sh @@ -15,8 +15,7 @@ simple_test run 5 random verbosetimeout sleep 5 ok <] .*sleep+.* -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4628afa ctdb-scripts: Provide a gstack function if gstack is not available via 451c6b6 ctdb-tests: Drop residual CTDB_MANAGED_ variables via e081caf ctdb-scripts: Drop event script CTDB_MANAGED_ variables via c08c95c ctdb-tests: Drop event script tests where CTDB_MANAGED_=no via a757e07 ctdb-tests: Ensure some event scripts are enabled for cluster tests via 8fe6a02 ctdb-packaging: Enable some standard event scripts if none are enabled via 0937ce0 ctdb-build: Enable some standard event scripts if none are enabled via 06be1c8 ctdb-build: Install event scripts in CTDB_DATADIR via a3610d1 ctdb-tests: Clean up define_test() for event scripts via f029e2a ctdb-tests: Drop an unused case via 19071ac ctdb-tests: New install path CTDB_SCRIPT_DATA_DIR via 15c6552 ctdb-tools: All ctdb event commands to run without ctdbd via 2546c43 ctdb-event: Allow tool to enable/disable scripts without daemon via 6742bf6 ctdb-event: Update event tool to handle symbolic links via 3bebc5d ctdb-common: Add path support for datadir via be1c340 ctdb-build: Add CTDB_DATADIR via 7c4848a ctdb-daemon: Drop the noiphost "node flags" bitmap via 709ef6b7 ctdb-daemon: Stop inactive/disabled nodes from reporting available IPs via fda0591 ctdb-daemon: Drop plumbing for obsolete tunable NoIPHostOnAllDisabled via 070469b ctdb-daemon: Mark NoIPHostOnAllDisabled tunable as obsolete via d0739b2 ctdb-daemon: Change default for tunable NoIPHostOnAllDisabled to 1 via b20c917 ctdb-tests: Setup public addresses in 60.nfs unit tests via 1061f48 ctdb-tests: Replace hardcoded IP address in test results from 094c239 WHATSNEW: Add more text about work done by Catalyst developers https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4628afa3f563924434ccae9918cf60778b8ab91f Author: Martin Schwenke Date: Sat Dec 2 20:06:25 2017 +1100 ctdb-scripts: Provide a gstack function if gstack is not available gstack isn't widely available, so provide a simple function that does the same thing if it gstack can't be found. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jul 11 14:47:21 CEST 2018 on sn-devel-144 commit 451c6b668fb076eb0bb99ad70cf1546c4450cc5d Author: Martin Schwenke Date: Sat Jul 7 20:16:42 2018 +1000 ctdb-tests: Drop residual CTDB_MANAGED_ variables These no longer do anything. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit e081cafc9c4fcf5c8cfc0032e3c73eb145a09a9e Author: Martin Schwenke Date: Sat Jul 7 20:06:47 2018 +1000 ctdb-scripts: Drop event script CTDB_MANAGED_ variables Enable required event scripts to manage services. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit c08c95c9e5b091bf77ff6e8ced0a7bf1e0e82f74 Author: Martin Schwenke Date: Sat Jul 7 19:58:38 2018 +1000 ctdb-tests: Drop event script tests where CTDB_MANAGED_=no Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit a757e07600d38692c600847d8a169936a7268f4b Author: Martin Schwenke Date: Sat Jul 7 22:07:54 2018 +1000 ctdb-tests: Ensure some event scripts are enabled for cluster tests Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 8fe6a0274bdd1f40f2c38462f23ca876807f6fd9 Author: Martin Schwenke Date: Sat Jul 7 15:58:06 2018 +1000 ctdb-packaging: Enable some standard event scripts if none are enabled CTDB needs the legacy/00.ctdb event script to be able to function properly. If this script is not enabled then assume a first-time install or an upgrade to a version that requires events scripts to be enabled via symlinks. In these cases enable this script and other commonly used scripts. Remove links during uninstall (but not during upgrade). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 0937ce04222ee726a2ca7d87e3b2bf176b883340 Author: Martin Schwenke Date: Sat Jul 7 15:23:27 2018 +1000 ctdb-build: Enable some standard event scripts if none are enabled CTDB needs the legacy/00.ctdb event script to be able to function properly. If this script is not enabled then assume a first-time install or an upgrade to a version that requires events scripts to be enabled via symlinks. In these cases enable this script and other commonly used scripts. Only do this for a direct install. If DESTDIR is being used then assume a package is being built and let the packager handle this case. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaac
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b6b1226 ctdb: Improve robust mutex test from 396f123 README.Coding: Fix link to Python coding style guide (PEP 8) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b6b1226d394445c21e01fdf3010642c85dbe85dd Author: Carlos O'Donell Date: Fri Jun 15 13:32:46 2018 +0200 ctdb: Improve robust mutex test This avoids some of the undefined behaviour, like initializing the same mutex twice which happens when the low and high priority processes start (both do the initialization and that's dangerous.) Instead now we start an "init" process to start the shared memory segment, and then everything else just uses it without truncation or unlinking (same mutex). Signed-off-by: Carlos O'Donell Reviewed-by: Andreas Schneider Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jun 29 06:47:00 CEST 2018 on sn-devel-144 --- Summary of changes: ctdb/tests/src/test_mutex_raw.c | 483 +++- 1 file changed, 333 insertions(+), 150 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c index ab7aff9..926a525 100644 --- a/ctdb/tests/src/test_mutex_raw.c +++ b/ctdb/tests/src/test_mutex_raw.c @@ -1,251 +1,434 @@ /* - Robust mutex test - - Copyright (C) Amitay Isaacs 2016 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. -*/ + * Test the system robust mutex implementation + * + * Copyright (C) 2016 Amitay Isaacs + * Copyright (C) 2018 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ /* - * Run this test as follows: + * To run the test do the following: + * + * (a) Compile the test. + * + * gcc -O2 -g3 -o test-robust-mutex test-robust-mutex.c -lpthread * - * 1. Running all processes at normal priority + * (b) Start the "init" process. * - * $ while true ; do ./bin/test_mutex_raw /tmp/foo 10 0 ; done + * ./test-robust-mutex /tmp/shared-mutex init * - * 2. Running all processes at real-time priority + * (c) Start any number of "worker" instances. * - * # while true ; do ./bin/test_mutex_raw /tmp/foo 10 1 ; done + * ./test-robust-mutex worker <#> * - * The test will block after few iterations. At this time none of the - * child processes is holding the mutex. + * e.g. /tmp/shared-mutex. * - * To check which process is holding a lock: + * <#> : Number of children processes. * - * $ ./bin/test_mutex_raw /tmp/foo debug + * : 0 - Normal, 1 - Realtime, 2 - Nice 20. * - * If no pid is printed, then no process is holding the mutex. + *For example: + * + * As non-root: + * + * $ while true ; do ./test-robust-mutex /tmp/foo worker 10 0 ; done; + * + * As root: + * + * while true ; do ./test-robust-mutex /tmp/foo worker 10 1 ; done; + * + *This creates 20 processes, 10 at normal priority and 10 at realtime + *priority, all taking the lock, being killed and recovering the lock. + * + * If while runnig (c) the processes block, it might mean that a futex wakeup + * was lost, or that the handoff of EOWNERDEAD did not happen correctly. In + * either case you can debug the resulting mutex like this: + * + * $ ./test-robust-mutex /tmp/shared-mutex debug + * + * This prints the PID of the process holding the mutex or nothing if + * the value was cleared by the kernel and now no process holds the mutex. */ -#include "replace.h" -#include "system/filesys.h&qu
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f2e8ab3 ctdb-tests: Continue running if a testcase is not executable via f1d0790 Revert "ctdb-tests: Continue running if a testcase is not executable" via 4bdf97a ctdb-scripts: Change directory for notifications to events/notification via b23f3f99 ctdb-scripts: Event scripts must end with ".script" suffix via 12fd8d7 ctdb-scripts: Move event scripts to events/legacy/ directory from 0f5d93a dsdb: Honour LDB_FLG_NOSYNC for metadata.tdb https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f2e8ab3f02aab7e2550409762800befa4b55cb69 Author: Martin Schwenke Date: Fri May 18 11:44:11 2018 +1000 ctdb-tests: Continue running if a testcase is not executable Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Jun 5 20:37:15 CEST 2018 on sn-devel-144 commit f1d07908e2516e2968c6653d5998b34a42979548 Author: Martin Schwenke Date: Fri May 18 11:39:49 2018 +1000 Revert "ctdb-tests: Continue running if a testcase is not executable" This reverts commit 36e7043fb16ac996793545022147f696caedee9c. An recent change broke this and I forgot to test before posting. :-( Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 4bdf97a935d19454fbd544616640a22f2bafe55f Author: Martin Schwenke Date: Wed May 16 12:18:46 2018 +1000 ctdb-scripts: Change directory for notifications to events/notification Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit b23f3f996038626f618c5b5aa552686c1b852f44 Author: Martin Schwenke Date: Tue May 15 18:36:29 2018 +1000 ctdb-scripts: Event scripts must end with ".script" suffix Preparation for recommending configuration for each script next to the actual script. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 12fd8d7a5c5d14d403aac6cd9e318afcd0a8e159 Author: Martin Schwenke Date: Tue May 15 13:39:15 2018 +1000 ctdb-scripts: Move event scripts to events/legacy/ directory This is the initial location that will be used by the new multi-component aware event daemon. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/.gitignore| 1 - ctdb/common/run_event.c| 56 ++ ctdb/config/README | 4 +- ctdb/config/{events.d => events}/README| 5 +- .../00.ctdb => events/legacy/00.ctdb.script} | 0 .../01.reclock => events/legacy/01.reclock.script} | 0 .../05.system => events/legacy/05.system.script} | 0 .../06.nfs => events/legacy/06.nfs.script} | 0 .../legacy/10.interface.script}| 0 .../11.natgw => events/legacy/11.natgw.script} | 0 .../11.routing => events/legacy/11.routing.script} | 0 .../legacy/13.per_ip_routing.script} | 0 .../legacy/20.multipathd.script} | 0 .../31.clamd => events/legacy/31.clamd.script} | 0 .../40.vsftpd => events/legacy/40.vsftpd.script} | 0 .../41.httpd => events/legacy/41.httpd.script} | 0 .../49.winbind => events/legacy/49.winbind.script} | 0 .../50.samba => events/legacy/50.samba.script} | 0 .../60.nfs => events/legacy/60.nfs.script} | 0 .../70.iscsi => events/legacy/70.iscsi.script} | 0 .../91.lvs => events/legacy/91.lvs.script} | 0 .../99.timeout => events/legacy/99.timeout.script} | 0 ctdb/config/functions | 2 +- .../{notify.d.README => notification.README} | 8 ++-- ctdb/config/notify.sh | 11 ++--- ctdb/doc/ctdb.7.xml| 7 +-- ctdb/packaging/RPM/ctdb.spec.in| 18 --- ctdb/server/ctdbd.c| 2 +- ctdb/tests/complex/90_debug_hung_script.sh | 2 +- ctdb/tests/cunit/run_event_001.sh | 37 -- ctdb/tests/eventd/eventd_002.sh| 8 ++-- ctdb/tests/eventd/eventd_003.sh| 2 +- ctdb/tests/eventd/eventd_004.sh| 2 +- ctdb/tests/eventd/eventd_005.sh| 4 +- ctdb/tests/eventd/eventd_006.sh| 4 +- ctdb/tests/eventd/eventd_007.sh| 4 +- ctdb/tests/eventd/eventd_011.sh| 4 +- ctdb/tests/eventd/eventd_012.sh| 4 +- ctdb/tests/eventd/eventd_013.sh| 4 +- ctdb/tests/eventd/eventd_014.sh| 4 +-
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2064401 ctdb-docs: Update reference to lmaster/recmaster capability options from 44f3bf1 s3: VFS: Remove unused enum value. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 20644011ab095a987cdeeaba953992f308175e58 Author: Martin Schwenke Date: Mon Jun 4 15:13:59 2018 +1000 ctdb-docs: Update reference to lmaster/recmaster capability options Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Jun 4 12:37:39 CEST 2018 on sn-devel-144 --- Summary of changes: ctdb/doc/ctdb.7.xml | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index 6902e57..ac5 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -1035,11 +1035,13 @@ correct CIFS semantics to clients. - To activate a node as being a remote cluster node you need to set - the following two parameters in /etc/sysconfig/ctdb for the remote node: + To activate a node as being a remote cluster node you need to + set the following two parameters in + /usr/local/etc/ctdb/ctdb.conf for the remote node: -CTDB_CAPABILITY_LMASTER=no -CTDB_CAPABILITY_RECMASTER=no +[legacy] + lmaster capability = false + recmaster capability = false -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7049b21 socket_wrapper: Add missing dependency on tirpc from 20fda4f auth: Use DBGC_AUTH as DBGC_CLASS for AD DC auth session code. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7049b2153b08152f03a0fcbb1817b430fe0a8451 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon May 14 16:52:58 2018 +1000 socket_wrapper: Add missing dependency on tirpc Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Tue May 22 13:57:07 CEST 2018 on sn-devel-144 --- Summary of changes: third_party/socket_wrapper/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/third_party/socket_wrapper/wscript b/third_party/socket_wrapper/wscript index 1693b44..86c9b3b 100644 --- a/third_party/socket_wrapper/wscript +++ b/third_party/socket_wrapper/wscript @@ -109,6 +109,6 @@ def build(bld): # breaks preloading! bld.SAMBA_LIBRARY('socket_wrapper', source='socket_wrapper.c', - deps='dl pthread', + deps='dl pthread tirpc', install=False, realname='libsocket-wrapper.so') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 87284da ctdb: Drop configuration file ctdbd.conf via b184761 ctdb-tests: Switch local daemons to use new style configuration file via 1aa17eb ctdb-config: Add default ctdb.conf file via bd58f7a ctdb-docs: Add example configuration files via 409b0b7 ctdb-docs: Add ctdb.conf(5) cross references and documentation tweaks via 72ba7ea ctdb-docs: Add ctdb.conf(5) via 60811d6 ctdb-tests: Clean up tests to not expose script options via 9b09943 ctdb-scripts: Fetch recovery lock option from config file in 01.reclock via 2bc6be1 ctdb-scripts: Fetch database options from config file in scripts via 16aa9e7 ctdb-scripts: Add function ctdb_get_db_options() via ad82b8a ctdb-tests: Add ctdb-config wrapper stub for event script tests via 7c33f5e ctdb-tests: Add setup of ctdb.conf recovery lock setting via ff3d0e7 ctdb-tests: Add setup of ctdb.conf database directory settings via 25f05ce ctdb-tests: Add new variable CTDB_SCRIPTS_HELPER_BINDIR via 78fbbfa ctdb-daemon: Drop most ctdbd command-line options via 4e06610 ctdb-scripts: Translate old style options into new configuration file via 61e288a ctdb-daemon: Integrate configuration file handling via 239f189 ctdb-daemon: Implement ctdb configuration file loading via b42dbad ctdb-tools: Add legacy config options to config tool via d91b9b3 ctdb-daemon: Define ctdbd legacy configuration file options via 65d9d1e ctdb-tools: Add database config options to config tool via 52d2701 ctdb-database: Define database configuration file options via dbdd49d ctdb-tools: Add cluster config options to config tool via cf17a48 ctdb-cluster: Define cluster configuration file options via 5eec5e7 ctdb-tools: Add event daemon config options to config tool via 8831f67 ctdb-event: Add event daemon config file options via 920f834 ctdb-daemon: Drop ctdbd --max-persistent-check-errors option via 61efed5 ctdb-scripts: Drop CTDB_MAX_PERSISTENT_CHECK_ERRORS option via 9193a10 ctdb-daemon: Do not create database directories via 344e6ee ctdb-tests: Create database directories for local daemons via 31747da ctdb-build: Create database directories during installation from c83dad5 s4:torture: Do not leak file descriptor in smb2 oplock test https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 87284da7a28172b40504eb50510a8b57da6692a6 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 15:55:11 2018 +1000 ctdb: Drop configuration file ctdbd.conf Drop function loadconfig(), replacing uses with "load_system_config ctdb". Drop translation of old-style configuration to new configuration file. Drop export of debugging variables. Drop documentation and configuration examples. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Thu May 17 07:03:04 CEST 2018 on sn-devel-144 commit b184761829dc291cbed696084c271316dca79607 Author: Martin Schwenke <mar...@meltin.net> Date: Fri Apr 13 19:25:56 2018 +1000 ctdb-tests: Switch local daemons to use new style configuration file Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 1aa17eb44774686967b55d3bd19c5464666b Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 19:58:23 2018 +1000 ctdb-config: Add default ctdb.conf file Install it in RPM. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit bd58f7af40f6456555897a87d5946ab60800edb9 Author: Martin Schwenke <mar...@meltin.net> Date: Sun May 13 15:42:31 2018 +1000 ctdb-docs: Add example configuration files Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 409b0b797ef345d270f1b0f55bb8691088245c20 Author: Martin Schwenke <mar...@meltin.net> Date: Sat Apr 21 18:12:53 2018 +1000 ctdb-docs: Add ctdb.conf(5) cross references and documentation tweaks Minor updates to other manual pages for compatibility. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 72ba7ea887f2fe88521dd653ae618ea6738535e4 Author: Martin Schwenke <mar...@meltin.net> Date: Sun May 13 15:41:38 2018 +1000 ctdb-docs: Add ctdb.conf(5) This documents the new Samba-style configuration file. Signed-off-by: Martin Schwenke <mar...@meltin.net>
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c853a80 ctdb-common: Fix CID 1435600 via 215d844 ctdb-common: Fix CID 1435599 from 472dca2 debug: Add group logging classes https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c853a8071a6efafe92e7df608ec636f43aa9d371 Author: Volker Lendecke <v...@samba.org> Date: Tue May 15 13:28:19 2018 +0200 ctdb-common: Fix CID 1435600 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Wed May 16 09:51:07 CEST 2018 on sn-devel-144 commit 215d8448f0e51c4f5ffdcee6003dcbce4d1440a5 Author: Amitay Isaacs <ami...@gmail.com> Date: Tue May 15 19:23:04 2018 +1000 ctdb-common: Fix CID 1435599 Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Volker Lendecke <v...@samba.org> --- Summary of changes: ctdb/common/cmdline.c | 2 +- ctdb/common/logging.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c index 2540ce5..ee360d4 100644 --- a/ctdb/common/cmdline.c +++ b/ctdb/common/cmdline.c @@ -337,7 +337,7 @@ static int cmdline_match(struct cmdline_context *cmdline) size_t len; char *t, *str; int n = 0; - bool match; + bool match = false; cmd = >commands[i]; len = strlcpy(name, cmd->name, sizeof(name)); diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c index 3cc1933..dc8c4f7 100644 --- a/ctdb/common/logging.c +++ b/ctdb/common/logging.c @@ -173,13 +173,12 @@ static bool file_log_validate(const char *option) dir = dirname(t); ret = stat(dir, ); + free(t); if (ret != 0) { - free(t); return false; } if (! S_ISDIR(st.st_mode)) { - free(t); return false; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b9d01fd ctdb-scripts: Drop CTDB_SUPPRESS_COREFILE and CTDB_MAX_OPEN_FILES options via 7e31a13 ctdb-config: Add default ctdb.sysconfig file, update ctdb.service via 74230c5 ctdb-docs: Document system options and resource controls via f63f905 ctdb-config: Add a default script.options file via a8ccf41 ctdb-docs: Document script.options via ac1c12b ctdb-scripts: Use load_script_options() in miscellaneous scripts via 02444e5 ctdb-scripts: Allow load_script_options() to specify an event script via 00f35b7 ctdb-scripts: Add global script.options configuration file via 31f26e9 ctdb-tests: Separate support script for 06.nfs via 130f37c ctdb-scripts: Don't check for CTDB_PARTIALLY_ONLINE_INTERFACES clash via 574af23 ctdb-scripts: Don't load CTDB configuration in onnode via 5d7d53b ctdb-scripts: Don't load CTDB configuration in statd-callout via 36e7043 ctdb-tests: Continue running if a testcase is not executable from cda3b23 pysmb: Add some more documentation for conn.list https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b9d01fddc651798a50c2a2bf0d596d5f9d7eb6a1 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 14:13:35 2018 +1000 ctdb-scripts: Drop CTDB_SUPPRESS_COREFILE and CTDB_MAX_OPEN_FILES options These should be done using features provided by the operating system. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Sat May 12 09:13:28 CEST 2018 on sn-devel-144 commit 7e31a1382fd5eb45448042960e90885462b1452a Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 16:35:16 2018 +1000 ctdb-config: Add default ctdb.sysconfig file, update ctdb.service Install ctdb.sysconfig in RPM. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 74230c59b6a8add7310c4ec39ef315cc67156b5a Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 14:11:23 2018 +1000 ctdb-docs: Document system options and resource controls The existing configuration file is disappearing so these configuration options need a new home that is not handled by ctdbd_wrapper. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit f63f9053efb73375247de49bd396792936cbf1a2 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Apr 24 16:33:20 2018 +1000 ctdb-config: Add a default script.options file Include it in the RPM. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit a8ccf41b8796df417c92b157e6c61457768d0e6c Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 19:17:59 2018 +1000 ctdb-docs: Document script.options Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit ac1c12b5a21ed2666478817b377acf8f5aa48644 Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 19:16:57 2018 +1000 ctdb-scripts: Use load_script_options() in miscellaneous scripts Some of these just aim to load the generic script.options file while others target more specific files. For NFS configuration, always use 60.nfs.options - even for 06.nfs. This could be carefully documented but will change a lot before release so there is no need. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 02444e5f479f2d9705de93006916d9cd1333f21c Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 19:06:13 2018 +1000 ctdb-scripts: Allow load_script_options() to specify an event script This allows other scripts to use the given options for a particular event script. One interesting example is that the ctdb_natgw tool should look for configuration in events.d/11.natgw.options. In the future this will be something like events/failover/11.natgw.options, so require the component to be specified even though it isn't yet used. Test support is also updated. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 00f35b7b0d0b341e2ef1c7f699f80bbf0e5dc3e0 Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 18:52:36 2018 +1000 ctdb-scripts: Add global script.options configuration file Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmai
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a23d805 ctdb-tests: Fix a typo via 693ca7b ctdb-tests: Simplify a test from 110e72c ctdb-scripts: Drop CTDB_RC_LOCAL testing hook https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a23d80547545f1d367ef446d6d7173999ca4e97c Author: Martin Schwenke <mar...@meltin.net> Date: Mon Apr 30 12:07:48 2018 +1000 ctdb-tests: Fix a typo Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Mon Apr 30 14:26:43 CEST 2018 on sn-devel-144 commit 693ca7b99e6b2bcce5a3a9c375a2c7e83a053894 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Feb 27 06:40:59 2018 +1100 ctdb-tests: Simplify a test Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> --- Summary of changes: ctdb/tests/simple/03_ctdb_getvar.sh| 2 +- ctdb/tests/simple/20_delip_iface_gc.sh | 14 ++ 2 files changed, 7 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/simple/03_ctdb_getvar.sh b/ctdb/tests/simple/03_ctdb_getvar.sh index a58aa3b..cae3dd1 100755 --- a/ctdb/tests/simple/03_ctdb_getvar.sh +++ b/ctdb/tests/simple/03_ctdb_getvar.sh @@ -36,7 +36,7 @@ cluster_is_healthy try_command_on_node -v 0 "$CTDB listvars" -echo "Veryifying all variable values using \"ctdb getvar\"..." +echo "Verifying all variable values using \"ctdb getvar\"..." echo "$out" | while read var x val ; do diff --git a/ctdb/tests/simple/20_delip_iface_gc.sh b/ctdb/tests/simple/20_delip_iface_gc.sh index 8ad001f..e73eed2 100755 --- a/ctdb/tests/simple/20_delip_iface_gc.sh +++ b/ctdb/tests/simple/20_delip_iface_gc.sh @@ -18,14 +18,12 @@ cluster_is_healthy # Reset configuration ctdb_restart_when_done -echo "Getting public IPs information..." -try_command_on_node -v any "$CTDB ip -v all -X | tail -n +2" -ip_info="$out" - -# Select the first node and find out its interfaces -test_node=$(awk -F'|' 'NR == 1 { print $3}' <<<"$ip_info") -ifaces=$(awk -F'|' -v tn=$test_node '$3 == tn { print $6 }' <<<"$ip_info" | sed 's@, @ @g' | xargs -n 1 | sort -u) -echo "Selected test node ${test_node} with interfaces: ${ifaces}" +select_test_node_and_ips + +# Find interfaces on test node +try_command_on_node $test_node "$CTDB ifaces -X" +ifaces=$(awk -F'|' 'NR > 1 { print $2 }' <<<"$out") +echo "Node ${test_node} has interfaces: ${ifaces}" # Delete all IPs on each interface... deleting IPs from one interface # can cause other interfaces to disappear, so we need to be careful... -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 110e72c ctdb-scripts: Drop CTDB_RC_LOCAL testing hook via 26430ab ctdb-scripts: Drop unused variable service_config via dbc6ebc ctdb-docs: Drop documentation for CTDB_SHUTDOWN_TIMEOUT option via 072650b ctdb-docs: Drop stale reference to unused configuration file via 3388aed ctdb-docs: Drop references to CTDB_BASE from the documentation via d44fed6 ctdb-tools: Avoid filtering stderr when onnode not running in parallel via d8741fe ctdb-scripts: Avoid shellcheck SC1117: Backslash is literal in "..." via 7dbf833 ctdb: Fix some -Werror=strict-overflow issues from 5757d25 script/git-hooks: add check-trailing-whitespace https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 110e72ccd8e241cb8bed7e257ee9d96767fd9e24 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Apr 5 16:09:22 2018 +1000 ctdb-scripts: Drop CTDB_RC_LOCAL testing hook This is not used. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Fri Apr 27 09:37:49 CEST 2018 on sn-devel-144 commit 26430ab1d1d5edb64cd6c9fe279e5beb264a1c38 Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 19:00:56 2018 +1000 ctdb-scripts: Drop unused variable service_config This was previously used by the loadconfig() function. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit dbc6ebc6244c2c40931ef922a7eab93d6f6a Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 4 18:17:13 2018 +1000 ctdb-docs: Drop documentation for CTDB_SHUTDOWN_TIMEOUT option This was recently removed but the documentation was forgotten. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 072650b40e79f407c16144ab441c26f469d89d29 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 29 15:42:10 2018 +1100 ctdb-docs: Drop stale reference to unused configuration file Recently removed but documentation change was forgotten. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 3388aed012d269ee896a71bddcc5570f16b92d6a Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 29 15:38:13 2018 +1100 ctdb-docs: Drop references to CTDB_BASE from the documentation CTDB_BASE should only ever be modified by test code. It should not be mentioned in the user documentation. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit d44fed601d4e867cd2d282df5673753d2aefb0c9 Author: Martin Schwenke <mar...@meltin.net> Date: Wed Apr 18 08:05:25 2018 +1000 ctdb-tools: Avoid filtering stderr when onnode not running in parallel stderr_filter() only does anything useful when running in parallel (i.e. with the -p option). So, simplify the non-parallel case by not using stderr_filter(). As a side-effect, this fixes an issue introduced in commit 85a4375788d8ef8345ec390807f18299abdadb20 where local daemon tests would hang when trying to start daemons with VALGRIND set (to a valgrind command that does not use --log-file). This is because valgrind would keep stderr open for its output so the pipeline involving stderr_filter() would never complete. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit d8741feec533934e02bd54b7bcc4fb71dbe1a1e1 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Apr 19 11:54:26 2018 +1000 ctdb-scripts: Avoid shellcheck SC1117: Backslash is literal in "..." This warning (apparently new in shellcheck 0.4.7) only applies to double-quoted strings. Change affected constant strings to use single-quotes. In the one example that contains a variable expansion escape the backslash as recommended. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 7dbf83369705bf2fe7c4d6b79ddf794ea8adb5db Author: Martin Schwenke <mar...@meltin.net> Date: Mon Apr 16 18:32:07 2018 +1000 ctdb: Fix some -Werror=strict-overflow issues All quite obvious. For the LCP2 one, we're not actually counting so use a bool instead of an int. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> --- Summary of
[SCM] Samba Shared Repository - branch master updated
via 713804b ctdb-tests: Update argument handling of ctdb stub functions via 7d1d5fc ctdb-tests: Move ctdb stub code from case statement to functions via 06be4a6 ctdb-tests: Drop unused ctdb stub scriptstatus and xpnn commands via 6f730c4 ctdb-tests: Fix a bug in the ctdb stub's moveip command via fb20907 ctdb-tests: New global variable FAKE_NETWORK_STATE via ad081f9 ctdb-tests: Make FAKE_CTDB_STATE globally set via cf866d6 ctdb-scripts: Drop unused functions via 2f33b18 ctdb-script: Drop CTDB_MANAGED_SERVICES configuration option from d955ab2 selftest: Run net.api.become.dc against less roles https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4e0cf2fa766eed922e86428b2ecdf3da0a27bc9b Author: Martin Schwenke <mar...@meltin.net> Date: Tue Mar 20 20:20:55 2018 +1100 ctdb-tests: Delete unused fake /etc/sysconfig/ctdb file The only remaining item is a setting of CTDB_DEBUGLEVEL, which is not required. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Wed Mar 28 07:27:58 CEST 2018 on sn-devel-144 commit 02fc52d69b2f74bb35150ddcec405c81da81f81f Author: Martin Schwenke <mar...@meltin.net> Date: Tue Feb 20 18:22:33 2018 +1100 ctdb-scripts: Tunables are now loaded from ctdb.tunables Using CTDB_SET_TunableVariables in the main configuration file is no longer supported. The only subtlety is an unexpected order change in one of the unit test results. This is because the old implementation implicitly sorted the tunable variables via the set command. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 1db96ce26e555f1faa879ea4b29816f4ab2eb1a7 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 22 14:39:45 2018 +1100 ctdb-tests: Rename setup_config() to setup_tunable_config() Drop the "CTDB_SET_" prefix from variable names and add it back for now. When there is a better way of setting tunables then this function will support that. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 66cfddc61c77fa0eb7b8da05c34ae7eaf2596004 Author: Martin Schwenke <mar...@meltin.net> Date: Mon Feb 19 14:58:48 2018 +1100 ctdb-tests: Script options into per-script file Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 65ce5e2129d7c4ba7b1728ef1df6dd424ed65b49 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Feb 20 12:56:42 2018 +1100 ctdb-scripts: Use load_script_options in event scripts Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit a2f8730c759438317ba3a0df08890075117e2525 Author: Martin Schwenke <mar...@meltin.net> Date: Mon Feb 19 13:13:26 2018 +1100 ctdb-scripts: Add new function load_script_options() For now this loads the global CTDB configuration too. This will change in the future after things are properly modularised. This also anticipates a future change where event scripts end with a ".script" suffix. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit e0c2b3a1e10c1e4557720933a0bd906901112e8e Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 22 11:36:46 2018 +1100 ctdb-tests: Use setup_script_options() in 91.lvs tests Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit a48bd342465ff78275ed83824c01aefdddca2b77 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 22 12:05:10 2018 +1100 ctdb-tests: Use setup_script_options() in 60.nfs (and 06.nfs) tests Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 96ed6c34ba0d3513d7eeb3090a996bd0e369c4e4 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 22 12:03:56 2018 +1100 ctdb-tests: Use setup_script_options() in 50.samba tests Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit ecda38c8940de073dc7de8894bc77eabb1cf4001 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 22 11:17:47 2018 +1100 ctdb-tests: Use setup_script_options() in 49.winbind tests Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ce5116c ctdb-tests: Don't expand octal escapes in unit test output via 7da9802 ctdb-tests: Add debug messages for unimplemented functions via c865658 ctdb-tests: Add database traverse tests via a5fb33e ctdb-tests: Implement traverse control in fake_ctdbd via 2a8e425 ctdb-tests: Add persistent database tests via 8250956 ctdb-tests: Implement transaction control in fake_ctdbd via 7c30d47 ctdb-tests: Add volatile database tests via 5be29b7 ctdb-tests: Add req_call processing in fake_ctdbd via 0e5e846 ctdb-tests: Use seqnum from tdb if available in fake_ctdbd via 14bdbef ctdb-tests: Add database attach tests via 50e2541 ctdb-tests: Implement database attach control in fake_ctdbd via 2de6607 ctdb-tests: Add dbdir option for creating databases in fake_ctdbd via 147ff85 ctdb-tests: Convert database map to a linked list in fake_ctdbd via 4e37be9 ctdb-client: Add missing initialization of tevent_context via 92a68af ctdb-client: Do not try to allocate 0 sized record from 2610a3f winbindd: Use talloc_zero_array for consistency with other winbindd_domain allocators https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ce5116cfb3990de8a088012bee9fd9f94bd21c97 Author: Martin Schwenke <mar...@meltin.net> Date: Mon Mar 26 18:32:57 2018 +1100 ctdb-tests: Don't expand octal escapes in unit test output The echo command in dash expands octal escapes in strings by default but the echo command in bash doesn't. Since the behaviour is ill-defined, use printf to handle affected strings. However, ensure that these strings aren't used as format strings. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Tue Mar 27 09:06:14 CEST 2018 on sn-devel-144 commit 7da9802acdb1ec1d76050064f54aae38b21a03d4 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Mar 19 14:26:09 2018 +1100 ctdb-tests: Add debug messages for unimplemented functions Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit c86565885d8aefc3d67ed80165332bfaa3f33ea4 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Feb 5 16:08:32 2018 +1100 ctdb-tests: Add database traverse tests Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit a5fb33e277217fc8526f409a04ba0718c20cefe8 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Feb 5 15:59:26 2018 +1100 ctdb-tests: Implement traverse control in fake_ctdbd Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 2a8e425767faf1dbe671eb25bb4cfcddfb5a7bb5 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Aug 28 15:29:58 2017 +1000 ctdb-tests: Add persistent database tests Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 8250956c964a774bf4fb7c86527630ee2655 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Feb 5 14:03:27 2018 +1100 ctdb-tests: Implement transaction control in fake_ctdbd Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 7c30d4791d0b3c7e47bf8f12a66d0450d1190270 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Mar 19 14:00:02 2018 +1100 ctdb-tests: Add volatile database tests Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 5be29b792d2a48efcddc9137cbee250f42d31a2d Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Feb 5 15:56:57 2018 +1100 ctdb-tests: Add req_call processing in fake_ctdbd Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 0e5e8469262344f60b7ecca9e2d1cc6aba54f6f9 Author: Amitay Isaacs <ami...@gmail.com> Date: Mon Feb 5 14:01:29 2018 +1100 ctdb-tests: Use seqnum from tdb if available in fake_ctdbd This also adds the lower level ltdb read/write functions required to read seqnum from database. Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 14bdbef9c111a358e7f6e64abd8d2e4bae997976 Author: Amitay Isaacs <ami...@gmail.com> Date: Fri Aug 25 17:20:04 2017 +1000 ctdb-tests: Add database attach tests Signed-off-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3451a03 ctdb-scripts: Drop CTDBD_CONF internal test variable via 02a942e ctdb-tests: Drop unused functions via 1d7f86a ctdb-tests: Construct values for CTDB_BASES by hand via ebd2589 ctdb-tests: Use CTDB_BASE instead of node_dir via 85a4375 ctdb-tests: Use onnode to start/stop local daemons via db7e4aa ctdb-daemon: Drop ctdbd --nlist option via dedc9ea ctdb-tools: No longer honour CTDB_NODES environment variable via 6cf861a ctdb-scripts: Drop CTDB_NODES configuration option via a1eac09 ctdb-tools: Drop testing hook from ctdb tool via 480c586 ctdb-tests: Simplify nodes file handling in tool tests via 3a7c49d ctdb-tests: Put configuration, socket and PID file in CTDB_BASE via 78248ad ctdb-tests: Improve setting of helper paths via 1035443 ctdb-tests: Use setup_base() in tool unit tests via d55e7d8a ctdb-tests: Drop an orphaned comment via 16a93d7 ctdb-tools: Drop onnode CTDB_NODES_FILE environment variable via c8c944d ctdb-tests: Use default location for nodes file via f6d6f22 ctdb-daemon: Drop ctdbd --public-interface option via b1fcb0a ctdb-scripts: Drop CTDB_PUBLIC_INTERFACE configuration option via 482ff4b ctdb-daemon: Drop ctdbd --public-addresses option via 346c28d ctdb-tests: Remove unused function get_ctdbd_command_line_option() via 6ecddd4 ctdb-scripts: Drop CTDB_PUBLIC_ADDRESSES configuration option via b6127a6 ctdb-tests: Allow tests access to CTDB_BASE via a757182 ctdb-scripts: Drop 10.external event script via a0aa735 ctdb-tests: Use default public addresses file for event script tests via 3d85488 ctdb-tests: Use default public addresses file in local daemon tests via 1dcc0ad ctdb-daemon: Provide a default location for public addresses file via e0ed9b3 ctdb-tests: Don't allow simple tests to use environment for config via 4328f4a ctdb-tests: Update some tests to use setup_ctdb() options via 5615bdf ctdb_tests: Reconfigure the cluster when restarting CTDB via bdfc8b7 ctdb-tests: Add some options to setup_ctdb() via 7e08c1d ctdb-tools: Drop ctdb --socket option via 0045a7c ctdb-tools: Move handling of CTDB_SOCKET to process_command() via 4961711 ctdb-daemon: Drop ctdbd --socket option via 81b57fa ctdb-scripts: Drop CTDB_SOCKET configuration option via de44df2 ctdb-tools: Drop a couple of unnecessary exports of CTDB_SOCKET via 1f4fd30 ctdb-tests: Use environment variable for specifying socket via b05dc0b ctdb-daemon: Allow CTDB_SOCKET environment variable to be used via 70fb005 ctdb-tests: Use CTDB_SOCKET environment variable to specify socket via aa961e8 ctdb-tests: Drop ctdbd --event-script-dir option via 3df3678 ctdb-scripts: Drop CTDB_EVENT_SCRIPT_DIR configuration option via 32fade2 ctdb-daemon: Drop ctdbd --pidfile option via 0ee7b8a ctdb-scripts: Drop CTDB_PIDFILE configuration option via 689259b ctdb-ib: Drop a bit-rotted test example from the README from a6054c0 s4: vfs: fruit tests: Add regression test for dealing with NFS ACE entries. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3451a03611b146c3b7acab93d452a88e85397f12 Author: Martin Schwenke <mar...@meltin.net> Date: Thu Mar 15 15:42:57 2018 +1100 ctdb-scripts: Drop CTDBD_CONF internal test variable Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Mon Mar 19 07:32:22 CET 2018 on sn-devel-144 commit 02a942ea473cd68099e07a04e6f17f4b4d92f620 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Mar 13 16:43:44 2018 +1100 ctdb-tests: Drop unused functions Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit 1d7f86a8cdb2c30ac74cdbb01230e3b89e177d48 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Mar 13 16:56:44 2018 +1100 ctdb-tests: Construct values for CTDB_BASES by hand setup_ctdb_base() and node_dir() duplicate the construction of CTDB_BASE. Drop the use of node_dir() and construct the values for CTDB_BASES by hand. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit ebd25890872402bce533469428aa65e08487352c Author: Martin Schwenke <mar...@meltin.net> Date: Tue Mar 6 12:32:30 2018 +1100 ctdb-tests: Use CTDB_BASE instead of node_dir Simple test configuration is all relative to CTDB_BASE and node_dir is redundant. Make this explicit by dropp