File System Mounted : YES \n\
Logical Unit Mounted: No"
+HNAS_RESULT27 = "Connection reset"
+
HNAS_CMDS = {
('ssh', '0.0.0.0', 'supervisor', 'supervisor', 'evsfs', 'list'):
'ssh', '0.0.0.0', 'supervisor', 'supervisor',
'df', '-a')
+ m_utl.side_effect = putils.ProcessExecutionError(stdout='',
+ stderr=HNAS_RESULT27,
+ exit_code=255)
+ self.hnas_bend.drv_configs['ssh_enabled'] = 'False'
+ self.assertRaises(exception.HNASConnError, self.hnas_bend.run_cmd,
+ 'ssh', '0.0.0.0', 'supervisor', 'supervisor',
+ 'df', '-a')
+
# Test exception throwing when using SSH
m_ssh.side_effect = putils.ProcessExecutionError(stdout='',
stderr=HNAS_RESULT22,
LOG.debug("SSC connection error!")
msg = _("Failed to establish SSC connection.")
raise exception.HNASConnError(msg)
+ elif 'Connection reset' in e.stderr:
+ LOG.debug("HNAS connection reset!")
+ msg = _("HNAS has disconnected SSC")
+ raise exception.HNASConnError(msg)
else:
- raise putils.ProcessExecutionError
+ raise
else:
if self.drv_configs['cluster_admin_ip0'] is None: