'Returns an error if prerequisites aren\'t met.'

def check_for_setup_error(self):

    self._check_gpfs_state()
    if (self.configuration.gpfs_mount_point_base is None):
        msg = _('Option    gpfs_mount_point_base    is    not    set    correctly.')
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    if (self.configuration.gpfs_images_share_mode and (self.configuration.gpfs_images_dir is None)):
        msg = _('Option    gpfs_images_dir    is    not    set    correctly.')
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    if ((self.configuration.gpfs_images_share_mode == 'copy_on_write') and (not _same_filesystem(self.configuration.gpfs_mount_point_base, self.configuration.gpfs_images_dir))):
        msg = (_('gpfs_images_share_mode    is    set    to    copy_on_write,    but    %(vol)s    and    %(img)s    belong    to    different    file    systems.') % {'vol': self.configuration.gpfs_mount_point_base, 'img': self.configuration.gpfs_images_dir})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    if ((self.configuration.gpfs_images_share_mode == 'copy_on_write') and (not self._is_same_fileset(self.configuration.gpfs_mount_point_base, self.configuration.gpfs_images_dir))):
        msg = (_('gpfs_images_share_mode    is    set    to    copy_on_write,    but    %(vol)s    and    %(img)s    belong    to    different    filesets.') % {'vol': self.configuration.gpfs_mount_point_base, 'img': self.configuration.gpfs_images_dir})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    _gpfs_cluster_release_level = self._get_gpfs_cluster_release_level()
    if (not (_gpfs_cluster_release_level >= GPFS_CLONE_MIN_RELEASE)):
        msg = (_('Downlevel    GPFS    Cluster    Detected.        GPFS    Clone    feature    not    enabled    in    cluster    daemon    level    %(cur)s    -    must    be    at    least    at    level    %(min)s.') % {'cur': _gpfs_cluster_release_level, 'min': GPFS_CLONE_MIN_RELEASE})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    for directory in [self.configuration.gpfs_mount_point_base, self.configuration.gpfs_images_dir]:
        if (directory is None):
            continue
        if (not directory.startswith('/')):
            msg = (_('%s    must    be    an    absolute    path.') % directory)
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
        if (not os.path.isdir(directory)):
            msg = (_('%s    is    not    a    directory.') % directory)
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
        self._verify_gpfs_path_state(directory)
        (filesystem, fslevel) = self._get_gpfs_fs_release_level(directory)
        if (not (fslevel >= GPFS_CLONE_MIN_RELEASE)):
            msg = (_('The    GPFS    filesystem    %(fs)s    is    not    at    the    required    release    level.        Current    level    is    %(cur)s,    must    be    at    least    %(min)s.') % {'fs': filesystem, 'cur': fslevel, 'min': GPFS_CLONE_MIN_RELEASE})
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
