From: Wei Liu Subject: Re: [PATCH] fix list_domain_details: check config data length=0 Date: Wed, 23 Jul 2014 11:09:12 +0100 Message-ID: <20140723100912.GD28444@zion.uk.xensource.com> References: <1406108529-30602-1-git-send-email-cyliu@suse.com> <1406109196.1351.37.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1406109196.1351.37.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, Wei Liu , Chunyan Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Jul 23, 2014 at 10:53:16AM +0100, Ian Campbell wrote: > On Wed, 2014-07-23 at 17:42 +0800, Chunyan Liu wrote: > > If domain is created through virsh, then in xl, one could see it > > with 'xl list', but with 'xl list --long domU', it reports: > > "Domain name must be specified." > > The reason is xl config data does not exist but it still tries > > to parse_config_data in current code. > > > > Improve list_domain_details: > > If len of config data is 0, just pass, do not go forward to > > parse_config_data, otherwise, it will meet error like > > "Domain name not specified" and exit. This error is not expected, > > since if code enters list_domain_details, domain name validness > > is already checked and domain does exist. > > > > Length of config data is 0 may means: config data does not exist due > > to some reason, like: domain is created by libvirt, or in destroying > > domain process config data is cleared but domain fails to clean up. > > No matter in which case, list_domain_details could just show empty > > info, but not error like "Domain name not specified". > > > > Signed-off-by: Chunyan Liu > > I think this issue is resolved by Wei's "libxl: synchronise domain > configuration" series? That will save state in such a way that xl can > list libvirt domains etc. > If libvirt opt-in to use the new infrasturcture then yes, otherwise no. So I think we need this patch until libvirt switches to make sure our new feature. Wei. > Ian.