1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb
Martin Schwenke 238056e5aa ctdb-scripts: Avoid using testparm to process its own output
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
2023-02-14 08:43:53 +00:00
..
client ctdb-client: Drop unused recmaster functions 2022-01-17 10:21:33 +00:00
cluster ctdb-config: Add configuration option [cluster] leader timeout 2022-01-17 10:21:33 +00:00
common ctdb: Fix a use-after-free in run_proc 2022-10-06 15:10:20 +00:00
config ctdb-scripts: Avoid using testparm to process its own output 2023-02-14 08:43:53 +00:00
database ctdb-database: Fix signed/unsigned comparison by casting 2019-07-05 05:03:24 +00:00
doc ctdb-doc: Fix typos in the policy routing documentation 2022-05-31 05:06:29 +00:00
event ctdb-tests: Iterate protocol tests internally 2022-02-14 04:32:29 +00:00
failover ctdb-failover: Add failover configuration options 2018-08-24 10:59:21 +02:00
ib ctdb-daemon: Rename ctdb_context private_data to transport_data 2019-11-14 02:20:46 +00:00
include ctdb-daemon: Drop unused ban_state element from CTDB node structure 2022-07-22 16:09:31 +00:00
protocol ctdb-protocol: Add separator argument to ctdb_connection_to_buf() 2022-07-22 16:09:31 +00:00
server spelling fixes for 4.18 (errror implemenation proces Controler) 2023-01-26 20:46:11 +00:00
tcp ctdb-tcp: Do not stop outbound connection in ctdb_tcp_node_connect() 2020-03-12 05:29:20 +00:00
tests ctdb-scripts: Avoid using testparm to process its own output 2023-02-14 08:43:53 +00:00
tools ctdb-tools: Improve/add debug 2022-09-20 10:43:37 +00:00
utils ctdb-config: [cluster] recovery lock -> [cluster] cluster lock 2022-01-17 10:21:33 +00:00
.bzrignore
.gitignore ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING 2019-03-15 05:17:14 +00:00
configure configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts 2022-03-29 22:32:32 +00:00
configure.rpm ctdb-packaging: Update library versions to upstream versions 2018-12-18 07:12:09 +01:00
COPYING
Makefile Python: remove pydoctor 2023-02-02 21:15:54 +00:00
README
wscript ctdb-build: Add --enable-pcap configure option 2022-09-20 10:43:37 +00:00

This is the release version of CTDB, a clustered implementation of TDB
database used by Samba and other projects to store temporary data.

This software is freely distributable under the GNU public license,
a copy of which you should have received with this software (in a file
called COPYING).

For documentation on CTDB, please visit CTDB website http://ctdb.samba.org.