[node-patches] Change in ovirt-node[master]: unmount_logging kills o-c-autoinstall

jboggs at redhat.com jboggs at redhat.com
Fri Oct 12 14:31:12 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: unmount_logging kills o-c-autoinstall
......................................................................

unmount_logging kills o-c-autoinstall

rhbz#862351

Change-Id: Ibf72d9bf89f77b1127689110d39861dc510182c8
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/ovirtnode/ovirtfunctions.py
1 file changed, 6 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/16/8516/1

diff --git a/scripts/ovirtnode/ovirtfunctions.py b/scripts/ovirtnode/ovirtfunctions.py
index a3667be..fe49e7f 100644
--- a/scripts/ovirtnode/ovirtfunctions.py
+++ b/scripts/ovirtnode/ovirtfunctions.py
@@ -519,17 +519,12 @@
     prgs_output = prgs.stdout.read()
     for prg in prgs_output.split():
         svc = prg = prg[1:]
-        ret = system_closefds("service " + svc +" stop &>/dev/null")
-        if ret != 0:
-            # make sure we don't kill ourselves.
-            pids_cmd = "pidof " + svc
-            pids = subprocess_closefds(pids_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
-            pids_output = pids.stdout.read()
-            for pid in pids_output.split():
-                if int(pid) != os.getpid():
-                    system_closefds("kill -9 "+ pid)
-        logging_services.append(svc)
-    return logging_services
+        if not svc == "python":
+            ret = system_closefds("service " + svc +" stop &>/dev/null")
+            if ret != 0:
+                system_closefds("pkill " + svc)
+            logging_services.append(svc)
+        return logging_services
     # debugging help
     #system_closefds("lsof +D /var/log")
 


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

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