[node-patches] Change in ovirt-node[master]: Fix kdump on iSCSI roots

rbarry at redhat.com rbarry at redhat.com
Tue Nov 11 18:48:37 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Fix kdump on iSCSI roots
......................................................................

Fix kdump on iSCSI roots

kdumpctl wants to be able to see iSCSI targets. If we're running
on an iSCSI root, pick them up before trying to configure it.

Change-Id: I2e0e981f388944f0dc99688a97ee370175995916
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063561
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/config/defaults.py
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/57/35057/1

diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index c98d069..b5374e7 100755
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -1111,6 +1111,19 @@
                 [aug.remove(v) for v in vals.keys() if vals[v] is not None]
                 aug.save()
 
+        class GetISCSITargets(utils.Transaction.Element):
+            title = "Refreshing iSCSI Targets"
+
+            def commit(self):
+                iscsi_config = iSCSI().retrieve()
+                with open("/dev/null", "wb") as DEVNULL:
+                    process.check_call(["iscsiadm", "-m", "discovery", "-t",
+                                        "sendtargets", "-p",
+                                        "{host}:{port}".format(
+                                            host=iscsi_config["target_host"],
+                                            port=iscsi_config["target_port"])],
+                                       stdout=DEVNULL, stderr=DEVNULL)
+
         class LocalKdumpConfig(utils.Transaction.Element):
             title = "Setting local kdump config"
 
@@ -1251,6 +1264,8 @@
                 tx.append(PopulateSshKeys())
             tx.append(CreateSshKdumpConfig())
         elif local in [True, False]:
+            if system.is_iscsi():
+                tx.append(GetISCSITargets())
             tx.append(LocalKdumpConfig())
         else:
             final_txe = RemoveKdumpConfig(backup_txe.backups)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e0e981f388944f0dc99688a97ee370175995916
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list