Change in vdsm[master]: vdsm now reports pid when starting up.

amuller at redhat.com amuller at redhat.com
Sun May 5 09:02:37 UTC 2013


Assaf Muller has uploaded a new change for review.

Change subject: vdsm now reports pid when starting up.
......................................................................

vdsm now reports pid when starting up.

In response to bug:
https://bugzilla.redhat.com/show_bug.cgi?id=952089

When vdsm starts it now outputs to the vdsm log:
"MainThread::INFO::2013-05-05 11:57:38,609::vdsm::89::vds::(run)
(PID: 14576) I am the actual vdsm..."

Change-Id: I029581f4ab1cc5005a55c0f7ecec8672d08da49e
Signed-off-by: Assaf Muller <amuller at redhat.com>
---
M vdsm/vdsm
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/14430/1

diff --git a/vdsm/vdsm b/vdsm/vdsm
index 3372596..ccb6b8d 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -80,12 +80,13 @@
         log.handlers.append(logging.StreamHandler())
 
         pidfile = constants.P_VDSM_RUN + 'vdsmd.pid'
-        file(pidfile, 'w').write(str(os.getpid()) + "\n")
+        pid = str(os.getpid())
+        file(pidfile, 'w').write(pid + "\n")
         os.chmod(pidfile, 0664)
 
         sysname, nodename, release, version, machine = os.uname()
-        log.info('I am the actual vdsm %s %s (%s)',
-                 dsaversion.raw_version_revision, nodename, release)
+        log.info('(PID: %s) I am the actual vdsm %s %s (%s)',
+                 pid, dsaversion.raw_version_revision, nodename, release)
         serve_clients(log)
     except:
         log.error("Exception raised", exc_info=True)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I029581f4ab1cc5005a55c0f7ecec8672d08da49e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>


More information about the vdsm-patches mailing list