raise VolumeException(-e.args[0], e.args[1])
else:
return get_ancestor_xattr(fs, os.path.split(path)[0], attr)
+
+def create_base_dir(fs, path, mode):
+ """
+ Create volspec base/group directory if it doesn't exist
+ """
+ try:
+ fs.stat(path)
+ except cephfs.Error as e:
+ if e.args[0] == errno.ENOENT:
+ fs.mkdirs(path, mode)
+ else:
+ raise VolumeException(-e.args[0], e.args[1])