From: Ian Campbell Subject: Re: [PATCH v3 08/15] libxl: introduce helper to initialise Dom0 Date: Tue, 9 Sep 2014 12:16:50 +0100 Message-ID: <1410261410.8217.130.camel@kazak.uk.xensource.com> References: <1409870601-7538-1-git-send-email-wei.liu2@citrix.com> <1409870601-7538-9-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409870601-7538-9-git-send-email-wei.liu2@citrix.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: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-09-04 at 23:43 +0100, Wei Liu wrote: > This small helper is responsible for generating Dom0 JSON config > stub and writing Dom0 xenstore entries. This helpers subsumes two calls > to xenstore-write in xencommons script. > > Dom0 UUID is intentionally left untouched, so it is always all > zeros. This makes sure that we don't leak Dom0 stubs across rebooting. > > Signed-off-by: Wei Liu With the *BSD followup folded in: Acked-by: Ian Campbell (I'll do the folding on commit unless there is some other reason to resend). One comment for a potential future cleanup: > + /* Sanity check: this program can only be run once. */ I suppose parallel invocations of the initscript are unlikely. But if we cared about such things then some locking would be needed, perhaps in the form of a xenstore transaction or a droppings in /var/lib/subsys. But how harmful is running this again? Since the UUID is statically all zeroes isn't it idemopotent? Ian.