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

Issue 787233 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

'Host' object has no attribute 'is_available'

Project Member Reported by nxia@chromium.org, Nov 21 2017

Issue description

https://uberchromegw.corp.google.com/i/chromeos/builders/auron_paine-paladin/builds/1464


11/20 16:49:35.601 ERROR|        server_job:0866| Exception escaped control file, job aborting:
Traceback (most recent call last):
  File "/usr/local/autotest/server/server_job.py", line 858, in run
    self._execute_code(server_control_file, namespace)
  File "/usr/local/autotest/server/server_job.py", line 1359, in _execute_code
    execfile(code_file, namespace, namespace)
  File "/usr/local/autotest/results/157460714-chromeos-test/hostless/control.srv", line 63, in <module>
    dynamic_suite.run_provision_suite(**args_dict)
  File "/usr/local/autotest/server/cros/dynamic_suite/dynamic_suite.py", line 485, in run_provision_suite
    child_dependencies=spec.child_dependencies,
  File "/usr/local/autotest/server/cros/dynamic_suite/suite.py", line 1679, in __init__
    available_hosts = [h for h in hosts if h.is_available()]
AttributeError: 'Host' object has no attribute 'is_available'
11/20 16:49:35.605 INFO |        server_job:0213| INFO	----	----	timestamp=1511225375	job_abort_reason='Host' object has no attribute 'is_available'	localtime=Nov 20 16:49:35	'Host' object has no attribute 'is_available'
11/20 16:49:35.607 WARNI|        subcommand:0085| parallel_simple was called with an empty arglist, did you forget to pass in a list of machines?
11/20 16:49:35.610 ERROR|         traceback:0013| Traceback (most recent call last):
11/20 16:49:35.610 ERROR|         traceback:0013|   File "/usr/local/autotest/server/autoserv", line 533, in run_autoserv
11/20 16:49:35.611 ERROR|         traceback:0013|     use_packaging=(not no_use_packaging))
11/20 16:49:35.611 ERROR|         traceback:0013|   File "/usr/local/autotest/server/server_job.py", line 858, in run
11/20 16:49:35.612 ERROR|         traceback:0013|     self._execute_code(server_control_file, namespace)
11/20 16:49:35.612 ERROR|         traceback:0013|   File "/usr/local/autotest/server/server_job.py", line 1359, in _execute_code
11/20 16:49:35.612 ERROR|         traceback:0013|     execfile(code_file, namespace, namespace)
11/20 16:49:35.613 ERROR|         traceback:0013|   File "/usr/local/autotest/results/157460714-chromeos-test/hostless/control.srv", line 63, in <module>
11/20 16:49:35.613 ERROR|         traceback:0013|     dynamic_suite.run_provision_suite(**args_dict)
11/20 16:49:35.614 ERROR|         traceback:0013|   File "/usr/local/autotest/server/cros/dynamic_suite/dynamic_suite.py", line 485, in run_provision_suite
11/20 16:49:35.614 ERROR|         traceback:0013|     child_dependencies=spec.child_dependencies,
11/20 16:49:35.614 ERROR|         traceback:0013|   File "/usr/local/autotest/server/cros/dynamic_suite/suite.py", line 1679, in __init__
11/20 16:49:35.615 ERROR|         traceback:0013|     available_hosts = [h for h in hosts if h.is_available()]
 

Comment 2 by xixuan@chromium.org, Nov 21 2017

It's not a newly pushed change, why only affect this round of CQ?

Comment 3 by xixuan@chromium.org, Nov 21 2017

Also it breaks CQ for second time, the whole CL is not tested locally by developer, neither get fully tested in test_push.

File  Issue 787251  as a chase-pending bug.

Comment 4 by xixuan@chromium.org, Nov 21 2017

Owner: ayatane@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by xixuan@chromium.org, Nov 21 2017

Ok I got it, it's push's fault...
https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/777605 changes the host search criterial, originally no hosts are found, now we have.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 21 2017

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

commit f74957d0f8679a5cb9eee6e5cf2bf75ade95655c
Author: Allen Li <ayatane@chromium.org>
Date: Tue Nov 21 07:25:47 2017

[autotest] Fix is_available()

So there are many different kinds of Host objects, and I put this
method on the wrong one.  Both of these are from AFE RPC calls and
thus use the RPC return Host object, not the Django database Host
object or the scheduler database Host object, or any of the two other
types of Hosts.

BUG= chromium:787233 
TEST=None

Change-Id: I1ce07b2b827fde301707b14d85e658ce2f4c427f
Reviewed-on: https://chromium-review.googlesource.com/780844
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Ningning Xia <nxia@chromium.org>

[modify] https://crrev.com/f74957d0f8679a5cb9eee6e5cf2bf75ade95655c/server/frontend.py
[modify] https://crrev.com/f74957d0f8679a5cb9eee6e5cf2bf75ade95655c/site_utils/diagnosis_utils.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 28 2017

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

commit 035b47cc28d0e79654bb7a838ffae0d4156ac9c2
Author: Allen Li <ayatane@chromium.org>
Date: Tue Nov 28 23:44:20 2017

[autotest] Remove is_available() on wrong Host class

BUG= chromium:787233 
TEST=None

Change-Id: I96f20b3224bafa2bc7b7a696de9faf1ef8544af6
Reviewed-on: https://chromium-review.googlesource.com/780879
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/035b47cc28d0e79654bb7a838ffae0d4156ac9c2/frontend/afe/models.py
[modify] https://crrev.com/035b47cc28d0e79654bb7a838ffae0d4156ac9c2/site_utils/diagnosis_utils_unittest.py

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 1 2017

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

commit f27b0480c13e77e44d3ed2f4f2a56e4014b889d9
Author: Allen Li <ayatane@chromium.org>
Date: Fri Dec 01 04:30:08 2017

[autotest] Make job_aborter run more often

BUG= chromium:787233 
TEST=None

Change-Id: If7101b0fbbd9592608653adca25499eb82ae4350
Reviewed-on: https://chromium-review.googlesource.com/783430
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/f27b0480c13e77e44d3ed2f4f2a56e4014b889d9/venv/lucifer/cmd/job_aborter.py

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 1 2017

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

commit 2445aecb11ce5672ec7d1bde7488aa1fc353b999
Author: Allen Li <ayatane@chromium.org>
Date: Fri Dec 01 04:30:09 2017

[autotest] Fix job_aborter marking aborted

The original code is for marking jobs to be aborted, not for marking
jobs as having been actually aborted.

Also, settle on using FAILED instead of ABORTED for job_reporter
crashes.

BUG= chromium:787233 
TEST=None

Change-Id: Ib5e91b16c99fbe62a7ece2429aa27a225441f2e6
Reviewed-on: https://chromium-review.googlesource.com/783516
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/2445aecb11ce5672ec7d1bde7488aa1fc353b999/venv/lucifer/cmd/job_aborter.py

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 6 2017

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

commit a3d7bfac12b786f216d84d4c2f27df25047236df
Author: Allen Li <ayatane@chromium.org>
Date: Wed Dec 06 04:22:34 2017

[autotest] Always clean up lease file

Since were now using JobHandoff to track job_reporter crashes, we
dont have to leave stale files intentionally.

BUG= chromium:787233 
TEST=None

Change-Id: I8c1bca93ce70d70261c9276d4fffec7ca5a8ce66
Reviewed-on: https://chromium-review.googlesource.com/783526
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/a3d7bfac12b786f216d84d4c2f27df25047236df/venv/lucifer/leasing_unittest.py
[modify] https://crrev.com/a3d7bfac12b786f216d84d4c2f27df25047236df/venv/lucifer/leasing.py

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 6 2017

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

commit 29d75f0c0d704a9d579f795670f01acb66939592
Author: Allen Li <ayatane@chromium.org>
Date: Wed Dec 06 04:22:33 2017

[autotest] Set read isolation level

MariaDB/MySQL has the default isolation level of REPEATABLE-READ

That means that if Django runs a SELECT statement, it starts a
transaction and future SELECT statements will get stale data until the
transaction is closed (e.g., you make a DML).

See also https://stackoverflow.com/questions/3346124/

BUG= chromium:787233 
TEST=None

Change-Id: I34ee30d2c61c9c79b8103cff76b3f9a2e04dcf2d
Reviewed-on: https://chromium-review.googlesource.com/783556
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/29d75f0c0d704a9d579f795670f01acb66939592/frontend/setup_test_environment.py
[modify] https://crrev.com/29d75f0c0d704a9d579f795670f01acb66939592/frontend/database_settings_helper.py
[modify] https://crrev.com/29d75f0c0d704a9d579f795670f01acb66939592/scheduler/rdb_testing_utils.py

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 7 2017

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

commit bff32b3302fdf5e296ecda38d96d7d8783440de7
Author: Paul Hobbs <phobbs@google.com>
Date: Thu Dec 07 18:13:05 2017

Revert "[autotest] Set read isolation level"

This reverts commit 29d75f0c0d704a9d579f795670f01acb66939592.

Reason for revert:  crbug.com/792985 

Original change's description:
> [autotest] Set read isolation level
> 
> MariaDB/MySQL has the default isolation level of REPEATABLE-READ
> 
> That means that if Django runs a SELECT statement, it starts a
> transaction and future SELECT statements will get stale data until the
> transaction is closed (e.g., you make a DML).
> 
> See also https://stackoverflow.com/questions/3346124/
> 
> BUG= chromium:787233 
> TEST=None
> 
> Change-Id: I34ee30d2c61c9c79b8103cff76b3f9a2e04dcf2d
> Reviewed-on: https://chromium-review.googlesource.com/783556
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Tested-by: Allen Li <ayatane@chromium.org>
> Reviewed-by: Allen Li <ayatane@chromium.org>

Bug:  chromium:787233 
Change-Id: I63c070641119902f6273ad0c2bf8ac4e9ebce678
Reviewed-on: https://chromium-review.googlesource.com/814914
Reviewed-by: Paul Hobbs <phobbs@google.com>
Tested-by: Paul Hobbs <phobbs@google.com>

[modify] https://crrev.com/bff32b3302fdf5e296ecda38d96d7d8783440de7/frontend/setup_test_environment.py
[modify] https://crrev.com/bff32b3302fdf5e296ecda38d96d7d8783440de7/frontend/database_settings_helper.py
[modify] https://crrev.com/bff32b3302fdf5e296ecda38d96d7d8783440de7/scheduler/rdb_testing_utils.py

Status: Fixed (was: Assigned)
Long fixed

Sign in to add a comment