From 3df7a36c48826b430f599bb515e5481ebc55b6de Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 23 Oct 2019 16:47:42 -0400 Subject: [PATCH] Fix a number of issues with maxnodes Some commands did not function correctly after modifications. --- confluent_client/bin/nodebmcreset | 2 +- confluent_client/bin/nodeeventlog | 6 +++--- confluent_client/bin/nodersync | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/confluent_client/bin/nodebmcreset b/confluent_client/bin/nodebmcreset index 57c15c58..ae253e77 100755 --- a/confluent_client/bin/nodebmcreset +++ b/confluent_client/bin/nodebmcreset @@ -45,7 +45,7 @@ session = client.Command() exitcode = 0 errorNodes = set([]) - +session.stop_if_noderange_over(noderange, options.maxnodes) success = session.simple_noderange_command(noderange, 'configuration/management_controller/reset', 'reset', key='state', errnodes=errorNodes) # = 0 if successful # Determine which nodes were successful and print them diff --git a/confluent_client/bin/nodeeventlog b/confluent_client/bin/nodeeventlog index 6447c578..ff9ad4e2 100755 --- a/confluent_client/bin/nodeeventlog +++ b/confluent_client/bin/nodeeventlog @@ -50,11 +50,11 @@ except IndexError: sys.exit(1) client.check_globbing(noderange) deletemode = False -if len(sys.argv) > 3: +if len(args) > 2: argparser.print_help() sys.exit(1) -if len(sys.argv) == 3: - if sys.argv[2] == 'clear': +if len(args) == 2: + if args[1] == 'clear': deletemode = True else: argparser.print_help() diff --git a/confluent_client/bin/nodersync b/confluent_client/bin/nodersync index 5545ffb5..0c7ff568 100755 --- a/confluent_client/bin/nodersync +++ b/confluent_client/bin/nodersync @@ -104,7 +104,7 @@ def run(): if desc['type'] == 'stdout': if node not in pernodeout: pernodeout[node] = '' - pernodeout[node] += stringify(data) + pernodeout[node] += client.stringify(data) if '\n' in pernodeout[node]: currout, pernodeout[node] = pernodeout[node].split('\n', 1) if currout: