Просмотр исходного кода

Fix hanging SSH command on Ubuntu worker

When executing `sudo /sbin/xxxx` on a Ubuntu worker machine, sudo will always
ask for a password, even though the user is set as passwordless, and even if
the binary does not exist. This patch removes any trace of `/sbin/xxxx`
sudo commands.
Daniel Vincze 2 лет назад
Родитель
Сommit
fe8ba96582
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      coriolis/utils.py

+ 1 - 1
coriolis/utils.py

@@ -710,7 +710,7 @@ def _write_systemd(ssh, cmdline, svcname, run_as=None, start=True):
                 get_pty=True)
 
     def _correct_selinux_label():
-        cmd = "sudo /sbin/restorecon -v %s" % serviceFilePath
+        cmd = "sudo restorecon -v %s" % serviceFilePath
         try:
             exec_ssh_cmd(ssh, cmd, get_pty=True)
         except exception.CoriolisException: