Closed
Bug 992235
Opened 11 years ago
Closed 10 years ago
Using slaveapi to reboot a machine on the slave health page results in "list index out of range" under 'output'
Categories
(Release Engineering :: General, defect)
Release Engineering
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: Callek)
References
Details
Attachments
(1 file)
1.69 KB,
patch
|
jhopkins
:
review+
|
Details | Diff | Splinter Review |
1) Go to https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name=tst-linux64-spot-471
2) Press reboot slave
In the reboot history table, after 30s or so, the following appears:
In Progress - reboot - list index out of range
I'm presuming "list index out of range" isn't expected.
Assignee | ||
Comment 1•11 years ago
|
||
This is not a one-off, I've seen it on ec2 systems before....
This is an issue with our inventory code:
2014-04-04 07:45:05,953 - INFO - tst-linux64-spot-471 - Getting inventory info
2014-04-04 07:45:06,200 - ERROR - Something went wrong while processing!
Traceback (most recent call last):
File "/builds/slaveapi/prod/lib/python2.7/site-packages/slaveapi/processor.py", line 60, in _worker
res, msg = action(slave, *args, **kwargs)
File "/builds/slaveapi/prod/lib/python2.7/site-packages/slaveapi/actions/reboot.py", line 33, in reboot
slave.load_inventory_info()
File "/builds/slaveapi/prod/lib/python2.7/site-packages/slaveapi/slave.py", line 60, in load_inventory_info
info = Machine.load_inventory_info(self)
File "/builds/slaveapi/prod/lib/python2.7/site-packages/slaveapi/machines/base.py", line 45, in load_inventory_info
config["inventory_password"],
File "/builds/slaveapi/prod/lib/python2.7/site-packages/slaveapi/clients/inventory.py", line 22, in get_system
info = requests.get(str(url), auth=auth).json()["objects"][0]
IndexError: list index out of range
Assignee | ||
Comment 2•11 years ago
|
||
This fixes this bug, but is a situation we'd need to support anyway in order to support ec2 management properly.
Assignee: nobody → bugspam.Callek
Status: NEW → ASSIGNED
Attachment #8401933 -
Flags: review?(jhopkins)
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 8401933 [details] [diff] [review]
[slaveapi] v1 - support missing host entries in inventory
Review of attachment 8401933 [details] [diff] [review]:
-----------------------------------------------------------------
::: slaveapi/clients/inventory.py
@@ +25,5 @@
> log.debug("%s - Making request to %s", fqdn, url)
> + info = defaultdict(lambda: None)
> + try:
> + result = requests.get(str(url), auth=auth).json()["objects"][0]
> + info.extend(result)
mistaken syntax error: info.update() not info.extend()
Updated•11 years ago
|
Attachment #8401933 -
Flags: review?(jhopkins) → review+
Assignee | ||
Comment 5•11 years ago
|
||
$ git push
Counting objects: 34, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 2.46 KiB | 0 bytes/s, done.
Total 21 (delta 17), reused 0 (delta 0)
To ssh://gitolite3@git.mozilla.org/build/slaveapi.git
4f63b89..8a742ec master -> master
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Component: Tools → General
You need to log in
before you can comment on or make changes to this bug.
Description
•