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

Issue 703256 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 703261
issue 703264
issue 703272
issue 703274

Blocking:
issue 810460
issue 652509
issue 674760



Sign in to add a comment

Migrate all ts_mon-sending scripts to virtualenv

Project Member Reported by akes...@chromium.org, Mar 20 2017

Issue description

Metabug tracking the various end-points that we need to migrate to virtualenv to preserve ts_mon capability.
 
Cc: pho...@chromium.org ayatane@chromium.org
*entry points
Blockedon: 703261
A good hint for the number of scripts to migrate, is the number of distinct SetupTsMonGlobalState calls we have:

In autotest:
scheduler/host_scheduler.py:        ts_mon_config.SetupTsMonGlobalState('autotest_host_scheduler')
scheduler/monitor_db.py:    with ts_mon_config.SetupTsMonGlobalState('autotest_scheduler',
scheduler/shard/shard_client.py:    ts_mon_config.SetupTsMonGlobalState('shard_client')
server/autoserv:    site_utils.SetupTsMonGlobalState('autoserv', indirect=False,
site_utils/check_hung_proc.py:    with site_utils.SetupTsMonGlobalState('check_hung_proc', short_lived=True):
site_utils/collect_host_stats.py:    ts_mon_config.SetupTsMonGlobalState('collect_host_stats')
site_utils/count_jobs.py:    with site_utils.SetupTsMonGlobalState('count_jobs', short_lived=True):
site_utils/gmail_lib.py:    with site_utils.SetupTsMonGlobalState('gmail_lib', short_lived=True):
site_utils/gs_offloader.py:    with ts_mon_config.SetupTsMonGlobalState('gs_offloader', indirect=True,
site_utils/stats/mysql_stats.py:    with ts_mon_config.SetupTsMonGlobalState('mysql_stats', indirect=True):
site_utils/suite_scheduler/suite_scheduler.py:    ts_mon_config.SetupTsMonGlobalState('autotest_suite_scheduler')


In chromite:

scripts/cbuildbot.py:    context = ts_mon_config.SetupTsMonGlobalState('cbuildbot', indirect=True)
scripts/sysmon/__main__.py:  ts_mon_config.SetupTsMonGlobalState('sysmon', auto_flush=False)

Blockedon: 703264
Cc: dshi@chromium.org sbasi@chromium.org
Blocking: 674760
Blocking: 652509
Cc: davidri...@chromium.org
Blockedon: 703272
Blockedon: 703274
Blockedon: 703275
Rough priority buckets:

P0: (important and also likeliest to have weird dependency issues to diagnose)
autoserv            crbug.com/703261 
cbuildbot           crbug.com/703274 
schedulers/shards   crbug.com/703264 

P1: (important, but fairly standalone)
misc lab jobs       crbug.com/703275 
stats jobs          crbug.com/703272 
Here's some more detail about the necessary changes.

Any entry point that will end up using metrics will need a new entry point that enables virtualenv.  The old entry point can be kept and should still work sans metrics.  Anything that calls these entry points (Upstart scripts or in code) need to be modified accordingly.

Currently, all that is needed from virtualenv is just getting it enabled; virtualenv's purpose with respect to fixing metrics is just shielding ts_mon from the system installed protobuf.  chromite/Autotest will still be injecting their own third_party/site-packages into the import path, which should continue working just as well/poorly as it is currently.  If it turns out that we were actually depending on a system installed package, that package will need to be added to the virtualenv dependencies.

chromite/bin/sysmon can be used as a reference for how to set up virtualenv.

Comment 15 by aut...@google.com, Apr 13 2017

Labels: -current-issue
Status: Unconfirmed (was: Untriaged)
Components: Infra>Client>ChromeOS>CI
Components: -Infra>Client>ChromeOS
Blockedon: -703275
Blocking: 810460
Hi, this bug has no status updates recently. Please acknowledge the bug and provide status within two weeks (6/22/2018), or the bug will be closed. Thank you.

Sign in to add a comment