New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 814594 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

AutotestHostRunError: "TypeError: __init__() takes exactly 3 arguments (2 given)"

Project Member Reported by briannorris@chromium.org, Feb 22 2018

Issue description

Noticed from these logs:

https://buganizer.corp.google.com/issues/73349131#comment8

/15 14:41:23.032 INFO | test_runner_utils:0199| autoserv| Timed out waiting for master-ssh connection to be established.
02/15 14:42:27.490 INFO | test_runner_utils:0199| autoserv| trying scp, rsync failed: Command <rsync -L  --timeout=1800 --rsh='/usr/bin/ssh -a -x -o ControlPath=/tmp/_autotmp_qk2IxUssh-master/socket -o Protocol=2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -l root -p 22' -az --no-o --no-g --exclude '*.pyc' --exclude '*unittest.py' --exclude 'common.py' --exclude '__init__.py' --exclude 'runner.py' --exclude 'view.py' "/mnt/host/source/src/third_party/autotest/files/client/bin/result_tools" "root@100.127.31.77:"/usr/local/autotest""> failed, rc=255, Command returned non-zero exit status
02/15 14:42:27.491 INFO | test_runner_utils:0199| autoserv| * Command:
02/15 14:42:27.491 INFO | test_runner_utils:0199| autoserv| rsync -L  --timeout=1800 --rsh='/usr/bin/ssh -a -x -o ControlPath=/tmp
02/15 14:42:27.491 INFO | test_runner_utils:0199| autoserv| /_autotmp_qk2IxUssh-master/socket -o Protocol=2 -o
02/15 14:42:27.492 INFO | test_runner_utils:0199| autoserv| StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes
02/15 14:42:27.492 INFO | test_runner_utils:0199| autoserv| -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3
02/15 14:42:27.493 INFO | test_runner_utils:0199| autoserv| -o ConnectionAttempts=4 -l root -p 22' -az --no-o --no-g --exclude '*.pyc'
02/15 14:42:27.493 INFO | test_runner_utils:0199| autoserv| --exclude '*unittest.py' --exclude 'common.py' --exclude '__init__.py'
02/15 14:42:27.493 INFO | test_runner_utils:0199| autoserv| --exclude 'runner.py' --exclude 'view.py'
02/15 14:42:27.494 INFO | test_runner_utils:0199| autoserv| "/mnt/host/source/src/third_party/autotest/files/client/bin/result_tools"
02/15 14:42:27.494 INFO | test_runner_utils:0199| autoserv| "root@100.127.31.77:"/usr/local/autotest""
02/15 14:42:27.494 INFO | test_runner_utils:0199| autoserv| Exit status: 255
02/15 14:42:27.495 INFO | test_runner_utils:0199| autoserv| Duration: 64.4115560055
02/15 14:42:27.495 INFO | test_runner_utils:0199| autoserv|
02/15 14:42:27.495 INFO | test_runner_utils:0199| autoserv| stderr:
02/15 14:42:27.496 INFO | test_runner_utils:0199| autoserv| rsync: connection unexpectedly closed (0 bytes received so far) [sender]
02/15 14:42:27.496 INFO | test_runner_utils:0199| autoserv| rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2]
02/15 14:42:27.496 INFO | test_runner_utils:0199| autoserv| Unexpected error copying test result logs, continuing ...
02/15 14:42:27.497 INFO | test_runner_utils:0199| autoserv| Traceback (most recent call last):
02/15 14:42:27.497 INFO | test_runner_utils:0199| autoserv| File "/mnt/host/source/src/third_party/autotest/files/server/autotest.py", line 1185, in collect_client_job_results
02/15 14:42:27.497 INFO | test_runner_utils:0199| autoserv| self.host, self.client_results_dir)
02/15 14:42:27.498 INFO | test_runner_utils:0199| autoserv| File "/mnt/host/source/src/third_party/autotest/files/client/bin/result_tools/runner.py", line 86, in run_on_client
02/15 14:42:27.498 INFO | test_runner_utils:0199| autoserv| _deploy_result_tools(host)
02/15 14:42:27.498 INFO | test_runner_utils:0199| autoserv| File "/mnt/host/source/src/third_party/autotest/files/client/bin/result_tools/runner.py", line 60, in _deploy_result_tools
02/15 14:42:27.499 INFO | test_runner_utils:0199| autoserv| excludes = _EXCLUDES)
02/15 14:42:27.499 INFO | test_runner_utils:0199| autoserv| File "/mnt/host/source/src/third_party/autotest/files/server/hosts/abstract_ssh.py", line 553, in send_file
02/15 14:42:27.500 INFO | test_runner_utils:0199| autoserv| 'excludes: %s' % ','.join(excludes))
02/15 14:42:27.500 INFO | test_runner_utils:0199| autoserv| TypeError: __init__() takes exactly 3 arguments (2 given)



The error handling for the error handling is wrong :)


server/hosts/abstract_ssh.py:

                raise error.AutotestHostRunError(
                        '--exclude is not supported in scp, try to use rsync. '
                        'excludes: %s' % ','.join(excludes))


client/common_lib/error.py:

class AutotestHostRunError(GenericHostRunError, AutotestError):
    pass
 
Owner: briannorris@chromium.org
Status: Started (was: Untriaged)
https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/929868
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/d7650487fbda484e61b7812db57ed84e87723d5e

commit d7650487fbda484e61b7812db57ed84e87723d5e
Author: Brian Norris <briannorris@chromium.org>
Date: Thu Feb 22 09:53:32 2018

abstract_ssh: construct AutotestHostRunError with correct args

We're supposed to pass an AutoservError object. Might as well get the
number of args correct though...

BUG= chromium:814594 
TEST=manually throw error.AutotestHostRunError with and without a 2nd
     'None' arg

Change-Id: Ie0a9ac6b375a6d2ffcbae90bdea08147715d3529
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/929868
Reviewed-by: Dan Shi <dshi@google.com>

[modify] https://crrev.com/d7650487fbda484e61b7812db57ed84e87723d5e/server/hosts/abstract_ssh.py

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/aa122c6a24e9031a59c68951cb5d91b87180e2fc

commit aa122c6a24e9031a59c68951cb5d91b87180e2fc
Author: Brian Norris <briannorris@chromium.org>
Date: Thu Feb 22 12:13:56 2018

local_host: construct AutotestHostRunError with correct args

We're supposed to pass an AutoservError object. Might as well get the
number of args correct though...

BUG= chromium:814594 
TEST=manually throw error.AutotestHostRunError with and without a 2nd
     'None' arg

Change-Id: I25dca9a68fcbfa12c0831756bfc050d06ef1fad9
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/930566
Reviewed-by: Dan Shi <dshi@google.com>

[modify] https://crrev.com/aa122c6a24e9031a59c68951cb5d91b87180e2fc/client/bin/local_host.py

Status: Fixed (was: Started)

Sign in to add a comment