ERR in rest api logs; TypeError: 'NoneType' object is unsubscriptable

Bug #1327243 reported by Anastasia Palkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Vladimir Sharshov
6.1.x
Won't Fix
Medium
Fuel Python (Deprecated)
7.0.x
Invalid
Medium
Vladimir Sharshov

Bug Description

"build_id": "2014-06-05_15-25-50",
"mirantis": "yes",
"build_number": "344",
"nailgun_sha": "a828d6b7610f872980d5a2113774f1cda6f6810b",
"ostf_sha": "2b7b39e4b6ea89751b65171f24a8e80b5cac56aa",
"fuelmain_sha": "9964da7dec34d3100419c1c77c8f5235d8e30f14",
"astute_sha": "55df06b2e84fa5d71a1cc0e78dbccab5db29d968",
"release": "4.1B",
"fuellib_sha": "3511461a2b529619a787a6306441d9039699e71d"

There are errors in REST API logs:

2014-06-06 11:59:27 ERROR

[7f392f5fe700] (logger) Response code '500 Internal Server Error' for POST /api/nodes/ from 10.20.0.156:33189

2014-06-06 11:59:27 ERROR

[7f392f5fe700] (logger) Traceback (most recent call last):
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 239, in process
    return self.handle()
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "<string>", line 2, in POST
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/api/handlers/base.py", line 55, in content_json
    data = func(*args, **kwargs)
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/api/handlers/node.py", line 228, in POST
    name="Untitled (%s)" % data['mac'][-5:],
TypeError: 'NoneType' object is unsubscriptable

Revision history for this message
Anastasia Palkina (apalkina) wrote :
Changed in fuel:
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
Ryan Moe (rmoe) wrote :

This traceback is because one of the discovered nodes (10.20.0.156) passed no interface info to the agent API handler.

Ryan Moe (rmoe)
Changed in fuel:
status: New → Confirmed
importance: High → Critical
Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

Please run the following command on the problematic node and report the output:
ruby -r ohai/system -e 'os=Ohai::System.new; os.all_plugins; puts os["network"]["interfaces"].inspect'

Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

Looks like at one point (2014-06-06 11:59:27 in ) ohai returned an empty list of network interfaces, but on the next run it recovered and returned a full list. Now the above command also returns the full data.

Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

above should read: 2014-06-06 11:59:27 in /var/log/nailgun/api.log on master node.

Changed in fuel:
importance: Critical → High
milestone: 4.1.1 → 4.1.2
milestone: 4.1.2 → 5.1
Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

Downgrading due to highly intermittent nature of this problem.

Long-term workaround is to validate network data received from ohai, and, if it is empty and there's a non-empty cached data, keep the cache for 3 runs before removing the data no longer reported by ohai.

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vladimir Sharshov (vsharshov)
tags: added: release-notes
Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

Due to the fact that second run of agent was successful, this bug should be considered as medium priority.

no longer affects: fuel/5.0.x
Changed in fuel:
importance: High → Medium
Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/4.1.x
Changed in fuel:
milestone: 5.1 → 6.0
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

This hits feature freeze in 6.0. Moving to 6.1

Changed in fuel:
milestone: 6.0 → 6.1
tags: added: module-nailgun-agent
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

Moving to 7.0

Changed in fuel:
milestone: 6.1 → 7.0
assignee: Vladimir Sharshov (vsharshov) → Fuel Astute Team (fuel-astute)
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 6.1 → 7.0
tags: added: qa-agree-7.0
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

Very old bug. No reproducing. Mark as Invalid. Feel free to open it with new logs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.