object['plcs'] == None
sitelist, nodelist, slicelist, personlist, nodegrouplist = [], [], [], [], []
- if isinstance(self.config.sites.values, dict):
+
+ if isinstance(self.config.sites, dict):
sitelist = filter(this_plc, self.config.sites.values())
if isinstance(self.config.nodes, dict):
nodelist = filter(this_plc, self.config.nodes.values())
personlist = filter(this_plc, self.config.persons.values())
if isinstance(self.config.nodegroups, dict):
nodegrouplist = filter(this_plc, self.config.nodegroups.values())
-
+
# Add Test site
for site in sitelist:
sites = api.GetSites(auth, [site['login_base']])
bootimage_filename = "%(hostname)s-bootcd.iso" % locals()
diskimage_filename = "%(hostname)s-hda.img" % locals()
bootimage = "%(homedir)s/%(bootimage_filename)s" % locals()
- diskimage = "%(homedir)s/%(diskimage_filename)s" % locals()
- diskimage_path = "/%(path)s/%(diskimage_filename)s" % locals()
+ diskimage = "%(homedir)s/%(diskimage_filename)s" % locals()
+ print bootimage
+ print diskimage
+ diskimage_path = "/%(path)s/%(diskimage)s" % locals()
bootimage_tmppath = "%(tmpdir)s/%(bootimage_filename)s" % locals()
- bootimage_path = "%(path)s/%(bootimage_filename)s" % locals()
+ bootimage_path = "/%(path)s/%(bootimage)s" % locals()
remote_bootimage_path = "%(homedir)s/%(bootimage_filename)s" % locals()
-
+ print bootimage_path
+ print diskimage_path
+ print remote_bootimage_path
# wait up to 30 minutes for a node to boot and install itself correctly
self.hostname = hostname
self.totaltime = 60*60*wait
node.scp_to_host(bootimage_tmppath, "%(remote_bootimage_path)s" % locals())
# If node is vm (qemu) try installing kqemu
- node.host_commands("yum -y install kqemu", False)
- node.host_commands("modprobe kqemu")
+ #node.host_commands("yum -y install kqemu", False)
+ #node.host_commands("modprobe kqemu", False)
# Create a temporary disk image if it doesnt already exist or we are reinstalling
img_check_cmd = "ls -ld %(diskimage)s" % locals()
bootcmd = bootcmd + " 2>&1 >> %s " % (node.logfile.filename)
# kill any old qemu processes for this node
- pid_cmd = "ps -elfy | grep qemu | grep %(hostname)s | awk '{print$3}'" % locals()
+ pid_cmd = "ps -elfy | grep qemu | grep -v grep | grep %(hostname)s | awk '{print$3}'" % locals()
(status, output) = node.host_commands(pid_cmd)
pids = " ".join(output.split("\n")).strip()
if pids:
raise Exception, "Invalid test(s) %s. File(s) not found in %s" % \
(" ".join(list(invalid_tests)), node_tests_path)
- result = {}
+ results = {}
if self.config.verbose:
utils.header("Running %(test)s test on %(hostname)s" % locals(), logfile = self.logfile)
script = self.config.get_node_test(test)
if script['pre']: exe_pre = script['exe_pre']
if script['args']: exe_script = "%s %s" % (script['name'], script['args'])
if script['post']: exe_post = script['exe_post']
-
+
for command in [exe_pre, exe_script, exe_post]:
if command:
- command = "cd %(tests_dir)s/%(archive_dir)s && ./%(command)s" % locals()
+ command = "cd %(tests_dir)s/node/ && ./%(command)s" % locals()
print >> node.logfile, command
print >> self.logfile, command
# Execute script on node
(stdout, stderr) = node.popen(command, False)
print >> node.logfile, "".join(stdout)
- print >> logfile, "".join(stdout)
+ print >> self.logfile, "".join(stdout)
if self.config.verbose:
utils.header(stdout, logfile = self.config.logfile)
results[test] = (stdout, stderr)