Merge pull request #30654 from ajarr/fix-42096

mgr/volumes: fix incorrect snapshot path creation

Reviewed-by: Jos Collin <jcollin@redhat.com>
This commit is contained in:
Jos Collin 2019-10-03 12:11:43 +05:30 committed by GitHub
commit b154d4f87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,13 +90,13 @@ class SubvolumeSpec(object):
"""
return the subvolume snapshot path for a given snapshot name
"""
return os.path.join(self.subvolume_path, snapdir, snapname)
return os.path.join(self.subvolume_path, snapdir.encode('utf-8'), snapname.encode('utf-8'))
def make_group_snap_path(self, snapdir, snapname):
"""
return the group snapshot path for a given snapshot name
"""
return os.path.join(self.group_path, snapdir, snapname)
return os.path.join(self.group_path, snapdir.encode('utf-8'), snapname.encode('utf-8'))
def __str__(self):
return "{0}/{1}".format(self.groupid, self.subvolumeid)