'Throw an exception if configuration values/setup isn\'t okay.'

def check_for_setup_error(self):

    try:
        params = [self.VGCCLUSTER, '--version']
        self._execute(run_as_root=True, *params)
    except processutils.ProcessExecutionError as err:
        self._log_cli_err(err)
        msg = _('Cannot    run    vgc-cluster    command,    please    ensure    software    is    installed    and    permissions    are    set    properly.')
        raise exception.VolumeDriverException(message=msg)
    self._vgc_host = None
    self._hostname()
    r = six.text_type(self.configuration.safe_get('hgst_redundancy'))
    if (r not in ['0', '1']):
        msg = _('hgst_redundancy    must    be    set    to    0    (non-HA)    or    1    (HA)    in    cinder.conf.')
        raise exception.VolumeDriverException(message=msg)
    try:
        pwd.getpwnam(self.configuration.safe_get('hgst_space_user'))
        grp.getgrnam(self.configuration.safe_get('hgst_space_group'))
    except KeyError as err:
        msg = (_('hgst_group    %(grp)s    and    hgst_user    %(usr)s    must    map    to    valid    users/groups    in    cinder.conf') % {'grp': self.configuration.safe_get('hgst_space_group'), 'usr': self.configuration.safe_get('hgst_space_user')})
        raise exception.VolumeDriverException(message=msg)
    try:
        int(self.configuration.safe_get('hgst_space_mode'))
    except Exception as err:
        msg = _('hgst_space_mode    must    be    an    octal/int    in    cinder.conf')
        raise exception.VolumeDriverException(message=msg)
    try:
        params = [self.VGCCLUSTER, 'network-list']
        params += ['-N', self.configuration.safe_get('hgst_net')]
        self._execute(run_as_root=True, *params)
    except processutils.ProcessExecutionError as err:
        self._log_cli_err(err)
        msg = (_('hgst_net    %(net)s    specified    in    cinder.conf    not    found    in    cluster') % {'net': self.configuration.safe_get('hgst_net')})
        raise exception.VolumeDriverException(message=msg)
    sl = self.configuration.safe_get('hgst_storage_servers')
    if ((sl is None) or (six.text_type(sl) == '')):
        msg = _('hgst_storage_servers    must    be    defined    in    cinder.conf')
        raise exception.VolumeDriverException(message=msg)
    servers = sl.split(',')
    for server in servers:
        self._check_host_storage(server)
    return True
