[node-patches] Change in ovirt-node[master]: set iscsi initiator name before connecting during iscsi inst...
jboggs at redhat.com
jboggs at redhat.com
Wed Oct 16 02:31:42 UTC 2013
Joey Boggs has uploaded a new change for review.
Change subject: set iscsi initiator name before connecting during iscsi installs
......................................................................
set iscsi initiator name before connecting during iscsi installs
rhbz#903947
Change-Id: I387fe6a63434a56d1f3115347dd95788af329781
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M src/ovirtnode/install.py
M src/ovirtnode/ovirtfunctions.py
M src/ovirtnode/storage.py
3 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/13/20213/1
diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index 07ae13c..f22ee4f 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -490,6 +490,9 @@
OVIRT_VARS["OVIRT_BOOTIF"],
OVIRT_VARS["OVIRT_BOOTIF"],
OVIRT_VARS["OVIRT_BOOTIF"])
+ if "OVIRT_ISCSI_NAME" in OVIRT_VARS:
+ self.bootparams+= "rd.iscsi.initiator=%s " % \
+ OVIRT_VARS["OVIRT_ISCSI_NAME"]
else:
self.root_param = "root=live:LABEL=Root"
self.bootparams = "ro rootfstype=auto rootflags=ro "
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 21363cf..a81d642 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -75,6 +75,7 @@
"/etc/libvirt/qemu/",
"/etc/ssh/sshd_config",
"/etc/pki",
+ "/etc/iscsi/initiatorname.iscsi",
"/etc/logrotate.d/ovirt-node",
"/var/lib/random-seed" ]
diff --git a/src/ovirtnode/storage.py b/src/ovirtnode/storage.py
index 635ded5..7a2a6a6 100644
--- a/src/ovirtnode/storage.py
+++ b/src/ovirtnode/storage.py
@@ -26,6 +26,7 @@
import logging
import subprocess
import shlex
+from ovirtnode.iscsi import set_iscsi_initiator
logger = logging.getLogger(__name__)
@@ -767,6 +768,9 @@
self.boot_size_si = self.BOOT_SIZE * (1024 * 1024) / (1000 * 1000)
if _functions.is_iscsi_install():
+ if "OVIRT_ISCSI_NAME" in _functions.OVIRT_VARS:
+ iscsi_name = _functions.OVIRT_VARS["OVIRT_ISCSI_NAME"]
+ set_iscsi_initiator(iscsi_name)
# login to target and setup disk
get_targets = ("iscsiadm -m discovery -p %s:%s -t sendtargets" %
(_functions.OVIRT_VARS["OVIRT_ISCSI_TARGET_HOST"],
--
To view, visit http://gerrit.ovirt.org/20213
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I387fe6a63434a56d1f3115347dd95788af329781
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list