Skip to content
Snippets Groups Projects
Commit b77c8ea4 authored by Benjamin Bayart's avatar Benjamin Bayart
Browse files

Log error -> info on ssh master connexions

parent 4214819e
No related branches found
No related tags found
2 merge requests!141Refacto du déplacement de domaine,!136GET mailbox info
...@@ -390,7 +390,7 @@ def start_master( ...@@ -390,7 +390,7 @@ def start_master(
ssh_url = hosts[hostname].ssh_url ssh_url = hosts[hostname].ssh_url
ssh_args = hosts[hostname].ssh_args ssh_args = hosts[hostname].ssh_args
pid = os.getpid() pid = os.getpid()
log.error(f"Start master for {hostname}, mode = {mode}, pid = {pid}") log.info(f"Start master for {hostname}, mode = {mode}, pid = {pid}")
if os.path.exists(f"/tmp/ssh.{hostname}.{pid}"): if os.path.exists(f"/tmp/ssh.{hostname}.{pid}"):
print(f"Le socket /tmp/ssh.{hostname}.{pid} existe deja") print(f"Le socket /tmp/ssh.{hostname}.{pid} existe deja")
exit(1) exit(1)
...@@ -413,7 +413,7 @@ def stop_master( ...@@ -413,7 +413,7 @@ def stop_master(
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
ssh_url = hosts[hostname].ssh_url ssh_url = hosts[hostname].ssh_url
ssh_args = hosts[hostname].ssh_args ssh_args = hosts[hostname].ssh_args
log.error(f"Stop master for {hostname}") log.info(f"Stop master for {hostname}")
proc = subprocess.Popen( proc = subprocess.Popen(
["ssh", "-O", "exit", "-o", f"ControlPath=/tmp/ssh.{hostname}.{pid}"] + ssh_args + [ ssh_url ], ["ssh", "-O", "exit", "-o", f"ControlPath=/tmp/ssh.{hostname}.{pid}"] + ssh_args + [ ssh_url ],
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment