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/
Home Products Support Community News


[Xen-devel] Re: [PATCH]: xl: catch invalid numeric domain ID

To: Andre Przywara <andre.przywara@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH]: xl: catch invalid numeric domain ID
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 21 Jan 2011 19:03:37 +0000
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 21 Jan 2011 11:05:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D39B142.90806@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D39B142.90806@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Andre Przywara writes ("[PATCH]: xl: catch invalid numeric domain ID"):
> if you run any domain specific xl command with an invalid (aka 
> non-existing) numeric domain ID, the command does not abort, but 
> proceeds with some bogus number:

Thanks, but I'm not 100% convinced that it is impossible to ever get
into a situation where a domain exists but has no name.  In that case,
this patch of yours would leave an undestroyable domain.

I think the right answer is to use libxl_domain_info to check whether
the domain exists.  It returns ERROR_INVAL, without logging anything,
if the domain does not exist.  On other failures xl destroy should
probably carry on and attempt to destroy the domain.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>