]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "check the configuration eqlx_cli_max_retries"
authorJenkins <jenkins@review.openstack.org>
Mon, 13 Oct 2014 15:38:54 +0000 (15:38 +0000)
committerGerrit Code Review <review@openstack.org>
Mon, 13 Oct 2014 15:38:54 +0000 (15:38 +0000)
1  2 
cinder/volume/drivers/eqlx.py

index cf3efc9185493faf3ac5eea250576810afd482aa,635ce3dff7e8f9f761afd10a1caea617bc7795db..ae941fff43e32952fe9ec447f99ccd1e86318e52
@@@ -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 '