Skip to contentSkip to conversation

xenstore root node change

DISCUSSION Olaf Hering 3 participants 4 messages Dec 16, 2010

lore
Share & tools
lore
#0 lore raw
Quoted 1 line · Olaf Hering

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

#1 lore raw
Quoted 7 lines · Olaf Hering
Quoted 1 line · Olaf Hering

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.

Quoted 6 lines

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 <[email protected]> # 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.

tools/xenstore/xenstored_domain.c +1 -1
diff -r 08f63aec7fa7 -r 6ff0b7e76762 tools/xenstore/xenstored_domain.c
@@ -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;
 }
#2 lore raw
Quoted 4 lines · Ian Campbell
Quoted 1 line · Olaf Hering

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

#3 lore raw
In reply to Ian Campbell

Ian Campbell writes ("Re: [Xen-devel] xenstore root node change"):

Quoted 1 line

The following seems like the best fix right now.

Yes, thanks, I have applied it.

Ian.