diff --git a/vmms/localDocker.py b/vmms/localDocker.py index 45dda03d..81bd965d 100644 --- a/vmms/localDocker.py +++ b/vmms/localDocker.py @@ -156,15 +156,15 @@ def runJob(self, vm, runTimeout, maxOutputFileSize, disableNetwork): os.getenv("DOCKER_TANGO_HOST_VOLUME_PATH"), instanceName ) args = ["docker", "run", "--name", instanceName, "-v"] - args = args + ["%s:%s" % (volumePath, "/home/mount")] + args.append("%s:%s" % (volumePath, "/home/mount")) if vm.cores: - args = args + [f"--cpus={vm.cores}"] + args.append(f"--cpus={vm.cores}") if vm.memory: - args = args + ["-m", f"{vm.memory}m"] + args.extend(("-m", f"{vm.memory}m")) if disableNetwork: - args = args + ["--network", "none"] - args = args + [vm.image] - args = args + ["sh", "-c"] + args.append("--network", "none") + args.append(vm.image) + args.extend(("sh", "-c")) autodriverCmd = ( "autodriver -u %d -f %d -t %d -o %d autolab > output/feedback 2>&1" @@ -176,11 +176,11 @@ def runJob(self, vm, runTimeout, maxOutputFileSize, disableNetwork): ) ) - args = args + [ + args.append( 'cp -r mount/* autolab/; su autolab -c "%s"; \ cp output/feedback mount/feedback' % autodriverCmd - ] + ) self.log.debug("Running job: %s" % str(args)) ret = timeout(args, runTimeout * 2)