Fix overcloud node instrospect exception output
Currently when something fails when introspecting we get this: (undercloud) [stack@undercloud-0 ~]$ openstack overcloud node introspect --provide 1b646cb5-39e3-4ef9-a440-9a7c4ee0c6e1 Waiting for introspection to finish... Waiting for messages on queue 'tripleo' with no timeout. Retrying 1 nodes that failed introspection. Attempt 1 of 3 Retrying 1 nodes that failed introspection. Attempt 2 of 3 Retrying 1 nodes that failed introspection. Attempt 3 of 3 Retry limit reached with 1 nodes still failing introspection Exception occured while running the command Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 30, in run super(Command, self).run(parsed_args) File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run return_code = self.take_action(parsed_args) or 0 File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_node.py", line 208, in take_action run_validations=parsed_args.run_validations File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/baremetal.py", line 159, in introspect .join(msg for msg in payload['message'] if msg)) tripleoclient.exceptions.IntrospectionError: Introspection completed with errors: R e t r y l i m i t ..... With this fix we correctly get a sane output: (undercloud) [stack@undercloud-0 ~]$ openstack overcloud node introspect --provide 1b646cb5-39e3-4ef9-a440-9a7c4ee0c6e1 Waiting for introspection to finish... Waiting for messages on queue 'tripleo' with no timeout. Retrying 1 nodes that failed introspection. Attempt 1 of 3 Retrying 1 nodes that failed introspection. Attempt 2 of 3 Retrying 1 nodes that failed introspection. Attempt 3 of 3 Retry limit reached with 1 nodes still failing introspection Exception occured while running the command Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 30, in run super(Command, self).run(parsed_args) File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run return_code = self.take_action(parsed_args) or 0 File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_node.py", line 208, in take_action run_validations=parsed_args.run_validations File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/baremetal.py", line 159, in introspect .format(payload['message'])) tripleoclient.exceptions.IntrospectionError: Introspection completed with errors: Retry limit reached with 1 nodes still failing introspection Introspection completed with errors: Retry limit reached with 1 nodes still failing introspection Change-Id: I0f5bd1a2eb511041e6b93eacc71c964648bdf7ef
This commit is contained in:
parent
33a853cbfb
commit
42af13818a
|
@ -155,8 +155,8 @@ def introspect(clients, **workflow_input):
|
|||
|
||||
if payload['status'] != 'SUCCESS':
|
||||
raise exceptions.IntrospectionError(
|
||||
"Introspection completed with errors:\n%s" % '\n'
|
||||
.join(msg for msg in payload['message'] if msg))
|
||||
"Introspection completed with errors: {}"
|
||||
.format(payload['message']))
|
||||
|
||||
|
||||
def introspect_manageable_nodes(clients, **workflow_input):
|
||||
|
|
Loading…
Reference in New Issue