# inspect box and find currently running builds
matcher=re.compile("\s*(?P<pid>[0-9]+).*-[bo]\s+(?P<buildname>[^\s]+)(\s|\Z)")
- matcher_building_vm=re.compile("\s*(?P<pid>[0-9]+).*init-vserver.*-i\s+eth.\s+(?P<buildname>[^\s]+)\s*\Z")
+ matcher_building_vm=re.compile("\s*(?P<pid>[0-9]+).*init-vserver.*\s+(?P<buildname>[^\s]+)\s*\Z")
def sense(self, options):
print 'bb',
self.sense_uptime()
def reboot (self, options):
if not options.soft:
- self.reboot(options)
+ Box.reboot(self,options)
else:
self.soft_reboot (options)
self.plc_instances.append(PlcVsInstance(self,vservername,ctxid))
def line(self):
- msg="%s [max=%d,%d free, VS-based] (%s)"%(self.hostname, self.max_plcs,self.free_slots(),self.uname())
+ msg="%s [max=%d,free=%d, VS-based] (%s)"%(self.hostname, self.max_plcs,self.free_slots(),self.uname())
return msg
def plc_instance_by_vservername (self, vservername):
# a line describing the box
def line(self):
- msg="%s [max=%d,%d free, LXC-based] (%s)"%(self.hostname, self.max_plcs,self.free_slots(),self.uname())
+ msg="%s [max=%d,free=%d, LXC-based] (%s)"%(self.hostname, self.max_plcs,self.free_slots(),self.uname())
return msg
def plc_instance_by_lxcname (self, lxcname):
self.qemu_instances.append(dummy)
def line (self):
- msg="%s [max=%d,%d free] (%s)"%(self.hostname, self.max_qemus,self.free_slots(),self.driver())
+ msg="%s [max=%d,free=%d] (%s)"%(self.hostname, self.max_qemus,self.free_slots(),self.driver())
return msg
def list(self, verbose=False):
def reboot (self, options):
if not options.soft:
- self.reboot(options)
+ Box.reboot(self,options)
else:
self.run_ssh(['pkill','qemu'],"Killing qemu instances",
dry_run=options.dry_run)
def sense(self, options):
print 'qn',
modules=self.backquote_ssh(['lsmod']).split('\n')
- self._driver='*NO kqemu/kmv_intel MODULE LOADED*'
+ self._driver='*NO kqemu/kvm_intel MODULE LOADED*'
for module in modules:
if module.find('kqemu')==0:
self._driver='kqemu module loaded'
- # kvm might be loaded without vkm_intel (we dont have AMD)
+ # kvm might be loaded without kvm_intel (we dont have AMD)
elif module.find('kvm_intel')==0:
self._driver='kvm_intel module loaded'
########## find out running pids
self.test_instances.append(i)
i.set_broken(plcindex, step)
- matcher_proc=re.compile (".*/proc/(?P<pid>[0-9]+)/cwd.*/root/(?P<buildname>[^/]+)$")
- matcher_grep=re.compile ("/root/(?P<buildname>[^/]+)/logs/trace.*:TRACE:\s*(?P<plcindex>[0-9]+).*step=(?P<step>\S+).*")
+ matcher_proc=re.compile (".*/proc/(?P<pid>[0-9]+)/cwd.*/vservers/(?P<buildname>[^/]+)$")
+ matcher_grep=re.compile ("/vservers/(?P<buildname>[^/]+)/logs/trace.*:TRACE:\s*(?P<plcindex>[0-9]+).*step=(?P<step>\S+).*")
def sense (self, options):
print 'tm',
self.sense_uptime()
# scan timestamps on all tests
# this is likely to not invoke ssh so we need to be a bit smarter to get * expanded
# xxx would make sense above too
- command=['bash','-c',"grep . /root/*/timestamp /dev/null"]
+ command=['bash','-c',"grep . /vservers/*/timestamp /dev/null"]
ts_lines=self.backquote_ssh(command,trash_err=True).split('\n')
for ts_line in ts_lines:
if not ts_line.strip(): continue
- # expect /root/<buildname>/timestamp:<timestamp>
+ # expect /vservers/<buildname>/timestamp:<timestamp>
try:
(ts_file,timestamp)=ts_line.split(':')
ts_file=os.path.dirname(ts_file)
t=self.add_timestamp(buildname,timestamp)
except: print 'WARNING, could not parse ts line',ts_line
- command=['bash','-c',"grep KO /root/*/logs/trace-* /dev/null" ]
+ command=['bash','-c',"grep KO /vservers/*/logs/trace-* /dev/null" ]
trace_lines=self.backquote_ssh (command).split('\n')
for line in trace_lines:
if not line.strip(): continue