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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The -f option allows an alternate nodes file to be specified,
overriding the CTDB_NODES_FILE environment variable.
The -n option allows hostnames to be used instead of node numbers.
Using a range of hostnames is invalid, so hostnames can't contain
hyphens ('-') - sorry! You can use this option without a nodes file
by specifying "-f /dev/null".
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 46474e5f21fd97dd765c616647ff46055a9970e7)
In testing and other situations (e.g. eventscripts) it is necessary to
select a node where a ctdb command can be run. The whole idea here is
to avoid nodes where ctdbd is not running and where most ctdb commands
would fail. This implements a standard way of doing this involving a
recursive onnode command.
There is still a small window for a race, where the selected node is
suddenly shutdown, but this is unavoidable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fb47cce86c0edae5caaf485f13ae7a151b6cb00d)
Commit a0f5148ac749758e2dfbd6099e829c5bf1d900e6 caused a subtle
regression. Due to the subtlety, this description is much longer than
the 1 line patch that fixes it! The regression, where a process that
invokes onnode is unexpectedly blocked, is only apparent if the
following conditions are met:
1. $CTDB_NODES_SOCKETS is set;
2. The command passed to onnode attempts to background a process; and
3. onnode is run in certain types of subshell (e.g. foo=$(onnode ...)).
In particular, when testing against local daemons (i.e. condition (1)
is met), tests/simple/07_ctdb_process_exists.sh would fail (because it
does both (2), (3)).
The problem is caused by the use of file descriptor 3 in the code that
allows separate filtering of stdout and stderr. A backgrounded
process will have this descriptor open and the $(...) construct
appears to wait for all file descriptors to be closed. This only
happens with local daemons because SSH is replaced by a shell and file
descriptor 3 leaks into that shell. It does not occur when SSH is
used because the file descriptor does not leak into the remote shell
where the process is backgrounded.
The fix is simply to redirect file descriptor 3 to /dev/null in the
fakessh function, which is used when $CTDB_NODES_SOCKETS is set.
Also fixed is another minor bug when the -o option and
$CTDB_NODES_SOCKETS are used in combination. The code uses the node
name as a suffix for the output filename(s). Usually this is an IP
address. However, when $CTDB_NODES_SOCKETS is in use the node name is
the socket name, which might be a path several directories deep.
Each output file is created via a simple redirection and this would
fail if unexpected directories appear in the filename. 3 possible
fixes were considered:
1. Replace all '/'s in the node name by '_'s. Nice and simple.
2. Use the basename of the node name. However, sockets may be in
different directories but have the same basename.
3. Create all required directories before redirecting. This is a
little more complex and probably doesn't meet the user's
expectations.
Option (1) is implemented here.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c97d56d93d9c1007a4e85affb19ed0c2d0e11b6d)
They both need to use a -Y option to ctdb and for natgwlist we only
want the 1st line.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e781ff61e17d733349021bb036514f823c7cbfbb)
Some code re-factoring to implement this and to make it easy to
implement new ones. New simpler implementation of echo_nth() no
longer uses deleted get_nth() function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 29559f5dd099bec210e98909c9b2e048461b7c81)
"connected". Allow "rm" or "recmaster" to be a nodespec for the
recovery master. Better error handling for interaction with ctdb
client.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 05bdafed82106a0d8bfa53cd730eb3e1db68a51f)
nodespecs. Since we're now explicitly using bash, use local variables
when sensible.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 16626eaf9c63adfe780e8f51f9cd97810647e731)
address/name. To implement this stderr has redirected to stdout -
this doesn't need to be done but is the simplest implementation.
Remove -t option since it doesn't seem to accomplish much but causes
spurious messages to be displayed by ssh. Add explicit -h and --help
options. Make style of usage message consistent with documentation.
Document new features in doc/onnode.1.xml.
(This used to be ctdb commit dfaf2c1581e547df831b3171ad47acd27b4ca2af)
address/name. To implement this stderr has redirected to stdout -
this doesn't need to be done but is the simplest implementation.
Remove -t option since it doesn't seem to accomplish much but causes
spurious messages to be displayed by ssh. Add explicit -h and --help
options. Make style of usage message consistent with documentation.
Document new features in doc/onnode.1.xml.
(This used to be ctdb commit 8119238d1fa672814a7591593b517c3c42859315)