[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.5 1/2] libxl: continue when encounter ERROR_JSON_CONFIG_EMPTY
On Fri, Nov 14, 2014 at 11:19:56AM +0000, Ian Campbell wrote: > On Fri, 2014-11-14 at 11:10 +0000, Wei Liu wrote: > > On Fri, Nov 14, 2014 at 10:55:35AM +0000, Ian Campbell wrote: > > > On Fri, 2014-11-14 at 10:52 +0000, Ian Campbell wrote: > > > > On Wed, 2014-11-12 at 17:04 +0000, Wei Liu wrote: > > > > > Continue when libxl_retrieve_domain_configuration encounters > > > > > ERROR_JSON_CONFIG_EMPTY, as caller might be interested in the partial > > > > > configuration pulled from xenstore. In this case > > > > > ERROR_JSON_CONFIG_EMPTY is used as return value as before, if no other > > > > > error happens along the way. > > > > > > > > > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > > > > > Cc: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx> > > > > > > > > Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > > > > > On second thoughts, I think this really needs an update to libxl.h to > > > describe the semantics of this function, i.e. to what extent the output > > > is valid for various error codes, especially ERROR_JSON_CONFIG_EMPTY. > > > > > > > Any non-zero return code means the output is invalid (as in "Is this > > output valid to rebuild a domain?"). > > But your second patch prints it as if it is at least somewhat > meaningful, if not entirely valid. According to what you just said it > shouldn't do so. > > You effectively have three return states now: Fully valid, domain exists > but it's configuration is unsure or somehow incomplete (~= JSON EMPTY), > some sort of error occurred. > > It might even be a good idea to have some new externally visible error > code for the middle state, since JSON_EMPTY may not be the only reason > for being in that state (at least in theory). > > Anyway, since this is all more subtle than the existing 0 is good, > non-zero is completely bad it should be written down. > I'm not very keen on rushing to get ERROR_JSON_CONFIG_EMPTY special meaning at this point of a release. I think we can deal with this in next release. Wei. > Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |