mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Fix pessimistic error on apikey
Actually make sure that the apikey retrieval failed before erroring.
This commit is contained in:
parent
fc22c87ce9
commit
54fde4af21
@ -28,9 +28,10 @@ def get_apikey(nodename, mgr):
|
||||
apikey = apikey.decode('utf8')
|
||||
if apikey.startswith('SEALED:'):
|
||||
apikey = ""
|
||||
sys.stderr.write(
|
||||
"Failed getting API token, check deployment.apiarmed attribute on {}\n".format(nodename))
|
||||
time.sleep(10)
|
||||
if not apikey:
|
||||
sys.stderr.write(
|
||||
"Failed getting API token, check deployment.apiarmed attribute on {}\n".format(nodename))
|
||||
time.sleep(10)
|
||||
with open('/etc/confluent/confluent.apikey', 'w+') as apiout:
|
||||
apiout.write(apikey)
|
||||
apikey = apikey.strip()
|
||||
|
Loading…
Reference in New Issue
Block a user