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

Issue 756882 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

CrosHost.collect_logs fails when rsync is absent

Reported by jrbarnette@chromium.org, Aug 18 2017

Issue description

Consider this repair task:
    http://cautotest/tko/retrieve_logs.cgi?job=/results/hosts/chromeos2-row4-rack1-host4/343595-repair/

The status.log file shows this failure:
	START	----	repair.servoreset	timestamp=1503070109	localtime=Aug 18 08:28:29	
		FAIL	----	repair.servoreset	timestamp=1503070134	localtime=Aug 18 08:28:54	__init__() takes exactly 3 arguments (2 given)
	END FAIL	----	repair.servoreset	timestamp=1503070134	localtime=Aug 18 08:28:54	


That message can be traced to this exception from debug/autoserv.DEBUG:
08/18 08:28:54.343 DEBUG|      abstract_ssh:0470| send_file. source: /usr/local/autotest/client/bin/result_tools, dest: /usr/local/autotest, delete_dest: False,preserve_symlinks:False
08/18 08:28:54.353 DEBUG|          ssh_host:0296| Running (ssh) 'rsync --version' from 'send_file|use_rsync|check_rsync|run|wrapper|run_very_slowly'
08/18 08:28:54.473 WARNI|      abstract_ssh:0132| rsync not available on remote host chromeos2-row4-rack1-host4 -- disabled
08/18 08:28:54.473 DEBUG|      abstract_ssh:0499| Trying scp.
08/18 08:28:54.474 ERROR|            repair:0449| Repair failed: Reset the DUT via servo
Traceback (most recent call last):
  File "/usr/local/autotest/client/common_lib/hosts/repair.py", line 447, in _repair_host
    self.repair(host)
  File "/usr/local/autotest/server/hosts/cros_repair.py", line 402, in repair
    host.collect_logs('/var/log', local_log_dir, ignore_errors=True)
  File "/usr/local/autotest/server/hosts/abstract_ssh.py", line 848, in collect_logs
    result_tools_runner.run_on_client(self, remote_src_dir)
  File "/usr/local/autotest/client/bin/result_tools/runner.py", line 86, in run_on_client
    _deploy_result_tools(host)
  File "/usr/local/autotest/client/bin/result_tools/runner.py", line 60, in _deploy_result_tools
    excludes = _EXCLUDES)
  File "/usr/local/autotest/server/hosts/abstract_ssh.py", line 503, in send_file
    'excludes: %s' % excludes)
TypeError: __init__() takes exactly 3 arguments (2 given)

The exception is raised from this code in AbstractSSHHost.send_file:
        if try_scp:
            logging.debug('Trying scp.')
            if excludes:
                raise error.AutotestHostRunError(
                        '--exclude is not supported in scp, try to use rsync. '
                        'excludes: %s' % excludes)

It seems like there are several problems here that might need
fixing.  At minimum, the exception constructor needs to be
fixed to include the right number of arguments, so that the real
failure is properly reported.

 
Cc: dshi@chromium.org
Owner: dshi@chromium.org
Status: Started (was: Untriaged)
I think I saw a CL for this.

Comment 3 by dshi@chromium.org, Aug 21 2017

CL to fix the format issue:
https://chromium-review.googlesource.com/#/c/chromiumos/third_party/autotest/+/621388/

The rsync failure is expected in some case, should be considered to be critical.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 22 2017

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

commit d9be07aded9da8abc3972bc4fa9a20866ecc352c
Author: Dan Shi <dshi@google.com>
Date: Tue Aug 22 02:53:00 2017

[autotest] Fix bug in string format

BUG= chromium:756882 
TEST=None

Change-Id: Ie841259e98c4e87597c1e567a0a8dde0ae14a72a
Reviewed-on: https://chromium-review.googlesource.com/621388
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/d9be07aded9da8abc3972bc4fa9a20866ecc352c/server/hosts/abstract_ssh.py
[modify] https://crrev.com/d9be07aded9da8abc3972bc4fa9a20866ecc352c/client/bin/local_host.py

Comment 5 by dshi@chromium.org, Sep 11 2017

Status: Fixed (was: Started)

Sign in to add a comment