Change in vdsm[master]: debug: Integrate manhole debugging service

nsoffer at redhat.com nsoffer at redhat.com
Thu Aug 28 21:54:02 UTC 2014


Nir Soffer has uploaded a new change for review.

Change subject: debug: Integrate manhole debugging service
......................................................................

debug: Integrate manhole debugging service

Manhole is in-process service that will accept unix domain socket
connections and present the stacktraces for all threads and an
interactive prompt.

Usage:

0. Install it

    pip install manhole

1. Enable it in vdsm.conf:

    [vars]
    manhole_enable = true

2. Dive into vdsm:

   $ nc -U /tmp/manhole-1234
   Python 2.7.5 (default, Jun 26 2014, 11:55:39)
   [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
   Type "help", "copyright", "credits" or "license" for more information.
   >>>

Change-Id: I8a6cdf97ddce446bea527e771eb641f969b1a532
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/config.py.in
M vdsm/vdsm
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/32147/1

diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 69185e0..d085890 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -42,6 +42,9 @@
         ('profile_clock', 'cpu',
             'Sets the underlying clock type (cpu, wall)'),
 
+        ('manhole_enable', 'false',
+            'Enable manhole debugging service (requires manhole package).'),
+
         ('host_mem_reserve', '256',
             'Reserves memory for the host to prevent VMs from using all the '
             'physical pages. The values are in Mbytes.'),
diff --git a/vdsm/vdsm b/vdsm/vdsm
index e575295..9fdf72f 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -70,6 +70,10 @@
 
     profile.start()
 
+    if config.getboolean('vars', 'manhole_enable'):
+        import manhole
+        manhole.install()
+
     libvirtconnection.start_event_loop()
 
     if config.getboolean('irs', 'irs_enable'):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a6cdf97ddce446bea527e771eb641f969b1a532
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list