2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-10-06 17:46:57 +00:00

Fix error propogation on manual discovery

Manual discovery needs to give the user, not the log info about the
failure.
This commit is contained in:
Jarrod Johnson
2017-10-06 16:10:47 -04:00
parent 158a9705db
commit 672c127621
2 changed files with 4 additions and 1 deletions
@@ -757,6 +757,8 @@ def discover_node(cfg, handler, info, nodename, manual):
handler.config(nodename)
except Exception as e:
info['discofailure'] = 'bug'
if manual:
raise
log.log(
{'error':
'Error encountered trying to set up {0}, {1}'.format(
@@ -91,7 +91,8 @@ class NodeHandler(generic.NodeHandler):
if ('secret.hardwaremanagementuser' not in cd or
'secret.hardwaremanagementpassword' not in cd):
raise exc.TargetEndpointBadCredentials(
'Missing user and/or password')
'secret.hardwaremanagementuser and/or '
'secret.hardwaremanagementpassword was not configured')
if ('hardwaremanagement.manager' in cd and
cd['hardwaremanagement.manager']['value'] and
not cd['hardwaremanagement.manager']['value'].startswith(