From: Quentin Smith Date: Wed, 26 Nov 2008 04:44:57 +0000 (-0500) Subject: Block xen_cpu from running with XenAPI until we switch all of XVM X-Git-Tag: 0.0.5^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/xvm-munin-config.git/commitdiff_plain/08d0fec60bf11b887c70fc872d1733c1c10a9e06?ds=inline Block xen_cpu from running with XenAPI until we switch all of XVM svn path=/trunk/packages/xvm-munin-config/; revision=1783 --- diff --git a/debian/changelog b/debian/changelog index 56ccf75..486e27c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,13 +4,14 @@ xvm-munin-config (0.0.5) unstable; urgency=low * Fix typos in xen_cpu script for XenAPI code * Bump theoretical CPU max to 64x * Show domain CPU weight and cap if available + * Refuse to run with the untested SERVER_XEN_API until we support it elsewhere [ Evan Broder ] * Move the unnecessary Pre-Depends to a Depends * We don't need to remove the code from sudoers in the postinst - the preinst will get run on upgrade - -- Evan Broder Tue, 25 Nov 2008 23:14:07 -0500 + -- Quentin Smith Tue, 25 Nov 2008 23:44:22 -0500 xvm-munin-config (0.0.4) unstable; urgency=low diff --git a/host/usr/share/xvm-munin-host-config/plugins/xen_cpu b/host/usr/share/xvm-munin-host-config/plugins/xen_cpu index 755c476..2efffe4 100755 --- a/host/usr/share/xvm-munin-host-config/plugins/xen_cpu +++ b/host/usr/share/xvm-munin-host-config/plugins/xen_cpu @@ -3,9 +3,14 @@ from xen.xm.main import SERVER_LEGACY_XMLRPC, SERVER_XEN_API, parseServer, parseAuthentication from xen.xend import sxp import atexit +import sys serverType, serverURI = parseServer() +if serverType != SERVER_LEGACY_XMLRPC: + print >>sys.stderr, "xen_cpu is untested with this Xen server type" + sys.exit(1) + if serverType == SERVER_XEN_API: from xen.xm import XenAPI server = XenAPI.Session(serverURI) @@ -21,8 +26,6 @@ else: from xen.util.xmlrpcclient import ServerProxy server = ServerProxy(serverURI) -import sys - if len(sys.argv) > 1: cmd = sys.argv[1] else: