All of lore.kernel.org
 help / color / mirror / Atom feed
* xenstore root node change
@ 2010-12-16 14:02 Olaf Hering
  2010-12-16 14:48 ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2010-12-16 14:02 UTC (permalink / raw)
  To: xen-devel

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.


Olaf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xenstore root node change
  2010-12-16 14:02 xenstore root node change Olaf Hering
@ 2010-12-16 14:48 ` Ian Campbell
  2010-12-16 15:18   ` Olaf Hering
  2010-12-16 18:04   ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2010-12-16 14:48 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xensource.com

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@citrix.com>
# 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@citrix.com>

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;
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xenstore root node change
  2010-12-16 14:48 ` Ian Campbell
@ 2010-12-16 15:18   ` Olaf Hering
  2010-12-16 18:04   ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Olaf Hering @ 2010-12-16 15:18 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xensource.com

On Thu, Dec 16, Ian Campbell wrote:

> On Thu, 2010-12-16 at 14:02 +0000, Olaf Hering wrote:
> > Was this change intentional? If so, the hotplug scripts need an update.
> 
> I don't think this was deliberate.

Thanks Ian, both patches made xen-unstable usable again for me.

Olaf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xenstore root node change
  2010-12-16 14:48 ` Ian Campbell
  2010-12-16 15:18   ` Olaf Hering
@ 2010-12-16 18:04   ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2010-12-16 18:04 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, xen-devel@lists.xensource.com

Ian Campbell writes ("Re: [Xen-devel] xenstore root node change"):
> The following seems like the best fix right now.

Yes, thanks, I have applied it.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-16 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 14:02 xenstore root node change Olaf Hering
2010-12-16 14:48 ` Ian Campbell
2010-12-16 15:18   ` Olaf Hering
2010-12-16 18:04   ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.