Commit 032250b2 by Czémán Arnold

ceph: add error handling for get_secret_key()

parent e89c44d4
......@@ -82,9 +82,13 @@ def map_rbd(conf, ceph_path, local_path):
def get_secret_key(conf):
return subprocess.check_output(
(["/usr/bin/ceph", "auth", "print-key", "client.%s" % conf.user] +
conf.cmd_args()))
try:
return subprocess.check_output(
(["/usr/bin/ceph", "auth", "print-key", "client.%s" % conf.user] +
conf.cmd_args()))
except subprocess.CalledProcessError as e:
logger.error(e)
return None
def parse_endpoint(mon):
......
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 sign in to comment