2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-04 12:07:58 +00:00

Add connect timeout option to nodeshell

This commit is contained in:
Markus Hilger
2026-07-10 04:14:46 +02:00
parent 0272137e94
commit 0f7ba1b70d
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -53,6 +53,8 @@ def run():
help='Specify a custom port for ssh')
argparser.add_option('-s', '--substitutename',
help='Use a different name other than the nodename for ssh')
argparser.add_option('-t', '--timeout', type='int', default=0,
help='Timeout in seconds for each node ssh connection')
argparser.add_option('-x', '--noexpression', action='store_true',
help='Suppress expression expansion of command')
argparser.add_option('-m', '--maxnodes', type='int',
@@ -119,6 +121,8 @@ def run():
cmdv += ['-p', '{0}'.format(options.port)]
if options.loginname:
cmdv += ['-l', options.loginname]
if options.timeout:
cmdv += ['-o', 'ConnectTimeout={0}'.format(options.timeout)]
cmdv += [sshnode, cmd]
if currprocs < concurrentprocs:
currprocs += 1
+4 -1
View File
@@ -34,9 +34,12 @@ as stderr, unlike psh which combines all stdout and stderr into stdout.
Specify a substitution name instead of the nodename. If no {} are in the substitution,
it is considered to be an append. For example, '-s -ib' would produce 'node1-ib' from 'node1'.
Full expression syntax is supported, in which case the substitution is considered to be the entire
new name. {node}-ib would be equivalent to -ib. For example, nodeshell -s {bmc} node1
new name. {node}-ib would be equivalent to -ib. For example, nodeshell -s {bmc} node1
would ssh to the BMC instead of the node.
* `-t TIMEOUT`, `--timeout=TIMEOUT`
Timeout in seconds for each node ssh connection attempt
## EXAMPLES
* Running `echo hi` on for nodes: