[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] tools/xenstore: Log xenstored build ID on startup


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "doebel@xxxxxxxxx" <doebel@xxxxxxxxx>
  • From: Edwin Torok <edvin.torok@xxxxxxxxxx>
  • Date: Fri, 13 Nov 2020 17:23:16 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xcZnNLvEltjBS2mrvn2AD3E70LHztdkJvzTOkdF5n84=; b=JweJlzV6EeA+q8vJjGrjmjFINUNp8JJk4qi4jLmOWvbTnurczUZDQljIHN1aTY2vd+1hhrwKJ1DDNJ2o9aX1eLRhdbveLhb6EDLGSs7jqBSj7RI2RVF5pbWzSFAeYuLMh1CdickCSripJ/iEVRGtfRwX0fRlKC/uGGUrrsB41GHZa3g9Qm7WNDEJ5bLIajfOf2ywbYrhHFnm8NZWTbbenyzyze0ZIasuF4NN6/9+f8pj8FXBvtWaEFG44ZUrUcNcISMZ5nOFUHh1oXmMo3ZocY/pv5e7SnkZMdrF+osG+wRWARvgyQlIE4TF3NgS4vZ8Oi6jY5CKvBXCpaAdjQQK8w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNTf+TMB/vkTPuE7O95Sed7mBdIvsYqZPYnwBoGnBrSmnFrpHC5Hs8xcgnUQY7eStWL8oHWOswwLOtPxSGb8R4j5isoSk5FHReUm8qrLxLHXcKYcphk2ySLcUz2Lcy7swhHPy5mulR1MTs674UiBB5LOZ3xFC3RKgbdXb5QS22RrVyyxJ1sqBOLOAwxhNsxuhAkVYiU9yP+EwBbUaC9iPOkv6YzQDVQQ5CjIScRoXHZ2f8BJSPrgFLCq+3l7xGCDlDEkplXMnUNRkb3jDDlJtItWRwp/HQWNjbniIg71dDe0WYUm82CA9bmfXxshyCt+mNmpfzhRmxZlDJLOO7H3bA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "wl@xxxxxxx" <wl@xxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, "jgrall@xxxxxxxxxxxx" <jgrall@xxxxxxxxxxxx>, "elnikety@xxxxxxxxx" <elnikety@xxxxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Fri, 13 Nov 2020 17:23:29 +0000
  • Ironport-sdr: 67AIAydRUNt67hum4sZePS2UW1MVWiRtdlsl9GMNGOuAZqg842Rvwu7Wz/dhWNfzBA4MDhwoFP KUKTWqZcLhO58SwKyc8VYDfve2UkbVevvZ87lm4g5+R2YtXgE6ZPxErBc5lTGhZ2kQcbTZRRqs rWZpn6xZQFH8ttbpgmTjPnlxe0uUheh1sSwGfqrNW9AtaBoSaxgTVYeKkNyidHClOvuqtPko5Y 5fI1dAff00vTMc1P91QNPAuoZqnK1y16InNPC16JQayx4PWmug40IJjvXdEHxLNtOQelkTMjFO y6U=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWueBOvwB25jmdBUW60qKjlgfroqnGT5aA
  • Thread-topic: [XEN PATCH] tools/xenstore: Log xenstored build ID on startup

On Fri, 2020-11-13 at 17:13 +0000, Andrew Cooper wrote:
> On 13/11/2020 16:56, Bjoern Doebel wrote:
> > On 13.11.20 16:36, Jürgen Groß wrote:
> > > On 13.11.20 15:18, Bjoern Doebel wrote:
> > > > Right now we do not have a mechanism to determine the version
> > > > of the
> > > > currently running xenstored at runtime. As xenstored runs
> > > > throughout
> > > > the
> > > > lifetime of a Xen host, this may lead to problems when newer
> > > > user space
> > > > builds are staged. Then, the running xenstored will no longer
> > > > match the
> > > > version of the installed xenstored.
> > > > 
> > > > To allow users to always identify the running version of
> > > > xenstored, add
> > > > a linker-generated unique build ID to every xenstored build.
> > > > Add
> > > > functionality to log this build ID into a file upon service
> > > > startup.
> > > > 
> > > > Signed-off-by: Bjoern Doebel <doebel@xxxxxxxxx>
> > > > Reviewed-by: Martin Mazein <amazein@xxxxxxxxx>
> > > > Reviewed-by: Paul Durrant <pdurrant@xxxxxxxxxxxx>
> > > 
> > > No support for oxenstored or xenstore-stubdom?
> > 
> > Your suggestion further down will apparently help for stubdom. I do
> > not speak ocaml at all - how do we address this?
> 
> CC'ing Edwin and Christian who have done the bulk of the oxenstored
> recently.
> 
> It sounds like it might not be possible right now, but would be
> possible
> with a future plan to switch the Ocaml build system over to dune (the
> new/preferred Ocaml upstream toolchain).

See here what is possible with Dune:
https://dune.readthedocs.io/en/stable/dune-libs.html#build-info

Would the output of 'git describe --always --dirty' (perhaps combined
with a build date) serve as a useful build ID?

> 
> If it does end up being an XS_CONTROL sub-op, we can implement it at
> a
> future point when we can usefully answer the question.

Wouldn't using readelf on /proc/<pid>/exe give you the running buildid?

readelf -a /usr/sbin/oxenstored /proc/$(pidof oxenstored)/exe | grep
'Build ID'
    Build ID: bdd5304c8984ed22570d51308ae8717d03fe60ae
    Build ID: bdd5304c8984ed22570d51308ae8717d03fe60ae

readelf -a /usr/sbin/oxenstored /proc/$(pidof oxenstored)/exe | grep
'Build ID'
    Build ID: b44ff99b216db7526e3ee7841068d584cc9c2b95
    Build ID: bdd5304c8984ed22570d51308ae8717d03fe60ae


When you're inside a stubdom it is probably not so easy though.

Best regards,
--Edwin

> 
> ~Andrew


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.