mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
238056e5aa
When testparm processes the output of "testparm -v" (which includes default values) it appears to do global checks (or some other sort of initialisation logic) for all specified values. This includes a DNS lookup for the node's hostname, as a side-effect of a libldap ldap_set_option() call when processing "ldap debug level". If DNS servers are down then this can induce timeouts, possibly resulting in monitor timeouts. Avoid this by using sed to extract configuration values from the testparm cache file. This is already shown to work when retrieving share paths, where testparm is basically used as cat. Update the sed pattern to avoid matching empty values on the right-hand side of the equals ('=') - this avoids the default empty path value (and "smb ports" never has an empty value). Corresponding test changes: * 50.samba.monitor.111.sh no longer expects a failure from being unable to set smb ports, since testparm is no longer used in that code path. * smb ports needs to be set in fake smb.conf so it is in the default output and can be extracted using sed. * Although testparm --parameter-name is no longer used in 50.samba.script, update the stub implementation (in case it is ever used again) to extract from fake smb.conf, since "smb ports" is now set there. The change from $parameter to $param allows a long line to stay below 80 columns. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Feb 14 08:43:53 UTC 2023 on atb-devel-224 |
||
---|---|---|
.. | ||
events | ||
nfs-checks.d | ||
ctdb-crash-cleanup.sh | ||
ctdb.conf | ||
ctdb.init | ||
ctdb.sudoers | ||
ctdb.sysconfig | ||
ctdb.tunables | ||
debug_locks.sh | ||
debug-hung-script.sh | ||
functions | ||
nfs-linux-kernel-callout | ||
notification.README | ||
notify.sh | ||
README | ||
script.options | ||
statd-callout |
This directory contains run-time support scripts for CTDB. Selected highlights: ctdb.init An initscript for starting ctdbd at boot time. events/ Eventscripts. See events/README for more details. functions Support functions, sourced by eventscripts and other scripts. statd-callout rpc.statd high-availability callout to support lock migration on failover. Notes: * All of these scripts are written in POSIX Bourne shell. Please avoid bash-isms, including the use of "local" variables (which are not available in POSIX shell). * Do not use absolute paths for commands. Unit tests attempt to replace many commands with stubs and can not do this if commands are specified with absolute paths. The functions file controls $PATH so absolute paths should not be required.