From: Jenkins Date: Mon, 13 Oct 2014 15:38:54 +0000 (+0000) Subject: Merge "check the configuration eqlx_cli_max_retries" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e6f779054919941fbb448f94b59b45c2023daf59;p=openstack-build%2Fcinder-build.git Merge "check the configuration eqlx_cli_max_retries" --- e6f779054919941fbb448f94b59b45c2023daf59 diff --cc cinder/volume/drivers/eqlx.py index cf3efc918,635ce3dff..ae941fff4 --- a/cinder/volume/drivers/eqlx.py +++ b/cinder/volume/drivers/eqlx.py @@@ -222,11 -215,18 +222,18 @@@ class DellEQLSanISCSIDriver(SanISCSIDri except Exception: with excutils.save_and_reraise_exception(): - LOG.error(_("Error running SSH command: %s") % command) + LOG.error(_('Error running SSH command: "%s".'), command) + def check_for_setup_error(self): + super(DellEQLSanISCSIDriver, self).check_for_setup_error() + if self.configuration.eqlx_cli_max_retries < 0: + raise exception.InvalidInput( + reason=_("eqlx_cli_max_retries must be greater than or " + "equal to 0")) + def _eql_execute(self, *args, **kwargs): return self._run_ssh( - args, attempts=self.configuration.eqlx_cli_max_retries) + args, attempts=self.configuration.eqlx_cli_max_retries + 1) def _get_volume_data(self, lines): prefix = 'iSCSI target name is '