Commit 982b34f3 authored by Oceans's avatar Oceans

update

parent b05c8605
......@@ -40,7 +40,7 @@ def install_agent(vm, vm_list):
sftp.put(file_path + "/control_agent.sh", "control_agent.sh")
stdin, stdout, stderr = ssh.exec_command("sudo sh /tmp/control_agent.sh")
stdout.read()
stdin, stdout, stderr = ssh.exec_command("nohup python /root/Swarm-Agent/run.py>/dev/null 2>&1 &")
stdin, stdout, stderr = ssh.exec_command("nohup sudo python /root/Swarm-Agent/run.py>/dev/null 2>&1 &")
stdout.read()
print "%s: ========= Control Agent Installed =========" % (vm.ip)
except Exception as e:
......@@ -55,4 +55,4 @@ def run(vm_list):
if i.role == "master":
ret = install_agent(i, vm_list)
if "ERROR" in ret: return ret
return "SUCCESS"
\ No newline at end of file
return "SUCCESS"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment