Commit d30bbab7 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

ci: Fix addition of Ganeti RAPI user

'openssl' 1.0.1e-2 prefixes the output with "(stdin)= ". Because of this
registration of a new Ganeti RAPI user failed. This commit fixes this by
removing the prefix, before adding it to Ganeti RAPI users file.
parent 6b476367
......@@ -841,6 +841,8 @@ def add_rapi_user():
echo -n "{0}:Ganeti Remote API:{1}" | openssl md5
""".format(env.env.synnefo_user, env.env.synnefo_rapi_passwd)
result = try_run(cmd)
if result.startswith("(stdin)= "):
result = result.split("(stdin)= ")[1]
cmd = """
echo "{0} {1}{2} write" >> /var/lib/ganeti/rapi/users
""".format(env.env.synnefo_user, '{ha1}',result)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment