[node-patches] Change in ovirt-node[master]: installer: Set iSCSI initiator name

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Jan 28 14:17:01 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: installer: Set iSCSI initiator name
......................................................................

installer: Set iSCSI initiator name

Previously the iSCSI initiator name (if given or random) was set after
the installation, but in some cases the target only allows discovery if
the initiator has the correct name.
With this patch the iSCSI initiator name is set (if it's given) before
the target discovery is initiated.

rhbz#903947

Change-Id: I606031056025d4dd22e923054be8693f8190e18e
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirtnode/install.py
M scripts/ovirtnode/storage.py
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/66/11466/1

diff --git a/scripts/ovirtnode/install.py b/scripts/ovirtnode/install.py
index b1e3dbc..ade10d4 100755
--- a/scripts/ovirtnode/install.py
+++ b/scripts/ovirtnode/install.py
@@ -307,6 +307,10 @@
                         except:
                             pass
                     f.close()
+                    if "OVIRT_ISCSI_NAME" in OVIRT_VARS and \
+                       OVIRT_VARS["OVIRT_ISCSI_NAME"]:
+                        iscsi_name = OVIRT_VARS["OVIRT_ISCSI_NAME"]
+                        _iscsi.set_iscsi_initiator(iscsi_name)
                     iscsiadm_cmd = (("iscsiadm -p %s:%s -m discovery -t " +
                                      "sendtargets") % (
                                         OVIRT_VARS["OVIRT_ISCSI_TARGET_IP"],
diff --git a/scripts/ovirtnode/storage.py b/scripts/ovirtnode/storage.py
index faba3f3..7091990 100644
--- a/scripts/ovirtnode/storage.py
+++ b/scripts/ovirtnode/storage.py
@@ -742,7 +742,7 @@
 
         self.boot_size_si = self.BOOT_SIZE * (1024 * 1024) / (1000 * 1000)
         if _functions.is_iscsi_install():
-            # login to target and setup disk"
+            # login to target and setup disk
             get_targets = ("iscsiadm -m discovery -p %s:%s -t sendtargets" %
                            (_functions.OVIRT_VARS["OVIRT_ISCSI_TARGET_HOST"],
                            _functions.OVIRT_VARS["OVIRT_ISCSI_TARGET_PORT"]))


--
To view, visit http://gerrit.ovirt.org/11466
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I606031056025d4dd22e923054be8693f8190e18e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list