The branch, v4-23-test has been updated
via 5ca842bc6c0 mdssvc: add support for parsing date ranges
via f7c01ed4a74 mdssvc: add a test for parsing Spotlight date ranges
via 6b87f2133d6 mdssvc: reduce a log level to DEBUG
via b6cb1d223db ctdb-scripts: Avoid failing updateip when IP is not
assigned
via 8f1032fb959 ctdb-scripts: Avoid printing a message if no connections
via c49aa8718a3 ctdb-tests: Add an event script unit test for updateip
via 1b084f149a0 ctdb-daemon: Fix a crash due to a failed updateip
from 6d2cf012b41 smbd: only increment lease epoch if a lease was granted
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-23-test
- Log -----------------------------------------------------------------
commit 5ca842bc6c0efc70f96764f0455961a56d0aa67f
Author: Ralph Boehme <[email protected]>
Date: Wed Oct 15 15:01:16 2025 +0200
mdssvc: add support for parsing date ranges
Example:
InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Ralph Böhme <[email protected]>
Autobuild-Date(master): Mon Oct 20 10:59:03 UTC 2025 on atb-devel-224
(cherry picked from commit c00de32585bf47ec4753f966fe9ac4dd2fb8f4e7)
Autobuild-User(v4-23-test): Jule Anger <[email protected]>
Autobuild-Date(v4-23-test): Mon Nov 3 14:56:14 UTC 2025 on atb-devel-224
commit f7c01ed4a74ec7eae46ea17ebdbc334fe64b7f76
Author: Ralph Boehme <[email protected]>
Date: Fri Oct 17 12:38:53 2025 +0200
mdssvc: add a test for parsing Spotlight date ranges
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
(cherry picked from commit 1239e5a4c7f5930a4a1b3a6a7a005f4d543a5ea5)
commit 6b87f2133d6370086c7c77f820b85f59846bd5d4
Author: Ralph Boehme <[email protected]>
Date: Wed Oct 15 14:56:51 2025 +0200
mdssvc: reduce a log level to DEBUG
The expression
InRange(*,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))
in a Spotlight query produces the following log message:
map_fts: Mapping fts [757378800] unexpected op [~]
However, when
elasticsearch:ignore unknown attribute = yes
is set, the parser will ignore the failed expression and continue
parsing given the expression is part of a larger expression like
"subexpression1 OR subexpression2". Avoid spamming the log and reduce
the loglevel when we hit this case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
(cherry picked from commit 3b2b50983901ad5039124b82f149b30675c80a9a)
commit b6cb1d223db25886d3c4357e0b29ca461996a89d
Author: Martin Schwenke <[email protected]>
Date: Thu Oct 16 13:54:22 2025 +1100
ctdb-scripts: Avoid failing updateip when IP is not assigned
There is no use failing this when it could behave more like takeip.
Use old interface of "__none__" as a hint that ctdbd doesn't think the
IP is assigned either. In this case print a warning instead of an
error. Take some care to avoid spurious errors in updateip.
After commit 0536d7a98b832fc00d26b09c26bf14fb63dbf5fb (which improves
IP address state checking), this will almost certainly not occur on
platforms with getifaddrs(3) (e.g. Linux). This means it is only
likely to occur in 4.21 when net.ipv4.ip_nonlocal_bind=1.
Update test to match.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15935
Reported-by: Bailey Allison <[email protected]>
Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
Autobuild-User(master): Anoop C S <[email protected]>
Autobuild-Date(master): Fri Oct 17 06:28:30 UTC 2025 on atb-devel-224
(cherry picked from commit 0e73781bf84a1e8e596d8be3f55eeb5f8f927990)
commit 8f1032fb959d903290e120f25c8abcd1a9165fec
Author: Martin Schwenke <[email protected]>
Date: Thu Oct 16 13:51:27 2025 +1100
ctdb-scripts: Avoid printing a message if no connections
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15935
Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
(cherry picked from commit 01d3d25c0139a3dd49a2322a9416698d08733377)
commit c49aa8718a35f313254728f8301ef53e6bc0ebfd
Author: Martin Schwenke <[email protected]>
Date: Thu Oct 16 10:42:22 2025 +1100
ctdb-tests: Add an event script unit test for updateip
This illustrates the current failure where an unassigned public IP
address causes updateip to fail.
After commit 0536d7a98b832fc00d26b09c26bf14fb63dbf5fb (which improves
IP address state checking), this will almost certainly not occur on
platforms with getifaddrs(3) (e.g. Linux). This means it is only
likely to occur in 4.21 when net.ipv4.ip_nonlocal_bind=1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15935
Reported-by: Bailey Allison <[email protected]>
Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
(cherry picked from commit a98ffb96efc4a9ea2110c654860a4ba3896ab3d5)
commit 1b084f149a06a7c9cee651c43ed7bfdb9111f8b6
Author: Martin Schwenke <[email protected]>
Date: Thu Oct 16 08:17:44 2025 +1100
ctdb-daemon: Fix a crash due to a failed updateip
This should really be a takeip. However, CTDB's weak check of the IP
address state (using bind(2)) incorrectly indicates that the IP
address is assigned to an interface so it is converted to an updateip.
After commit 0536d7a98b832fc00d26b09c26bf14fb63dbf5fb (which improves
IP address state checking), this will almost certainly not occur on
platforms with getifaddrs(3) (e.g. Linux). This means it is only
likely to occur in 4.21 when net.ipv4.ip_nonlocal_bind=1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15935
Reported-by: Bailey Allison <[email protected]>
Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
(cherry picked from commit d08f9ebd2755671d30c73a4e979029d353848828)
-----------------------------------------------------------------------
Summary of changes:
ctdb/config/events/legacy/10.interface.script | 17 +++++++++++++----
ctdb/config/functions | 4 ++++
ctdb/server/ctdb_takeover.c | 10 +++++++++-
.../UNIT/eventscripts/10.interface.updateip.001.sh | 16 ++++++++++++++++
source3/rpc_server/mdssvc/es_parser.y | 9 ++++++++-
source3/rpc_server/mdssvc/test_mdsparser_es.c | 3 +++
6 files changed, 53 insertions(+), 6 deletions(-)
create mode 100755 ctdb/tests/UNIT/eventscripts/10.interface.updateip.001.sh
Changeset truncated at 500 lines:
diff --git a/ctdb/config/events/legacy/10.interface.script
b/ctdb/config/events/legacy/10.interface.script
index cb7c958ec95..5eaefd7fa86 100755
--- a/ctdb/config/events/legacy/10.interface.script
+++ b/ctdb/config/events/legacy/10.interface.script
@@ -78,6 +78,11 @@ get_iface_ip_maskbits()
"$ip" "$maskbits" "$_maskbits_in"
fi
else
+ if [ "$_iface_in" = "__none__" ]; then
+ echo "WARNING: Unable to determine interface for IP
${ip}"
+ iface="$_iface_in"
+ return
+ fi
die "ERROR: Unable to determine interface for IP ${ip}"
fi
}
@@ -214,10 +219,14 @@ updateip)
exit 0
fi
- ip_block "$ip" "$oiface"
-
- delete_ip_from_iface "$oiface" "$ip" "$maskbits" 2>/dev/null
- delete_ip_from_iface "$niface" "$ip" "$maskbits" 2>/dev/null
+ # Behave more like takeip when the IP is not assigned. No
+ # need for a similar condition around ip_unblock()s because
+ # they will silently fail.
+ if [ "$oiface" != "__none__" ]; then
+ ip_block "$ip" "$oiface"
+ delete_ip_from_iface "$oiface" "$ip" "$maskbits" >/dev/null 2>&1
+ fi
+ delete_ip_from_iface "$niface" "$ip" "$maskbits" >/dev/null 2>&1
add_ip_to_iface "$niface" "$ip" "$maskbits" || {
ip_unblock "$ip" "$oiface"
diff --git a/ctdb/config/functions b/ctdb/config/functions
index 1d80c61e5f2..f5194237843 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -630,6 +630,10 @@ tickle_tcp_connections()
_conns=$(get_tcp_connections_for_ip "$_ip" |
awk '{ print $1, $2 ; print $2, $1 }')
+ if [ -z "$_conns" ]; then
+ return
+ fi
+
echo "$_conns" | awk '{ print "Tickle TCP connection", $1, $2 }'
echo "$_conns" | ctdb tickle
}
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 60f60e29ffc..cbf8d0a5b10 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -617,7 +617,15 @@ static void ctdb_do_updateip_callback(struct ctdb_context
*ctdb, int status,
*/
ctdb_vnn_unassign_iface(ctdb, state->vnn);
state->vnn->iface = state->old;
- state->vnn->iface->references++;
+ /*
+ * state->old (above) can be NULL if the IP wasn't
+ * recorded as held by this node but the system thinks
+ * the IP was assigned. In that case, a move could
+ * still be desirable..
+ */
+ if (state->vnn->iface != NULL) {
+ state->vnn->iface->references++;
+ }
ctdb_request_control_reply(ctdb, state->c, NULL, status, NULL);
talloc_free(state);
diff --git a/ctdb/tests/UNIT/eventscripts/10.interface.updateip.001.sh
b/ctdb/tests/UNIT/eventscripts/10.interface.updateip.001.sh
new file mode 100755
index 00000000000..e9567a8d114
--- /dev/null
+++ b/ctdb/tests/UNIT/eventscripts/10.interface.updateip.001.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "error - update a non-existent ip"
+
+setup
+
+public_address=$(ctdb_get_1_public_address)
+ip="${public_address% *}"
+ip="${ip#* }"
+
+ok "WARNING: Unable to determine interface for IP ${ip}"
+# Want separate words from public_address: interface IP maskbits
+# shellcheck disable=SC2086
+simple_test "__none__" $public_address
diff --git a/source3/rpc_server/mdssvc/es_parser.y
b/source3/rpc_server/mdssvc/es_parser.y
index 62ca63d90f2..1f1c02ba1a5 100644
--- a/source3/rpc_server/mdssvc/es_parser.y
+++ b/source3/rpc_server/mdssvc/es_parser.y
@@ -219,6 +219,13 @@ FUNC_INRANGE OBRACE attribute COMMA WORD COMMA WORD CBRACE
{
} else {
$$ = map_expr($3, '~', $5, $7);
}
+}
+| FUNC_INRANGE OBRACE attribute COMMA isodate COMMA isodate CBRACE {
+ if ($3 == NULL) {
+ $$ = NULL;
+ } else {
+ $$ = map_expr($3, '~', $5, $7);
+ }
};
attribute:
@@ -412,7 +419,7 @@ static char *map_fts(const struct es_attr_map *attr,
end = ")";
break;
default:
- DBG_ERR("Mapping fts [%s] unexpected op [%c]\n", val, op);
+ DBG_DEBUG("Mapping fts [%s] unexpected op [%c]\n", val, op);
return NULL;
}
diff --git a/source3/rpc_server/mdssvc/test_mdsparser_es.c
b/source3/rpc_server/mdssvc/test_mdsparser_es.c
index a61f84ceaff..5015de82127 100644
--- a/source3/rpc_server/mdssvc/test_mdsparser_es.c
+++ b/source3/rpc_server/mdssvc/test_mdsparser_es.c
@@ -155,6 +155,9 @@ static struct {
}, {
"InRange(kMDItemFSSize,1,2)",
"file.filesize:[1 TO 2]"
+ }, {
+
"InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))",
+ "file.created:[2024\\\\-12\\\\-31T23\\\\:00\\\\:00Z TO
2025\\\\-12\\\\-31T23\\\\:00\\\\:00Z]"
}
};
--
Samba Shared Repository