IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
These lines are duplicates of those above. It has always been this
way...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Aug 14 09:00:45 CEST 2017 on sn-devel-144
Given the size of the command substitutions it would be less clear to
embed the assignments and substitutions inside a conditional. It is
clearer if the exit code is checked afterwards.
However, do fix some untidy uses of != instead of -ne when comparing
with $?. Make the code easier to understand by reversing the logic
and using -eq and ||.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
SC2006: Use $(..) instead of legacy `..`.
Make the obvious changes to $(...) but convert some to $((...)).
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
SC2059: Don't use variables in the printf format string.
Use printf "..%s.." "$foo".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
SC2046: Quote this to prevent word splitting.
SC2086: Double quote to prevent globbing and word splitting.
Add some quoting where it makes sense. Use shellcheck directives for
false-positives.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
In this case: ctdbd_wrapper, onnode, ctdb_diagnostics, ctdb.sudoers.
Set sensible defaults from configure options.
Update documentation to match, trying to fix up anything that has been
missed before.
The onnode unit tests need a symlink to the functions file.
The simple integration tests need to set CTDB_BASE and also
need symlinks to functions/nodes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
fixup
Signed-off-by: Martin Schwenke <martin@meltin.net>
This hasn't existed for a long time.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Current behaviour is for onnode to timeout (for about 20s) for each
attempted ssh to a down node. With 40 or 50 invocations of onnode
this takes a long time.
2 changes to work around this:
* If EXTRA_SSH_OPTS (which is passed to ssh by onnode) does not
contains a ConnectTimeout= setting then add a setting for a 5 second
timeout.
* Filter the nodes before starting any diagnosis, taking out any "bad
nodes" that are uncontactable via onnode.
In the nodes summary at the beginning of the output, print
information about any "bad nodes".
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8c3b6427dbaade87e1a0f5590f0894c2e69b31a3)
In some contexts ctdb_diagnostics generates too many errors when it is
run on heterogeneous and machine-configured clusters. In some
clusters some nodes are expected to be differently configured and also
machine-generated configured files can have comments containing
timestamps.
This adds some command-line options that can be used to reduce the
number of errors reported:
-n <nodes> Comma separated list of nodes to operate on
-c Ignore comment lines (starting with '#') in file comparisons
-w Ignore whitespace in file comparisons
--no-ads Do not use commands that assume an Active Directory Server
The -n option simply allows ctdb_diagnostics to operate on a subset of
nodes, avoiding file comparisons with and data collection on nodes
that are differently configured. For file comparisons, instead of
showing each file on the current node and then comparing other nodes
to that file, the file from the first (available or requested) nodes
is shown and then other nodes are compared to that. That has resulted
in changes in output - that is, ctdb diagnostics no longer prints
messages referencing the current node.
-c and -w are used to weaken comparisons between configuration files.
--no-ads can be used to avoid running ADS-specific commands if a
cluster uses LDAP (or other non-ADS) configuration.
This also fixes a number of bugs in related code:
* A call to onnode was losing the >> NODE ... << lines because they
now go to stderr. This was changed in onnode long ago but
ctdb_diagnostics was never updated to match.
* ctdb_diagnostics was counting lines in /etc/ctdb/nodes to determine
what nodes to operate on. For some time the nodes file has
supported syntax that makes this invalid. "ctdb listnodes -Y" is
now used to list available nodes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 36c8244a0f68c7c9bbee40982f230e9d14d3c0ea)
All event scripts use only the relative path, so we should
here.
Also PATH includes /sbin and /usr/sbin...
metze
(This used to be ctdb commit 20678e1506db1f96b58c326ee91339e797c07c22)