[node-patches] Change in ovirt-node[master]: [DONTCOMMIT] Run ai in shell with job control

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Jul 11 18:08:26 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: [DONTCOMMIT] Run ai in shell with job control
......................................................................

[DONTCOMMIT] Run ai in shell with job control

Change-Id: I25646786501f044b8f75381919e836752f21c27d
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-init-functions.sh.in
M src/ovirt/node/utils/system.py
2 files changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/50/16750/1

diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index 1e25aa9..aa9aace 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -37,11 +37,16 @@
 AUGTOOL_CONFIG=/var/tmp/augtool-config
 EARLY_DIR=/etc/ovirt-early.d
 
-# Drop to a shell
+
+run_in_shell() {
+    openvt -f -c 1 -w -s -l -- $@
+}
+
+# Drop to an emergency shell
 emergency_shell() {
     plymouth --hide-splash
     echo "$@" > /dev/tty1
-    openvt -f -c 1 -w -s -l -- bash
+    run_in_shell bash
     plymouth --show-splash
 }
 
@@ -1076,7 +1081,7 @@
     auto_install=$?
     if [ "$auto_install" = "0" -o "$stateless" = "0" ]; then
         breakpoint "pre-auto-install"
-        /usr/libexec/ovirt-auto-install
+        run_in_shell "/usr/libexec/ovirt-auto-install"
         rc=$?
         breakpoint "post-auto-install"
         # Handle Log file
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 3bd969d..80667f6 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -104,7 +104,9 @@
         r = process.check_output(["service", name, cmd], **kwargs)
     except process.CalledProcessError as e:
         r = e.returncode
-        LOGGER.exception("Service: %s" % e.output)
+        LOGGER.exception(("Failed to start the service '%s' " +
+                          "(raise exception? %s): %s") %
+                         (cmd, do_raise, e.output))
         if do_raise:
             raise
     return r


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25646786501f044b8f75381919e836752f21c27d
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