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

Issue 666101 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature



Sign in to add a comment

deploy_server: Separate out the logs coming from the various deploy_server_local runs

Project Member Reported by pprabhu@chromium.org, Nov 16 2016

Issue description

deploy_server's log combines the logs from the various deploy_server_local runs on the servers. These scripts run in parallel (woohoo!). That means that we get somewhat mixed logs from these servers (boo!).

We should keep these logs separate and make it easy to correlate a deploy_server_local's logs with the server where it was running. One way to do this would be to redirect the logs to <servername>.log files inside a logsdir, while just keeping deploy_server.py's logs on stdout. This will also make it easier to follow deploy_server.py's progress.

 
Also, deploy_server is hanging repeatedly in updating several servers. Currently, there is no easy way to say which servers are still being processed. If we separate out the logs from deploy_server_local, we should start pinging the status of "still processing" servers in the main script to know what servers we're waiting for still.
We should also leave a log of deploy_server_local.py on the server where it ran. So that we can go look at what happened for that server, **on that server**.

Comment 3 by dshi@chromium.org, Nov 29 2016

Cc: xixuan@chromium.org
Labels: -current-issue Hotlist-Fixit
Owner: pprabhu@chromium.org
Status: Assigned (was: Available)
Cc: pprabhu@chromium.org
Owner: shuqianz@chromium.org
Labels: -Pri-2 Pri-1
This seems like a very good fixit candidate for fixit week.
Summarize a discussion IRL:

- We would like to add a required argument --log-dir to deploy_server. Logs from the remote deploy_server_local.py scripts will be collected into files in this directory *on the server where deploy_server is run*. This matches current behaviour, and avoids having to SSH into servers to find out what's wrong (e.g., you want to grep *all logs* from certain error message)

- Once the logs are separated out, the main deploy_server log will become quite empty (yay!). Sometimes, deploy_server_local can take hours (see  issue 673585 ), and it's not good to have the user stare at a blank screen for >1 hour.

Instead, deploy_server should use multiprocessing.Pool's apply_async method to parallelize the deploy_server_local runs, and poll for completion every 1 minute, logging the servers which are still running every minute. This is a far more useful UX.
good summary :)
Labels: cros-infra-fixedit-q117
Erm.... Did you fix it? I don't see any CLs here :)
I just added the label, the CL is waiting for your review
Project Member

Comment 12 by bugdroid1@chromium.org, Feb 8 2017

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

commit 9febd45bbbcaba56b66cd4b1febcb85f8b5bb591
Author: Shuqian Zhao <shuqianz@chromium.org>
Date: Wed Feb 08 04:14:32 2017

[autotest] Separate the logs deployment logs

Instead flush all the logs into console, write the logs of every server
into a log file in a single thread. In this way, we can save the log for
debug purpose and all the logs will not be mixed up.

BUG= chromium:666101 
TEST=unittest and test in a test server.

Change-Id: Iaf7b303f0c3b0c9346c5346052ba07c79d2fb990
Reviewed-on: https://chromium-review.googlesource.com/435503
Commit-Ready: Shuqian Zhao <shuqianz@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/9febd45bbbcaba56b66cd4b1febcb85f8b5bb591/site_utils/lib/infra.py
[modify] https://crrev.com/9febd45bbbcaba56b66cd4b1febcb85f8b5bb591/site_utils/deploy_server.py
[modify] https://crrev.com/9febd45bbbcaba56b66cd4b1febcb85f8b5bb591/site_utils/deploy_server_local.py
[modify] https://crrev.com/9febd45bbbcaba56b66cd4b1febcb85f8b5bb591/site_utils/deploy_server_unittest.py
[modify] https://crrev.com/9febd45bbbcaba56b66cd4b1febcb85f8b5bb591/site_utils/deploy_server_local_unittest.py

Project Member

Comment 13 by bugdroid1@chromium.org, Feb 9 2017

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

commit fad50674321c90591cbaf35a3565398d4184d45d
Author: Shuqian Zhao <shuqianz@chromium.org>
Date: Thu Feb 09 00:24:28 2017

[autotest] Check deployment progress every 1 min to print unfinished servers

Poll the deployment progress every one minute and logging the servers
which are still running.

BUG= chromium:666101 
TEST=unittest and test on testing servers

Change-Id: Ibc1194507da45c8073ee0a2d383a4b3324ee8560
Reviewed-on: https://chromium-review.googlesource.com/436350
Commit-Ready: Shuqian Zhao <shuqianz@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/fad50674321c90591cbaf35a3565398d4184d45d/site_utils/deploy_server.py

Status: Fixed (was: Assigned)

Comment 15 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 16 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 18 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment