From 01daaa0fe916797deec5594e6a931dfa7096659d Mon Sep 17 00:00:00 2001 From: Rafael Toschi Chiafarelli Date: Mon, 23 Mar 2015 13:36:35 -0300 Subject: [PATCH] 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 --- cinder/tests/test_hds_hnas_backend.py | 2 +- cinder/volume/drivers/hds/hnas_backend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), -- 2.45.2