]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix: Boot from image with HNAS iSCSI
authorRafael Toschi Chiafarelli <rafael.chiafarelli@fit-tecnologia.org.br>
Mon, 23 Mar 2015 16:36:35 +0000 (13:36 -0300)
committerErlon R. Cruz <erlon.cruz@fit-tecnologia.org.br>
Fri, 27 Mar 2015 11:49:35 +0000 (08:49 -0300)
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
cinder/volume/drivers/hds/hnas_backend.py

index 2688c69ee74a9dda398006135dbaa5a83e9ef3bc..a63d089628b48a899633dae9372ddbb75e7055ae 100644 (file)
@@ -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',
index c548ef62f30622137c84c05d4a32eec76b72f12d..69eed997be3e7b6ad956b68bb7cc39e698ca0d64 100644 (file)
@@ -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),