|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 01/10] libxl: libxl-json format and internal functions to get / set it
Wei Liu writes ("[PATCH v1 01/10] libxl: libxl-json format and internal
functions to get / set it"):
> Introduce a new format in libxl userdata store called "libxl-json". This
> file format contains JSON version of libxl_domain_config, generated by
> libxl.
...
> +int libxl__get_domain_configuration(libxl__gc *gc, uint32_t domid,
> + libxl_domain_config *d_config)
> +{
> + uint8_t *data = NULL;
> + int rc, len;
> +
> + rc = libxl_userdata_retrieve(CTX, domid, "libxl-json", &data, &len);
...
> + if (len == 0) {
> + LOGE(ERROR, "configuration data stream empty for domain %d", domid);
> + rc = ERROR_FAIL;
Reading 03/10 I notice the following issue with this:
During domain setup there is a moment where the domid exists, but the
configuration data doesn't. Therefore this is a possible situation,
and does not reflect an internal error.
So, you need to treat this case differently. It shouldn't log an
error and it should probably return a custom error code, which all
callers would have to handle specially.
Ultimately if an application asks for the configuration of a domain in
this state, it is not possible to tell whether it is in the process
being created, or is left in an anomalous (crashed) state. So I think
this possible but anomalous state needs to be exposed all the way up
the stack.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |