Fix eqlx endless loop when server closes the connection
Fix eqlx endless loop when server closes the connection

The eqlx driver would identify one CLI command completion by looking
for the system name prompt in the output ("ARRAY_NAME>"). But some
cases where there is no "ARRAY_NAME>" in the output. The eqlx server
closes the ssh connection immediately after sends such message, which
lead to a infinite loop in _get_output() and 100% CPU utilization.

What the patch does is to check the return of chan.recv(), if the
length of returned string is zero, which means server has closed the
connection, the loop will be exited.

Closes-Bug: #1410627

Signed-off-by: Dunrong Huang <0c36fce70fa0cd89087deb8b79831a4cea16f5ca@gmail.com>
Change-Id: I600c38d98f0f808c98df010a89ac58ca8e43f1a3
(cherry picked from commit a762665595f0f38bacb50d1a032df1c82b3a4c60)

alex8866/cinder,alex8866/cinder,redhat-openstack/cinder,redhat-openstack/cinder