Merge branch 'master' into lxc_devel
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Apr 2012 13:12:35 +0000 (15:12 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Apr 2012 13:12:35 +0000 (15:12 +0200)
Makefile
source/steps/UpdateNodeConfiguration.py

index df16ab0..c2540fa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,18 +4,25 @@
 # 2 forms are supported
 # (*) if your plc root context has direct ssh access:
 # make sync PLC=private.one-lab.org
-# (*) otherwise, entering through the root context
-# make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
+# (*) otherwise, for test deployments, use on your testmaster
+# $ run export
+# and cut'n paste the export lines before you run make sync
 
 PLCHOST ?= testplc.onelab.eu
 
-ifdef GUEST
-SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
-SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST) exec
-endif
 ifdef PLC
 SSHURL:=root@$(PLC):/
 SSHCOMMAND:=ssh root@$(PLC)
+else
+ifdef PLCHOSTLXC
+SSHURL:=root@$(PLCHOST):/var/lib/lxc/$(GUESTNAME)/rootfs
+SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME)
+else
+ifdef PLCHOSTVS
+SSHURL:=root@$(PLCHOSTVS):/vservers/$(GUESTNAME)
+SSHCOMMAND:=ssh root@$(PLCHOSTVS) vserver $(GUESTNAME) exec
+endif
+endif
 endif
 
 LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' 
@@ -27,9 +34,10 @@ DEPLOYMENT ?= regular
 
 sync:
 ifeq (,$(SSHURL))
-       @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
-       @echo "  e.g. make sync PLC=boot.planetlab.eu"
-       @echo "  or   make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr"
+       @echo "sync: I need more info from the command line, e.g."
+       @echo "  make sync PLC=boot.planetlab.eu"
+       @echo "  make sync PLCHOSTVS=.. GUESTNAME=.."
+       @echo "  make sync PLCHOSTLXC=.. GUESTNAME=.. GUESTHOSTNAME=.."
        @exit 1
 else
        $(SSHCOMMAND) mkdir -p /usr/share/bootmanager/$(DEPLOYMENT)
index 683bd94..3008341 100644 (file)
@@ -166,6 +166,9 @@ def update_vserver_network_files( vserver_dir, vars, log ):
         update_files= 1
 
         
+    # Thierry - 2012/03 - I'm renaming vserver-reference into sliceimage
+    # however I can't quite grasp the reason for this test below, very likely 
+    # compatibility with very old node images or something
     if '/.vref/' in vserver_dir or \
        '/.vcache/' in vserver_dir or \
        '/vserver-reference' in vserver_dir: