Currently, for ubuntu system, autotest.init will be used and start
monitor_db_babysitter owned by user autotest,
so when we use web front-end to create job, the autoserv also owned by user
autotest runs ssh commands with default
ssh user "root", known as "-l root", which causes the following permission
problem on ubuntu.
* Command:
/usr/bin/ssh -a -x -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/tmp/tmpvUr_sL -o BatchMode=yes -o ConnectTimeout=60 -o
ServerAliveInterval=300 -l root -p 22 172.16.3.130 " true"
Exit status: 255
Duration: 0.342299938202
stderr:
Permission denied (publickey,password).
So the patch changes user from autotest to root when starting
monitor_de_babysitter to keep consitent with ssh
user "-l root".
Signed-off-by: Wenyi Gao <[email protected]>
---
scheduler/monitor_db_babysitter | 3 ---
utils/autotest.init | 2 +-
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/scheduler/monitor_db_babysitter b/scheduler/monitor_db_babysitter
index 4625781..c8f67eb 100755
--- a/scheduler/monitor_db_babysitter
+++ b/scheduler/monitor_db_babysitter
@@ -139,9 +139,6 @@ class MonitorProc(SiteMonitorProc):
log.close()
-if os.getuid() == 0:
- logging.critical("Running as root, aborting!")
- sys.exit(1)
if utils.program_is_alive(monitor_db.BABYSITTER_PID_FILE_PREFIX):
logging.critical("Monitor_db_babysitter already running, aborting!")
diff --git a/utils/autotest.init b/utils/autotest.init
index 78ed9a8..30b6a51 100755
--- a/utils/autotest.init
+++ b/utils/autotest.init
@@ -6,7 +6,7 @@
# update-rc.d autotest start 95 2 3 4 5 . stop 90 0 1 6 .
BASE_DIR=/usr/local/autotest
-BECOME_USER=autotest
+BECOME_USER=root
if (test -r /lib/lsb/init-functions)
then
--
1.7.5.4
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest