def get_glusterd_workdir():
"""
Command to get Glusterd working dir. If failed returns the
default directory /var/lib/glusterd
"""
p = subprocess.Popen(["gluster", "system::", "getwd"],
stdout=subprocess.PIPE)
out, _ = p.communicate()
if p.returncode == 0:
return out.strip()
else:
return DEFAULT_GLUSTERD_WORKDIR
评论列表
文章目录