Skip to contentSkip to conversation

stable / unstable parallel install?

DISCUSSION Gerd Knorr 5 participants 16 messages May 30, 2005 – Jun 1, 2005

lore
Share & tools
lore

Gerd Knorr

author
#0 lore raw

Hi,

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

Gerd

#1 lore raw
Quoted 6 lines

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

No easy way that I know of - we typically just use different root file systems here to ensure that everything is completely separated.

cheers,

S.

author
#2 lore raw
Quoted 8 lines
Quoted 5 lines

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

No easy way that I know of - we typically just use different root file systems here to ensure that everything is completely separated.

Hmm, thats exactly what I want to avoid ...

I suspect the unstable tools can't be used to manage 2.x machines?

Gerd

Signature · 2 lines
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3
#3 lore raw
In reply to Steven Hand
Quoted 9 lines · Steven Hand
Quoted 5 lines

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

No easy way that I know of - we typically just use different root file systems here to ensure that everything is completely separated.

What I do is I statically link all the tools (I use vm-tools exclusively), so I don't have to fiddle with all the /usr/lib symlinks and PYTHON_PATH etc. This allows me to switch versions quickly, or to have several versions installed at the same time.

Just Say No to shared libraries and interpreted languages ;-)

Jacob

#4 lore raw
In reply to Gerd Knorr
Quoted 5 lines · Gerd Knorr

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

Have you tried a 'make dist' and then e.g., 'cp -a dist/install /opt/xen2', then add appropriate paths to the front of PATH, LD_LIBRARY_PATH, PYTHONPATH?

'DESTDIR=/opt/xen2 make install' also ought to work in a similar way.

Neither of the above is well-tested, but we would expect them to work.

-- Keir

author
#5 lore raw
Quoted 3 lines

Have you tried a 'make dist' and then e.g., 'cp -a dist/install /opt/xen2', then add appropriate paths to the front of PATH, LD_LIBRARY_PATH, PYTHONPATH?

Works sort of. I have the 2.x versions in /usr now (normal suse 9.3 rpms), 3.x in /opt/xen3/usr. xend complains that it can't start xcs and doesn't come up. When I start xcs manually first it works. I'd guess xend tries to start the 2.x version in /usr/sbin although /opt/xen3/usr/sbin comes first in $PATH ...

Gerd

Signature · 2 lines
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3
#6 lore raw
Quoted 10 lines · Gerd Knorr
Quoted 3 lines

Have you tried a 'make dist' and then e.g., 'cp -a dist/install /opt/xen2', then add appropriate paths to the front of PATH, LD_LIBRARY_PATH, PYTHONPATH?

Works sort of. I have the 2.x versions in /usr now (normal suse 9.3 rpms), 3.x in /opt/xen3/usr. xend complains that it can't start xcs and doesn't come up. When I start xcs manually first it works. I'd guess xend tries to start the 2.x version in /usr/sbin although /opt/xen3/usr/sbin comes first in $PATH ...

yes, that is the case, since in /usr/sbin/xend, we have:

XCS_EXEC = "/usr/sbin/xcs"

should we execute xcs without the full path?

regards,
aq

#7 lore raw
Quoted 5 lines · aq

yes, that is the case, since in /usr/sbin/xend, we have:

XCS_EXEC = "/usr/sbin/xcs"

should we execute xcs without the full path?

Perhaps best would be to try with no path, and fall back to /usr/sbin/xcs. I'd definitely take a tested patch to that effect (for both -testing and -unstable).

-- Keir

#8 lore raw
Quoted 5 lines · Keir Fraser
Quoted 2 lines · aq

yes, that is the case, since in /usr/sbin/xend, we have:

Quoted 8 lines
Quoted 3 lines

XCS_EXEC = "/usr/sbin/xcs"

should we execute xcs without the full path?

Perhaps best would be to try with no path, and fall back to /usr/sbin/xcs. I'd definitely take a tested patch to that effect (for both -testing and -unstable).

Keir, there is no xcs in -testing.

Here is the patch: it tries to execute xcs without full path first, then if there is error, it fallbacks to the default path.

$ diffstat xcs_nopath.diff 
 xend |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

===== tools/misc/xend 1.23 vs edited =====

tools/misc/xend +10 -5
@@ -27,8 +27,10 @@
 
 XCS_PATH    = "/var/lib/xen/xcs_socket"
 XCS_EXEC    = "/usr/sbin/xcs"
+XCS_NP_EXEC = "xcs"    # xcs with no path
 XCS_PIDFILE = "/var/run/xcs.pid"
 XCS_ARGS    = (XCS_EXEC, "-p", XCS_PIDFILE)
+XCS_NP_ARGS = (XCS_NP_EXEC, "-p", XCS_PIDFILE)   # execute xcs with no path
 
 # add fallback path for non-native python path installs if needed
 sys.path.append('/usr/lib/python')
@@ -92,12 +94,15 @@
             if not os.path.isdir(os.path.dirname(XCS_PATH)):
                 os.makedirs(os.path.dirname(XCS_PATH))
             try:
-                os.execvp(XCS_EXEC, XCS_ARGS)
+                os.execvp(XCS_NP_EXEC, XCS_NP_ARGS) # execute xcs with no path
             except:
-                hline()
-                msg("Tried to start xcs, but failed. Is it installed?")
-                hline()
-                raise CheckError("couldn't start xcs")
+                try:
+                    os.execv(XCS_EXEC, XCS_ARGS)    # fallback to execute xcs in default path
+                except:
+                    hline()
+                    msg("Tried to start xcs, but failed. Is it installed?")
+                    hline()
+                    raise CheckError("couldn't start xcs")
         if (not xcs_running()):
             hline()
             msg("Failed to start the control interface switch.")

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#9 lore raw
In reply to Keir Fraser
Quoted 9 lines · Keir Fraser
Quoted 5 lines · Gerd Knorr

Is there some easy way to install both 2.x and unstable xen tools at the same machine? Seems /usr is hardcoded everythere in the tools Makefiles, looks like there is no easy way to put them to different paths (say, prefix /opt/xen2 and /opt/xen3) :-/

Quoted 8 lines

Have you tried a 'make dist' and then e.g., 'cp -a dist/install /opt/xen2', then add appropriate paths to the front of PATH, LD_LIBRARY_PATH, PYTHONPATH?

'DESTDIR=/opt/xen2 make install' also ought to work in a similar way.

Neither of the above is well-tested, but we would expect them to work.

anyway, there is one problem: what if -stable and -unstable use the same xen0 kernel version? then we cannot have separate directory at /lib/module/<kernel-version>

regards,
aq

#10 lore raw
Quoted 3 lines · aq

anyway, there is one problem: what if -stable and -unstable use the same xen0 kernel version? then we cannot have separate directory at /lib/module/<kernel-version>

Is it not possible to redirect the modutils and module auto-loader to a different path?

-- Keir

author
#11 lore raw
In reply to aq
Quoted 3 lines

anyway, there is one problem: what if -stable and -unstable use the same xen0 kernel version? then we cannot have separate directory at /lib/module/<kernel-version>

This is easy: CONFIG_LOCALVERSION="<whatever>" ;)

Gerd

Signature · 2 lines
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3
#12 lore raw
Quoted 5 lines · Gerd Knorr
Quoted 3 lines

anyway, there is one problem: what if -stable and -unstable use the same xen0 kernel version? then we cannot have separate directory at /lib/module/<kernel-version>

This is easy: CONFIG_LOCALVERSION="<whatever>" ;)

yep, i like this solution :-)

regards,
aq

#13 lore raw
In reply to Gerd Knorr
Quoted 6 lines · Gerd Knorr
Quoted 3 lines

anyway, there is one problem: what if -stable and -unstable use the same xen0 kernel version? then we cannot have separate directory at /lib/module/<kernel-version>

This is easy: CONFIG_LOCALVERSION="<whatever>" ;)

Gerd, would be great if you could write a small HOWTO about how to do "parallel install" and put it into docs/. that would be certainly helpful for some people ;-)

regards,
aq

author
#14 lore raw
Quoted 3 lines

Gerd, would be great if you could write a small HOWTO about how to do "parallel install" and put it into docs/. that would be certainly helpful for some people ;-)

Still fiddeling to make it work. I've deinstalled the rpm with the 2.x stuff in /usr, I have both 2.x and 3.x in non-default locations now, so the 3.x versions can't attempt to use some 2.x stuff below /usr. Didn't manage to boot domU so far (neither 2.x nor 3.x).

How compatible is the config stuff in /etc/xen? Can that be shared between xen2 and xen3? Or should I better prepare to switch that one as well?

Gerd

Signature · 2 lines
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3
#15 lore raw
Quoted 10 lines · Gerd Knorr
Quoted 3 lines

Gerd, would be great if you could write a small HOWTO about how to do "parallel install" and put it into docs/. that would be certainly helpful for some people ;-)

Still fiddeling to make it work. I've deinstalled the rpm with the 2.x stuff in /usr, I have both 2.x and 3.x in non-default locations now, so the 3.x versions can't attempt to use some 2.x stuff below /usr. Didn't manage to boot domU so far (neither 2.x nor 3.x).

Quoted 3 lines

How compatible is the config stuff in /etc/xen? Can that be shared between xen2 and xen3? Or should I better prepare to switch that one as well?

yes, looks like -testing's /etc/xen and -unstable's /etc/xen are compatible, and i think xen2 could use xen3's configuration, but not sure about vice versa. at least xen3 has bochsrc, which is not existent in xen2.

so i guess it is safer to use xen3's /etc/xen all the time to support "parallel install".

regards,
aq