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

Issue 721591 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

"atest server list" should have a --host option

Project Member Reported by akes...@chromium.org, May 12 2017

Issue description

atest server list supports a variety of output formats, but none of them (table, summary, json, --parse) are convenient for say, a shell command that just gives me a list of all production shards.

there should be a --host option to print only the hostnames of servers that maybe a given role or filter
 
There is a -t for table format and --json for JSON format, both of which are scriptable, if somewhat annoying depending on the tools you use/familiarity with sed/awk.

We definitely do need better tooling, but I think it needs some thought behind it so we don't keep hacking together scripts.
I've taken a lifelong vow never to learn sed/awk, and dealing with JSON is really a hassle if it can be avoided (thought that's the route I went in my most recent barbarism).

Yes we need better tools, but I don't think added a "--host" option falls into the back-to-the-drawing-board category.
True.  I am a little concerned because I don't think anyone will vouch that atest server list accurately reflects, e.g., the list of prod shards.

Comment 4 by dshi@chromium.org, May 12 2017

 -N, --hostnames-only 
Let's use the same option for atest host list.

Re #3, atest server list must matches the list of prod shards. If there is a mismatch, the shard could be skipped for push to prod. We might consider something to enforce the two lists match.
Agreed with #4
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 1 2017

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

commit e1729bb1558c8070c2459a310e59aa2320f4a0d3
Author: Aviv Keshet <akeshet@chromium.org>
Date: Thu Jun 01 04:14:38 2017

autotest: add `atest server list -N` option to list only hostnames

BUG= chromium:721591 
TEST=atest server list -N

Change-Id: Ia3a3cbecc901b8dc58e59d41bbf5057bb5396b00
Reviewed-on: https://chromium-review.googlesource.com/520122
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>

[modify] https://crrev.com/e1729bb1558c8070c2459a310e59aa2320f4a0d3/site_utils/server_manager_utils.py
[modify] https://crrev.com/e1729bb1558c8070c2459a310e59aa2320f4a0d3/cli/server.py

Owner: akes...@chromium.org
Status: Fixed (was: Untriaged)

Comment 8 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 9 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment