Nova Metadata server in Mitaka can not work with Liberty config

Bug #1545101 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Sean Dague

Bug Description

http://logs.openstack.org/59/265759/24/experimental/gate-grenade-dsvm-neutron-multinode/8f1deec/logs/new/screen-n-api.txt.gz?level=INFO#_2016-02-12_16_28_16_860

2016-02-12 16:28:16.860 20168 INFO nova.metadata.wsgi.server [-] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 470, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/paste/urlmap.py", line 216, in __call__
    return app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/new/nova/nova/api/ec2/__init__.py", line 32, in __call__
    return webob.exc.HTTPException(message=_DEPRECATION_MESSAGE)
TypeError: __init__() takes exactly 3 arguments (2 given)

This only shows up in the gate-grenade-dsvm-neutron-multinode job which is not running the n-api-meta service but is running the neutron metadata service, which has a bunch of warnings because it's not getting valid responses back from the nova metadata API (b/c it's not running):

http://logs.openstack.org/59/265759/24/experimental/gate-grenade-dsvm-neutron-multinode/8f1deec/logs/new/screen-q-meta.txt.gz?level=TRACE

Tags: api ec2
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
status: New → Confirmed
Matt Riedemann (mriedem)
Changed in nova:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Confirmed → In Progress
Matt Riedemann (mriedem)
tags: added: api ec2
Revision history for this message
Sean M. Collins (scollins) wrote : Re: "TypeError: __init__() takes exactly 3 arguments (2 given)" in n-api logs for nova metadata api request

+Neutron and myself since it's the grenade multinode job that is being hit

Changed in neutron:
status: New → In Progress
assignee: nobody → Sean M. Collins (scollins)
Revision history for this message
Sean Dague (sdague) wrote :

There is still a 404 on getting the metadata after this patch, there is a logging change out here - https://review.openstack.org/#/c/282025/ for nova to try to expose what's going on, as in reading the code, there are a number of things that might be passed that would make this fail.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Results from run [1] still didn't yield any result. So that's my analysis: the api-paste file is not upgraded and that still contains an ec2 middleware (ec2faultwrap). This is the one that responds with 404, inline with what patch [3] does. That's the reason why we don't see the trace from Sean's patch [4]. I think the bug lies in grenade: if we get rid of ec2faultwrap we should get past the 404 error.

[1] http://logs.openstack.org/00/281600/4/experimental/gate-grenade-dsvm-neutron-multinode/28b0630//logs/new/
[2] http://logs.openstack.org/00/281600/4/experimental/gate-grenade-dsvm-neutron-multinode/28b0630//logs/etc/nova/api-paste.ini.txt.gz
[3] https://review.openstack.org/#/c/279721/3/nova/api/ec2/__init__.py
[4] https://review.openstack.org/#/c/282025/

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I'll try to post a patch in grenade to corroborate my claim

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Changed in grenade:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
Revision history for this message
Sean Dague (sdague) wrote :

Interesting. If that's the case, then I think the thing we have to do is create a stub ec2faultwrap middleware which prints out a warning that this needs to be removed. I can dig into it in the morning. We've hit this kind of issue in the past in adjusting middleware drops.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Changed in neutron:
status: In Progress → Invalid
Changed in grenade:
status: New → Confirmed
Changed in neutron:
assignee: Sean M. Collins (scollins) → nobody
no longer affects: neutron
Changed in grenade:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/282161

Changed in nova:
assignee: Matt Riedemann (mriedem) → Sean Dague (sdague)
Sean Dague (sdague)
Changed in nova:
importance: Medium → Critical
milestone: none → mitaka-3
summary: - "TypeError: __init__() takes exactly 3 arguments (2 given)" in n-api
- logs for nova metadata api request
+ Nova Metadata server in Mitaka can not work with Liberty config
Changed in nova:
assignee: Sean Dague (sdague) → Chris Dent (cdent)
Changed in nova:
assignee: Chris Dent (cdent) → Sean Dague (sdague)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on grenade (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/282110
Reason: No longer needed. Nova decided to keep the middleware for yet another cycle.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/282161
Reason: sorted by keeping the middleware for yet another cycle

no longer affects: grenade
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/279721
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f2c1cfae53e7d9efb36b1a1b3a8d6334d9ca688f
Submitter: Jenkins
Branch: master

commit f2c1cfae53e7d9efb36b1a1b3a8d6334d9ca688f
Author: Matt Riedemann <email address hidden>
Date: Fri Feb 12 10:46:13 2016 -0800

    Partial revert of ec2 removal patch

    In Id7936be290b6febd18deb4c2db8ea4d678d4d9b1 and
    I8bf7cbaa7015bb61656ab90ccc8f944aaeebb095 parts of the ec2
    infrastructure were removed that had been deprecated and warned about
    in Liberty.

    However, changes were made to the metadata server in these changes as
    well, none of which had been warned about, and arguably should not be
    removed ever. The metadata server is an AWS construct, and given the
    implementation order of APIs in Nova (ec2 was the first API) it shares
    code with the ec2 base classes. But it's the ec2 API we were
    deprecating out and deleting.

    Removing these breaks anyone upgrading using the metadata server, as
    was seen by the neutron multinode job.

    In addition, paste filters should *never* return a response code
    directly. Doing so means they block processing the rest of the
    pipeline. Which means that the deprecation approach that was used here
    actually forcably broke anyone with existing deploys.

    Change-Id: I22eb3a3fcd8e74a1d9085acde15c25a927ae12cb
    Closes-Bug: #1545101

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 13.0.0.0b3

This issue was fixed in the openstack/nova 13.0.0.0b3 development milestone.

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.