This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-tools] Xend's xenstore interface

To: Dan Smith <danms@xxxxxxxxxx>
Subject: Re: [Xen-tools] Xend's xenstore interface
From: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Date: Tue, 2 Aug 2005 11:07:57 +0100
Cc: xen-tools@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 02 Aug 2005 10:11:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <m3br4lea2v.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-tools-request@lists.xensource.com?subject=help>
List-id: Xen control tools developers <xen-tools.lists.xensource.com>
List-post: <mailto:xen-tools@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=unsubscribe>
References: <m3br4lea2v.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-tools-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Fri, Jul 29, 2005 at 11:33:28AM -0700, Dan Smith wrote:
> What is the best way to write a value to the xenstore immediately,
> from within xend?  Currently, I'm setting a DBVar and then explicitly
> calling exportToDB() on the DBMap, from inside XendDomainInfo.
> Is there a more appropriate way?

I find the best way to write to the store is to create a DBMap for
a subtree and then use saveDB(save=True) on the DBMap, i.e.:
            db = self.db.addChild("/subtree/path")
            db['key'] = ...

I'm not so keen on the DBVar interface...

Also, the current interface doesn't use transactions, as far as I can
tell and even more annoyingly creates empty nodes first and then fills
in the data which causes watches to fire way too many times.

It would be much appreciated if someone could look into this and also
add an interface to do updates using transactions, maybe something like:
            transdb = db.addTrans("/subtree/path")
            transdb['key'] = ...


Xen-tools mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-tools] Xend's xenstore interface, Christian Limpach <=