WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Reject xm sched-* comands for other than

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Reject xm sched-* comands for other than the in-use scheduler.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 28 Jan 2007 13:30:10 -0800
Delivery-date: Sun, 28 Jan 2007 13:30:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169976900 0
# Node ID db0aeb4e41c3c4d30beb98ff33d189f5ea20322e
# Parent  4e7bda043cced371f098bb3bee486ed57d6388c2
Reject xm sched-* comands for other than the in-use scheduler.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |   13 +++++++++++++
 1 files changed, 13 insertions(+)

diff -r 4e7bda043cce -r db0aeb4e41c3 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Sun Jan 28 09:33:47 2007 +0000
+++ b/tools/python/xen/xm/main.py       Sun Jan 28 09:35:00 2007 +0000
@@ -706,6 +706,15 @@ def parse_doms_info(info):
         'seclabel' : security.get_security_printlabel(info),
         }
 
+def check_sched_type(sched):
+    current = 'unknown'
+    for x in server.xend.node.info()[1:]:
+        if len(x) > 1 and x[0] == 'xen_scheduler':
+            current = x[1]
+            break
+    if sched != current:
+        err("Xen is running with the %s scheduler" % current)
+        sys.exit(1)
 
 def parse_sedf_info(info):
     def get_info(n, t, d):
@@ -1098,6 +1107,8 @@ def xm_sched_sedf(args):
         print( ("%(name)-32s %(domid)3d %(period)9.1f %(slice)9.1f" +
                 " %(latency)7.1f %(extratime)6d %(weight)6d") % info)
 
+    check_sched_type('sedf')
+
     # we want to just display current info if no parameters are passed
     if len(args) == 0:
         domid = None
@@ -1170,6 +1181,8 @@ def xm_sched_credit(args):
 def xm_sched_credit(args):
     """Get/Set options for Credit Scheduler."""
     
+    check_sched_type('credit')
+
     try:
         opts, params = getopt.getopt(args, "d:w:c:",
             ["domain=", "weight=", "cap="])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Reject xm sched-* comands for other than the in-use scheduler., Xen patchbot-unstable <=