Merge "Rename generic variable named with mysql specific name"

This commit is contained in:
Jenkins 2014-11-19 03:01:36 +00:00 committed by Gerrit Code Review
commit b36fefec5d

View File

@ -35,14 +35,16 @@ class VolumeDevice(object):
def __init__(self, device_path):
self.device_path = device_path
def migrate_data(self, mysql_base):
"""Synchronize the data from the mysql directory to the new volume."""
def migrate_data(self, source_dir):
"""Synchronize the data from the source directory to the new
volume.
"""
self.mount(TMP_MOUNT_POINT, write_to_fstab=False)
if not mysql_base[-1] == '/':
mysql_base = "%s/" % mysql_base
if not source_dir[-1] == '/':
source_dir = "%s/" % source_dir
utils.execute("sudo", "rsync", "--safe-links", "--perms",
"--recursive", "--owner", "--group", "--xattrs",
"--sparse", mysql_base, TMP_MOUNT_POINT)
"--sparse", source_dir, TMP_MOUNT_POINT)
self.unmount(TMP_MOUNT_POINT)
def _check_device_exists(self):