From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v1 10/10] xl: use libxl_retrieve_domain_configuration and JSON format Date: Thu, 17 Jul 2014 13:14:14 +0100 Message-ID: <20140717121414.GL4913@zion.uk.xensource.com> References: <1405002745-5034-1-git-send-email-wei.liu2@citrix.com> <1405002745-5034-11-git-send-email-wei.liu2@citrix.com> <1405595597.12538.23.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: <1405595597.12538.23.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, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Jul 17, 2014 at 12:13:17PM +0100, Ian Campbell wrote: [...] > > made to the guest will be preserved when the guest is restarted. > > > > +Libxl now has better capability to handle domain configuration, avoid > > +using this command when possible. > > Perhaps say: > > Libxl now has improved capabilities to handle dynamic domain > configuration changes and will preserve any changes made a > runtime when necessary. Therefore it should not normally be > necessary to use this command any more. > I will use this. > > + > > I has to be an absolute path to a file. > > [...] > > static void reload_domain_config(uint32_t domid, > > - uint8_t **config_data, int *config_len) > > + libxl_domain_config *d_config) > > { > > + int rc; > > uint8_t *t_data; > > int ret, t_len; > > + libxl_domain_config d_config_new; > > > > + /* In case user has used "config-update" to store a new config > > + * file. > > + */ > > ret = libxl_userdata_retrieve(ctx, domid, "xl", &t_data, &t_len); > > - if (ret) { > > - LOG("failed to retrieve guest configuration (rc=%d). " > > - "reusing old configuration", ret); > > + if (ret && errno != ENOENT) { > > + LOG("\"xl\" file found but failed to load\n"); > > Perhaps "Saved \"xl\" configuration found ..." NP. > > + } > > + if (t_len > 0) { > > + LOG("\"xl\" config file found, use it\n"); > > "using" > > I wonder if at this point we should delete the saved config. > > IOW do we expect xl update-config to be one shot or to persist. I think > the one shot is the only sensible answer and it doesn't conflict with > the previous implementation since in the old implementation the saved > config became the new stored config. > Makes sense. Wei. > Ian.