diff --git a/confluent_client/bin/nodeping b/confluent_client/bin/nodeping index 94fca0ab..b9c45340 100755 --- a/confluent_client/bin/nodeping +++ b/confluent_client/bin/nodeping @@ -43,7 +43,7 @@ def run(): argparser.add_option('-f', '-c', '--count', type='int', default=168, help='Number of commands to run at a time') argparser.add_option('-s', '--substitutename', - help='Use a different name other than the nodename for ping') + help='Use a different name other than the nodename for ping, with {}, it is the entire name evaluated as an expression, otherwise it is used as a suffix') # among other things, FD_SETSIZE limits. Besides, spawning too many # processes can be unkind for the unaware on memory pressure and such... (options, args) = argparser.parse_args() @@ -83,9 +83,9 @@ def run(): cmdv = ['ping', '-c', '1', '-W', '1', pingnode] if currprocs < concurrentprocs: currprocs += 1 - run_cmdv(node, cmdv, all, pipedesc) + run_cmdv(pingnode, cmdv, all, pipedesc) else: - pendingexecs.append((node, cmdv)) + pendingexecs.append((pingnode, cmdv)) if not all or exitcode: sys.exit(exitcode) rdy, _, _ = select.select(all, [], [], 10) diff --git a/confluent_client/doc/man/nodeping.ronn b/confluent_client/doc/man/nodeping.ronn index 3a1a6a37..ec49778a 100644 --- a/confluent_client/doc/man/nodeping.ronn +++ b/confluent_client/doc/man/nodeping.ronn @@ -14,7 +14,9 @@ It can also be used with the `-s` flag to change the ping location to something * `-h`, `--help`: Show help message and exit * `-s` SUBSTITUTENAME, --substitutename=SUBSTITUTENAME - Use a different name other than the nodename for ping + Use a different name other than the nodename for ping. This may be a + expression, such as {bmc} or, if no { character is present, it is treated as a suffix. -s -eth1 would make n1 become n1-eth1, for example. + ## EXAMPLES * Pinging a node : @@ -31,6 +33,13 @@ It can also be used with the `-s` flag to change the ping location to something `# nodeping -s {bmc} ` ` Node-bmc : ping` +* Pinging by specifying a suffix: + `# nodeping d1-d4 -s -eth1` + `d2-eth1: no_ping` + `d1-eth1: no_ping` + `d3-eth1: no_ping` + `d4-eth1: no_ping` + * Fail to ping node: `# nodeping ` `node : no_ping`