WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xenstore root node change

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] xenstore root node change
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 16 Dec 2010 14:48:58 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 16 Dec 2010 06:50:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101216140225.GA28320@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <20101216140225.GA28320@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-12-16 at 14:02 +0000, Olaf Hering wrote:
> On Wed, Dec 15, Olaf Hering wrote:
> 
> > Current xen-unstable does not have backend/vbd/1/768/params for some
> 
> It seems the root handling in xenstore-read has changed, it does not
> operate in node /local/domain/0 anymore.
>
> In 4.0, a 'xenstore-read name' returns 'Domain-0', but in xen-unstable
> it gives an error now: 'xenstore-read: couldn't read path name'.
> 
> Using the absolute path 'xenstore-read /local/domain/0/name' works.
> 
> Was this change intentional? If so, the hotplug scripts need an update.

I don't think this was deliberate.

Perhaps this is another unintended/unpredicted consequence of the recent
switch to using xs_open instead of xs_{domain,daemon}_open?

I didn't see the issue when running oxenstored but having switched to
the C xenstored I can now reproduce.

I think the difference is that xenstored does not apply
the /local/domain/<N> working directory for connections over the socket
while oxenstored does (I think the oxenstored behaviour is correct
here).

The switch to xs_open interface means that xenstore-read now prefers the
socket interface over the domain interface.

The following seems like the best fix right now.

8<-----------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1292510898 0
# Node ID 6ff0b7e76762b5ca359fbf0549211bb0c6b09100
# Parent  08f63aec7fa7078c19b0b92ab5dbda867427eebf
xenstore: set implicit path for socket connections

For now assume all such connections come from domain 0.

Failure to do this breaks various scripts which assume that they
operate relative to the domains "home directory".

This matches the behaviour of the ocaml xenstored.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 08f63aec7fa7 -r 6ff0b7e76762 tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Thu Dec 16 14:31:05 2010 +0000
+++ b/tools/xenstore/xenstored_domain.c Thu Dec 16 14:48:18 2010 +0000
@@ -547,7 +547,7 @@ const char *get_implicit_path(const stru
 const char *get_implicit_path(const struct connection *conn)
 {
        if (!conn->domain)
-               return NULL;
+               return "/local/domain/0";
        return conn->domain->path;
 }
 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>