[node-patches] Change in ovirt-node[ovirt-3.5]: auto-install: Only run hooks once
fabiand at redhat.com
fabiand at redhat.com
Wed Dec 3 16:18:49 UTC 2014
Fabian Deutsch has uploaded a new change for review.
Change subject: auto-install: Only run hooks once
......................................................................
auto-install: Only run hooks once
And also silence some errors around the second run.
Change-Id: I892b0ce4ce3be43953122598de2991eb509f3d9f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148716
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-auto-install.py
M scripts/ovirt-functions.in
M src/ovirt/node/utils/hooks.py
3 files changed, 8 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/48/35848/1
diff --git a/scripts/ovirt-auto-install.py b/scripts/ovirt-auto-install.py
index 272390c..66f6c9e 100755
--- a/scripts/ovirt-auto-install.py
+++ b/scripts/ovirt-auto-install.py
@@ -211,6 +211,12 @@
class RunHooks(Transaction.Element):
+ """Run post-install hooks
+ e.g. to avoid reboot loops using Cobbler PXE only once
+ Cobbler XMLRPC post-install trigger (XXX is there cobbler SRV record?):
+ wget "http://192.168.50.2/cblr/svc/op/trig/mode/post/system/$(hostname)"
+ -O /dev/null
+ """
title = "Running Hooks"
def commit(self):
diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index 05dc2f3..717bc71 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -880,18 +880,6 @@
log "Relabeling failed, please check logs"
return 1
fi
- # run post-install hooks
- # e.g. to avoid reboot loops using Cobbler PXE only once
- # Cobbler XMLRPC post-install trigger (XXX is there cobbler SRV record?):
- # wget "http://192.168.50.2/cblr/svc/op/trig/mode/post/system/$(hostname)"
- # -O /dev/null
- for hook in $(ls /etc/ovirt-config-boot.d/* 2>/dev/null); do
- $hook
- rc=$?
- if [ $? -ne 0 ]; then
- log "Hook \"$hook\" failed."
- fi
- done
/sbin/reboot
}
@@ -1197,6 +1185,7 @@
EOP
}
+
plymouth()
{
[[ -x /bin/plymouth ]] && /bin/plymouth $@
diff --git a/src/ovirt/node/utils/hooks.py b/src/ovirt/node/utils/hooks.py
index b9563ce..060b1c0 100644
--- a/src/ovirt/node/utils/hooks.py
+++ b/src/ovirt/node/utils/hooks.py
@@ -54,7 +54,7 @@
"""
assert name in Hooks.known
path = Hooks.hooks_path_tpl.format(name=name)
- Hooks._run(path)
+ Hooks.__run(path)
@staticmethod
def __run(hooks_directory):
--
To view, visit http://gerrit.ovirt.org/35848
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I892b0ce4ce3be43953122598de2991eb509f3d9f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list