From: Rafael Toschi Chiafarelli Date: Mon, 23 Mar 2015 16:36:35 +0000 (-0300) Subject: Fix: Boot from image with HNAS iSCSI X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=01daaa0fe916797deec5594e6a931dfa7096659d;p=openstack-build%2Fcinder-build.git Fix: Boot from image with HNAS iSCSI Number of the logical unit was passed to the run_cmd function as a integer and should be passed as a string. Change-Id: I9a66c46294f85fb19b2a01f0cde8f231467f936f Closes-Bug: #1430778 --- diff --git a/cinder/tests/test_hds_hnas_backend.py b/cinder/tests/test_hds_hnas_backend.py index 2688c69ee..a63d08962 100644 --- a/cinder/tests/test_hds_hnas_backend.py +++ b/cinder/tests/test_hds_hnas_backend.py @@ -225,7 +225,7 @@ HNAS_CMDS = { ["%s" % HNAS_RESULT12, ""], ('ssh', '0.0.0.0', 'supervisor', 'supervisor', 'console-context', '--evs', '1', 'iscsi-target', 'addlu', 'test_iqn', - 'test_lun', 0): + 'test_lun', '0'): ["%s" % HNAS_RESULT13, ""], ('ssh', '0.0.0.0', 'supervisor', 'supervisor', 'console-context', '--evs', '1', 'iscsi-target', 'dellu', 'test_iqn', diff --git a/cinder/volume/drivers/hds/hnas_backend.py b/cinder/volume/drivers/hds/hnas_backend.py index c548ef62f..69eed997b 100644 --- a/cinder/volume/drivers/hds/hnas_backend.py +++ b/cinder/volume/drivers/hds/hnas_backend.py @@ -502,7 +502,7 @@ class HnasBackend(object): out, err = self.run_cmd(cmd, ip0, user, pw, "console-context", "--evs", _evsid, 'iscsi-target', 'addlu', - iqn, lun, hlun, + iqn, lun, six.text_type(hlun), check_exit_code=True) conn = (int(hlun), lun, initiator, int(hlun), fulliqn, int(hlun),