Nir Soffer has uploaded a new change for review.

Change subject: debug: Remove debug plugin
......................................................................

debug: Remove debug plugin

vdsmDebugPlugin was replaced by manhole, no need to keep and maintain
this now.

Change-Id: Iaccdc337cb01e4576e8d201078e07e1e55665af1
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M debian/vdsm.install
M vdsm.spec.in
M vdsm/Makefile.am
D vdsm/debugPluginClient.py
M vdsm/vdsm
D vdsm/vdsmDebugPlugin.py
6 files changed, 0 insertions(+), 134 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/44724/1

diff --git a/debian/vdsm.install b/debian/vdsm.install
index a26c790..463376c 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -38,7 +38,6 @@
 ./usr/share/vdsm/caps.py
 ./usr/share/vdsm/clientIF.py
 ./usr/share/vdsm/daemonAdapter
-./usr/share/vdsm/debugPluginClient.py
 ./usr/share/vdsm/dmidecodeUtil.py
 ./usr/share/vdsm/dsaversion.py
 ./usr/share/vdsm/dumpStorageTable.py
@@ -139,7 +138,6 @@
 ./usr/share/vdsm/vdsm
 ./usr/share/vdsm/vdsm-restore-net-config
 ./usr/share/vdsm/vdsm-store-net-config
-./usr/share/vdsm/vdsmDebugPlugin.py
 ./usr/share/vdsm/vdsmapi-schema.json
 ./usr/share/vdsm/virt/__init__.py
 ./usr/share/vdsm/virt/domain_descriptor.py
diff --git a/vdsm.spec.in b/vdsm.spec.in
index d17338d..0db7454 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -305,14 +305,6 @@
 %description python
 Shared libraries between the various VDSM packages.
 
-%package debug-plugin
-Summary:        VDSM Debug Plugin
-Requires:       %{name}
-Requires:       %{name}-xmlrpc = %{version}-%{release}
-
-%description debug-plugin
-Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM.
-
 %package tests
 Summary:        VDSM Test Suite
 Requires:       %{name} = %{version}-%{release}
@@ -1318,11 +1310,6 @@
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex
 %endif
-
-%files debug-plugin
-%defattr(-, root, root, -)
-%{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py*
-%{_datadir}/%{vdsm_name}/debugPluginClient.py*
 
 %files cli
 %defattr(-, root, root, -)
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 4c0578e..cf32bad 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -28,7 +28,6 @@
        blkid.py \
        caps.py \
        clientIF.py \
-       debugPluginClient.py \
        dmidecodeUtil.py \
        hooking.py \
        hooks.py \
@@ -43,7 +42,6 @@
        protocoldetector.py \
        supervdsm.py \
        v2v.py \
-       vdsmDebugPlugin.py \
        $(NULL)
 
 dist_vdsmexec_SCRIPTS = \
diff --git a/vdsm/debugPluginClient.py b/vdsm/debugPluginClient.py
deleted file mode 100644
index 8b6b75e..0000000
--- a/vdsm/debugPluginClient.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright 2012 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-#
-# Refer to the README and COPYING files for full details of the license
-#
-
-from multiprocessing.managers import BaseManager
-
-ADDRESS = "/var/run/vdsm/debugplugin.sock"
-
-
-class DebugInterpreterManager(BaseManager):
-    pass
-
-
-def unindent(code):
-    """
-    Unindent the code so that we can execute text that on the client side
-    contains an extra indentation.
-    """
-    i = 0
-
-    for c in code:
-        if c == '\n':
-            i = 0
-        elif c.isspace():
-            i += 1
-        else:
-            break
-
-    return ''.join([line[i:] for line in code.splitlines(True)])
-
-
-def execCode(code):
-    manager = DebugInterpreterManager(address=ADDRESS, authkey="KEY")
-    manager.register('interpreter')
-    manager.connect()
-    executor = manager.interpreter()
-    executor.execute(unindent(code))
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 0648562..7279ed1 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -119,18 +119,6 @@
     logging.addLevelName(5, 'TRACE')
     logging.TRACE = 5  # impolite but helpful
 
-    # Used to debug vdsm. on production machines
-    # vdsmDebugPlugin.py should not exists
-    try:
-        import vdsmDebugPlugin
-        vdsmDebugPlugin.turnOnDebugPlugin()
-    except ImportError:
-        # This is OK, it just means the file isn't
-        # there and we are not running in debug mode.
-        # Any other error is an error in the debug
-        # plugin and we would like to print that out.
-        pass
-
     # Used to enable code coverage. On production machines
     # "coverage" should not exists and COVERAGE_PROCESS_START should not be
     # set.
diff --git a/vdsm/vdsmDebugPlugin.py b/vdsm/vdsmDebugPlugin.py
deleted file mode 100644
index af06dbe..0000000
--- a/vdsm/vdsmDebugPlugin.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright 2011 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Refer to the README and COPYING files for full details of the license
-#
-
-import os
-import threading
-import logging
-from multiprocessing.managers import BaseManager
-
-ADDRESS = "/var/run/vdsm/debugplugin.sock"
-log = logging.getLogger("DebugInterpreter")
-
-
-class DebugInterpreterManager(BaseManager):
-    pass
-
-
-class DebugInterpreter(object):
-    def execute(self, code):
-        exec(code)
-
-
-def turnOnDebugPlugin():
-    log.warn("Starting Debug Interpreter. Tread lightly!")
-    try:
-        if os.path.exists(ADDRESS):
-            os.unlink(ADDRESS)
-        manager = DebugInterpreterManager(address=ADDRESS, authkey="KEY")
-        interpreter = DebugInterpreter()
-        manager.register('interpreter', callable=lambda: interpreter)
-        server = manager.get_server()
-        servThread = threading.Thread(target=server.serve_forever)
-        servThread.setDaemon(True)
-        servThread.start()
-    except:
-        log.error("Could not start debug plugin", exc_info=True)


-- 
To view, visit https://gerrit.ovirt.org/44724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaccdc337cb01e4576e8d201078e07e1e55665af1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to