From 22f6198f60f388fde32625c7abbccf2af43b58c5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 Jan 2020 14:35:58 -0500 Subject: [PATCH] Fix nodebmcreset on bad noderange This prevents confusing python stack when a bad noderange is specified. --- confluent_client/bin/nodebmcreset | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_client/bin/nodebmcreset b/confluent_client/bin/nodebmcreset index ae253e77..09a6221b 100755 --- a/confluent_client/bin/nodebmcreset +++ b/confluent_client/bin/nodebmcreset @@ -47,6 +47,8 @@ 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 +if success != 0: + sys.exit(success) # Determine which nodes were successful and print them