On 11/16/2011 07:20 AM, Wenyi Gao wrote:
>
> 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".
From the ssl man page
-l login_name: Specifies the user to log in as on the remote
machine. This also may be specified on a per-host basis in the
configuration file.
This is not a problem with the autotest user on your machine. What
probably happens is you do not have ssh key properly setup.
https://github.com/autotest/autotest/wiki/KVMAutotest-GetStartedServer
Host Installation Steps
Setup password-less ssh connection from the server to this host
On the server, create a DSA key in the following way:
ssh-keygen -t dsa
Then, still on the server, copy it to the host:
ssh-copy-id [email protected]
I'm rejecting this patch.
>
>
> 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
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest