Closed Bug 1552299 Opened 6 years ago Closed 6 years ago

Show age of instance in infrastructure/aws/ssh.py listing

Categories

(Webtools :: Searchfox, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

Details

I triggered a "dev" channel indexer earlier and wasn't sure how long it had been running. The web-server-secure instances do include a 'web-server' tag with their start time, but then one still must do math.

I already have a small fix/hack for this, assuming python2 is the right thing to target, although it might be python3 future compatible too.

https://github.com/mozsearch/mozsearch/pull/216

before:

$  python infrastructure/aws/ssh.py
usage: infrastructure/aws/ssh.py <instance-id>

Current instances:
('i-elided', 'web-server-secure', {'web-server': '2019-05-15 18:06:53.345837', 'cfile': 'mozilla-releases.json', 'channel': 'mozilla-releases'})
('i-elided', 'web-server-secure', {'web-server': '2019-05-14 21:23:17.092547', 'cfile': 'config.json', 'channel': 'kats'})
('i-elided', 'web-server-secure', {'cfile': 'config.json', 'web-server': '2019-05-16 16:11:38.022931', 'channel': 'release'})
('i-elided', 'web-server-secure', {'cfile': 'mozilla-releases.json', 'web-server': '2019-05-16 17:56:14.671484', 'channel': 'mozilla-releases'})
('i-elided', 'indexer-secure', {'cfile': 'config.json', 'mrepo': 'https://github.com/asutherland/searchfox', 'crepo': 'https://github.com/asutherland/mozsearch-mozilla', 'branch': 'scope-nesting', 'channel': 'dev'})
('i-elided', 'web-server-secure', {'cfile': 'mozilla-releases.json', 'web-server': '2019-05-06 00:26:27.396672', 'channel': 'dev'})
('i-elided', 'web-server-secure', {'cfile': 'config.json', 'web-server': '2019-05-15 16:22:30.861038', 'channel': 'release'})

after:

$  python infrastructure/aws/ssh.py
usage: infrastructure/aws/ssh.py <instance-id>

Current instances:
('i-elided', 'web-server-secure', '1 day, 1:08:05', {'web-server': '2019-05-15 18:06:53.345837', 'cfile': 'mozilla-releases.json', 'channel': 'mozilla-releases'})
('i-elided', 'web-server-secure', '1 day, 21:51:46', {'web-server': '2019-05-14 21:23:17.092547', 'cfile': 'config.json', 'channel': 'kats'})
('i-elided', 'web-server-secure', '3:03:27', {'cfile': 'config.json', 'web-server': '2019-05-16 16:11:38.022931', 'channel': 'release'})
('i-elided', 'web-server-secure', '1:18:44', {'cfile': 'mozilla-releases.json', 'web-server': '2019-05-16 17:56:14.671484', 'channel': 'mozilla-releases'})
('i-elided', 'indexer-secure', '3:18:21', {'cfile': 'config.json', 'mrepo': 'https://github.com/asutherland/searchfox', 'crepo': 'https://github.com/asutherland/mozsearch-mozilla', 'branch': 'scope-nesting', 'channel': 'dev'})
('i-elided', 'web-server-secure', '10 days, 18:48:32', {'cfile': 'mozilla-releases.json', 'web-server': '2019-05-06 00:26:27.396672', 'channel': 'dev'})
('i-elided', 'web-server-secure', '1 day, 2:52:29', {'cfile': 'config.json', 'web-server': '2019-05-15 16:22:30.861038', 'channel': 'release'})

Thanks!

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.