[nailgun] Nailgun returns Internal Server Error while trying to get the list of available extensions

Bug #1620463 reported by Vitalii Kulanov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Vitalii Kulanov
Mitaka
Fix Released
High
Vitalii Kulanov
Newton
Fix Released
High
Vitalii Kulanov

Bug Description

Detailed bug description:
A new API handler /extensions/ (returns a list of available extensions) was added recently https://review.openstack.org/#/c/362842/, but if we try to use it (e.g. get list of available extensions) Nailgun reports 'Internal server error'.

curl -s -H "X-Auth-Token: $AUTH_TOKEN" http://10.20.0.2:8000/api/v1/extensions
internal server error

Nailgun logs:

[root@fuel ~]# tail /var/log/nailgun/api.log -n 50

2016-09-05 20:49:49.169 DEBUG [7f1839cbe880] (logger) Request GET /api/v1/extensions from 10.20.0.1:46888
2016-09-05 20:49:49.171 ERROR [7f1839cbe880] (logger) Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/site-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "<string>", line 2, in GET
  File "/usr/lib/python2.7/site-packages/nailgun/api/v1/handlers/base.py", line 381, in serialize
    resp = func(cls, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nailgun/api/v1/handlers/extension.py", line 30, in GET
    return [ext.to_dict() for ext in get_all_extensions()]
TypeError: unbound method to_dict() must be called with NetworkManagerExtension instance as first argument (got nothing instead)

2016-09-05 20:49:49.172 ERROR [7f1839cbe880] (logger) Response code '500 Internal Server Error' for GET /api/v1/extensions from 10.20.0.1:46888

Steps to reproduce:
1. Deploy Fuel (e.g. 1 master + 5 nodes).
2. Create new env.
6. Try to get the list of available extensions for the cluster
   curl -s -H "X-Auth-Token: $AUTH_TOKEN" http://10.20.0.2:8000/api/v1/extensions

Expected results:
 List of available extensions

Actual result:
 Interanal Server Error

Reproducibility:
 Always

Description of the environment:
[root@fuel ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 607
cat /etc/fuel_build_number:
 607
cat /etc/fuel_release:
 10.0
cat /etc/fuel_openstack_version:
 newton-10.0

Additional information:
 Reproduced in newton and mitaka (https://review.openstack.org/#/q/I072f3e4d9cd8f71498a20312af7c2016e951456d,n,z)

Changed in fuel:
assignee: nobody → Vitalii Kulanov (vitaliy-t)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/366026

Changed in fuel:
status: New → In Progress
summary: [nailgun] Nailgun returns Internal Server Error while trying to get the
- list of available extensions for the cluster
+ list of available extensions
description: updated
Changed in fuel:
importance: Undecided → High
milestone: none → 9.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/366026
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=d96e29d04429eb05f806337874a2f755c8c608a5
Submitter: Jenkins
Branch: master

commit d96e29d04429eb05f806337874a2f755c8c608a5
Author: tivaliy <email address hidden>
Date: Tue Sep 6 13:04:00 2016 +0300

    Align code for Extension Handler

    Change-Id: Ie9a47f8ba8879eea9afd8368c6ef195ef15f7c8d
    Closes-Bug: 1620463

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/367290

tags: added: customer-found
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/mitaka)

Reviewed: https://review.openstack.org/367290
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=ed765b959abf0eb435cd3831be7ce317b9022410
Submitter: Jenkins
Branch: stable/mitaka

commit ed765b959abf0eb435cd3831be7ce317b9022410
Author: tivaliy <email address hidden>
Date: Tue Sep 6 13:04:00 2016 +0300

    Align code for Extension Handler

    Change-Id: Ie9a47f8ba8879eea9afd8368c6ef195ef15f7c8d
    Closes-Bug: 1620463
    (cherry picked from commit d96e29d04429eb05f806337874a2f755c8c608a5)

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.1 snapshot #281.

tags: removed: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-web 10.0.0rc1

This issue was fixed in the openstack/fuel-web 10.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-web 10.0.0

This issue was fixed in the openstack/fuel-web 10.0.0 release.

Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :

Verified on Newton #1556 iso.

[root@nailgun ~]# curl -s -H "X-Auth-Token: 60d0e6062dad43078cd8bfa3f9d68751" http://10.109.0.2:8000/api/v1/extensions
[{"version": "1.0.0", "name": "network_manager", "provides": [], "description": "Network Manager"}, {"version": "1.0.0", "name": "volume_manager", "provides": ["get_node_volumes", "set_node_volumes", "set_default_node_volumes"], "description": "Volume Manager Extension"}][root@nailgun ~]#

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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