Ejemplo n.º 1
0
def unmount_file_system(rx_connection, path):
    """ unmount the file system which will use in cbbackup manager after post snapshot"""
    try:
        utilities.execute_bash(rx_connection,
                               CommandFactory.unmount_file_system(path))
    except Exception as err:
        logger.debug("error here {}".format(err.message))
        raise UnmountFileSystemError(err.message)
Ejemplo n.º 2
0
def clean_stale_mountpoint(connection, path):

    umount_std, umount_stderr, umount_exit_code = utilities.execute_bash(
        connection,
        CommandFactory.unmount_file_system(mount_path=path, options='-lf'))
    if umount_exit_code != 0:
        logger.error("Problem with cleaning mount path")
        logger.error("stderr {}".format(umount_stderr))
        raise UserError("Problem with cleaning mount path",
                        "Ask OS admin to check mount points", umount_stderr)