From: Thierry Parmentelat Date: Wed, 29 Jan 2014 20:18:34 +0000 (+0100) Subject: get rid of sequels of vs-based boxes X-Git-Tag: tests-5.3-2~19 X-Git-Url: http://git.onelab.eu/?p=tests.git;a=commitdiff_plain;h=2018172ed04f8cd645b877dd0ef38768ad1030b7 get rid of sequels of vs-based boxes use virsh lxc-enter-namespace instead of ssh to talk to TestPlc --- diff --git a/system/LocalSubstrate.inria.py b/system/LocalSubstrate.inria.py index c9573cf..a5a39eb 100755 --- a/system/LocalSubstrate.inria.py +++ b/system/LocalSubstrate.inria.py @@ -18,18 +18,10 @@ class OnelabSubstrate (Substrate): def test_box_spec (self): return 'testmaster' - # the build boxes we use - def build_vs_boxes_spec (self): - return [] - # the experimental lxc-based build box def build_lxc_boxes_spec (self): return [ 'liquid', 'reed', 'velvet' ] - # the vs-capable box for PLCs - def plc_vs_boxes_spec (self): - return [ ] - # the lxc-capable box for PLCs def plc_lxc_boxes_spec (self): return [ diff --git a/system/Substrate.py b/system/Substrate.py index 304373e..0f89b05 100644 --- a/system/Substrate.py +++ b/system/Substrate.py @@ -1031,16 +1031,14 @@ class Options: pass class Substrate: - def __init__ (self, plcs_on_vs=False, plcs_on_lxc=True): + def __init__ (self): self.options=Options() self.options.dry_run=False self.options.verbose=False self.options.reboot=False self.options.soft=False self.test_box = TestBox (self.test_box_spec()) - self.build_vs_boxes = [ BuildVsBox(h) for h in self.build_vs_boxes_spec() ] self.build_lxc_boxes = [ BuildLxcBox(h) for h in self.build_lxc_boxes_spec() ] - self.plc_vs_boxes = [ PlcVsBox (h,m) for (h,m) in self.plc_vs_boxes_spec ()] self.plc_lxc_boxes = [ PlcLxcBox (h,m) for (h,m) in self.plc_lxc_boxes_spec ()] self.qemu_boxes = [ QemuBox (h,m) for (h,m) in self.qemu_boxes_spec ()] self._sensed=False @@ -1048,20 +1046,13 @@ class Substrate: self.vplc_pool = Pool (self.vplc_ips(),"for vplcs",self) self.vnode_pool = Pool (self.vnode_ips(),"for vnodes",self) - self.rescope (plcs_on_vs=plcs_on_vs, plcs_on_lxc=plcs_on_lxc) - - # which plc boxes are we interested in ? - def rescope (self, plcs_on_vs, plcs_on_lxc): - self.build_boxes = self.build_vs_boxes + self.build_lxc_boxes - self.plc_boxes=[] - if plcs_on_vs: self.plc_boxes += self.plc_vs_boxes - if plcs_on_lxc: self.plc_boxes += self.plc_lxc_boxes + self.build_boxes = self.build_lxc_boxes + self.plc_boxes = self.plc_lxc_boxes self.default_boxes = self.plc_boxes + self.qemu_boxes self.all_boxes = self.build_boxes + [ self.test_box ] + self.plc_boxes + self.qemu_boxes def summary_line (self): msg = "[" - msg += " %d vp"%len(self.plc_vs_boxes) msg += " %d xp"%len(self.plc_lxc_boxes) msg += " %d tried plc boxes"%len(self.plc_boxes) msg += "]" @@ -1363,8 +1354,6 @@ class Substrate: help='dry run mode') (self.options,args)=parser.parse_args() - self.rescope (plcs_on_vs=True, plcs_on_lxc=True) - boxes=args if self.options.testbox: boxes += [self.test_box] if self.options.builds: boxes += self.build_boxes diff --git a/system/TestPlc.py b/system/TestPlc.py index 35c6722..9756156 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -244,7 +244,7 @@ class TestPlc: #command gets run in the plc's vm def host_to_guest(self,command): - return "virsh -c lxc:/// lxc-enter-namespace %s %s" %(self.vservername,command) + return "virsh -c lxc:/// lxc-enter-namespace %s /bin/bash -c '%s'" %(self.vservername,command) # return "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null %s %s"%(self.vserverip,command) # this /vservers thing is legacy...