From: Stefan Berger Subject: [PATCH] [XM] Fix a problem in xm client for domain shutdown Date: Tue, 29 Jul 2008 22:36:05 -0400 Message-ID: <1217385365.11224.2.camel@gsal-3.watson.ibm.com> Reply-To: stefanb@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-bwY1iZK+vuLh8Ud0PMTd" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-bwY1iZK+vuLh8Ud0PMTd Content-Type: text/plain Content-Transfer-Encoding: 7bit Xm did not shut down domains anymore when run in xen-api mode due to a 'None' parameter being passed to xend when looking up a domain. This fixes the problem. Signed-off-by: Stefan Berger --=-bwY1iZK+vuLh8Ud0PMTd Content-Disposition: attachment; filename=xenapi_shutdown_fix.diff Content-Type: text/x-patch; name=xenapi_shutdown_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xm/shutdown.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xm/shutdown.py +++ root/xen-unstable.hg/tools/python/xen/xm/shutdown.py @@ -144,9 +144,10 @@ def main_all(opts, args): def main_dom(opts, args): if len(args) == 0: opts.err('No domain parameter given') if len(args) > 1: opts.err('No multiple domain parameters allowed') - dom = sxp.child_value(server.xend.domain(args[0]), 'name') if serverType == SERVER_XEN_API: - dom = get_single_vm(dom) + dom = get_single_vm(args[0]) + else: + dom = sxp.child_value(server.xend.domain(args[0]), 'name') mode = shutdown_mode(opts) shutdown(opts, [ dom ], mode, opts.vals.wait) --=-bwY1iZK+vuLh8Ud0PMTd Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-bwY1iZK+vuLh8Ud0PMTd--