The branch, master has been updated via 1719ef7893a ctdb-tests: Drop unused function ctdb_get_all_public_addresses() via 4e3676cb3c4 ctdb-tests: add a comment to the generated public_addresses file used by eventscript UNIT tests via 5426c104f50 ctdb-tests: Fix typo in ctdb stub comment matching via 530e8d4b9e4 ctdb-scripts: filter out comments in public_addresses file from 0a376b23dba s3: VFS: zfsacl: Ensure we use a pathref fd, not an io fd, for getting/setting ZFS ACLs.
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 1719ef7893ae5dc87e452c24bafd55db598464bc Author: Martin Schwenke <mar...@meltin.net> Date: Tue Oct 12 12:27:51 2021 +1100 ctdb-tests: Drop unused function ctdb_get_all_public_addresses() Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Martin Schwenke <mart...@samba.org> Autobuild-Date(master): Tue Oct 12 23:24:18 UTC 2021 on sn-devel-184 commit 4e3676cb3c4d24cd4c287703d2cd812a2a8c36ff Author: Ralph Boehme <s...@samba.org> Date: Fri Oct 8 05:58:37 2021 +0200 ctdb-tests: add a comment to the generated public_addresses file used by eventscript UNIT tests test stub code has been updated to handle this, so now let's put it to work. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826 RN: Correctly ignore comments in CTDB public addresses file Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Martin Schwenke <mar...@meltin.net> commit 5426c104f5090751c1ea02f0c0667d8d071a4a83 Author: Martin Schwenke <mar...@meltin.net> Date: Tue Oct 12 12:19:27 2021 +1100 ctdb-tests: Fix typo in ctdb stub comment matching BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826 Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Ralph Boehme <s...@samba.org> commit 530e8d4b9e47601b88e20bcaefa2d502efcebe60 Author: Ralph Boehme <s...@samba.org> Date: Wed Sep 8 16:53:12 2021 +0200 ctdb-scripts: filter out comments in public_addresses file Note that order of sed expressions matters: the expression to delete comment lines must come first as the second expression would transform # comment to comment BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Martin Schwenke <mar...@meltin.net> ----------------------------------------------------------------------- Summary of changes: ctdb/config/events/legacy/10.interface.script | 3 ++- ctdb/config/functions | 3 +++ ctdb/tests/UNIT/eventscripts/scripts/local.sh | 11 +---------- ctdb/tests/UNIT/eventscripts/stubs/ctdb | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/config/events/legacy/10.interface.script b/ctdb/config/events/legacy/10.interface.script index 72e0c101d47..d87f6c52c58 100755 --- a/ctdb/config/events/legacy/10.interface.script +++ b/ctdb/config/events/legacy/10.interface.script @@ -25,7 +25,8 @@ fi get_all_interfaces () { # Get all the interfaces listed in the public_addresses file - all_interfaces=$(sed -e 's/^[^\t ]*[\t ]*//' \ + all_interfaces=$(sed -e '/^#.*/d' \ + -e 's/^[^\t ]*[\t ]*//' \ -e 's/,/ /g' \ -e 's/[\t ]*$//' "$ctdb_public_addresses") diff --git a/ctdb/config/functions b/ctdb/config/functions index 2395d8d4dc8..a4e73ad0594 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -611,6 +611,9 @@ drop_all_public_ips () # _x is intentionally ignored # shellcheck disable=SC2034 while read _ip _x ; do + case "$_ip" in + \#*) continue ;; + esac drop_ip "$_ip" done <"${CTDB_BASE}/public_addresses" } diff --git a/ctdb/tests/UNIT/eventscripts/scripts/local.sh b/ctdb/tests/UNIT/eventscripts/scripts/local.sh index 0f78fcb3845..84a5fc9772f 100644 --- a/ctdb/tests/UNIT/eventscripts/scripts/local.sh +++ b/ctdb/tests/UNIT/eventscripts/scripts/local.sh @@ -282,6 +282,7 @@ setup_public_addresses () echo "Setting up public addresses in ${_f}" cat >"$_f" <<EOF +# This is a comment 10.0.0.1/24 dev123 10.0.0.2/24 dev123 10.0.0.3/24 dev123 @@ -322,16 +323,6 @@ ctdb_get_1_interface () echo ${_t%% *} } -# Print all public addresses as: interface IP maskbits -# Each line is suitable for passing to takeip/releaseip -ctdb_get_all_public_addresses () -{ - _f="${CTDB_BASE}/public_addresses" - while IFS="/$IFS" read _ip _maskbits _ifaces ; do - echo "$_ifaces $_ip $_maskbits" - done <"$_f" -} - # Print public addresses on this node as: interface IP maskbits # Each line is suitable for passing to takeip/releaseip ctdb_get_my_public_addresses () diff --git a/ctdb/tests/UNIT/eventscripts/stubs/ctdb b/ctdb/tests/UNIT/eventscripts/stubs/ctdb index 12627de16a5..fc7bd4fdd84 100755 --- a/ctdb/tests/UNIT/eventscripts/stubs/ctdb +++ b/ctdb/tests/UNIT/eventscripts/stubs/ctdb @@ -425,7 +425,7 @@ ctdb_ifaces() # Assume -Y. echo "|Name|LinkStatus|References|" while read _ip _iface ; do - case "_$ip" in + case "$_ip" in \#*) : ;; *) _status=1 -- Samba Shared Repository