HTTP 500 while retrieving metadata by non-existent key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Unassigned | ||
neutron |
Fix Released
|
Medium
|
Armando Migliaccio |
Bug Description
HTTP 500 error occurs when one tries to get metadata by path constructed from folder name with appended value.
Steps to repro:
1. Launch VM and access its terminal
2. curl http://
3. curl http://
It's expected that the last call returns meaningful message and not produce trace backs in logs.
Errors:
----------
In VM terminal:
$ curl http://
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
Remote metadata server experienced an internal server error.<br /><br />
</body>
</html>$
In Neutron metadata agent:
2014-09-18 14:44:37.563 ERROR neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.563 TRACE neutron.
2014-09-18 14:44:37.566 INFO eventlet.
In Nova API service:
2014-09-18 14:31:19.030 ERROR nova.api.ec2 [req-5c84e0ae-
2014-09-18 14:31:19.030 TRACE nova.api.ec2 Traceback (most recent call last):
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 return req.get_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 application, catch_exc_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 app_iter = application(
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 rv = req.get_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 application, catch_exc_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 app_iter = application(
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/usr/lib/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 data = meta_data.
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 data = self.get_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 return find_path_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 File "/opt/stack/
2014-09-18 14:31:19.030 TRACE nova.api.ec2 data = data[path_
2014-09-18 14:31:19.030 TRACE nova.api.ec2 TypeError: string indices must be integers, not unicode
2014-09-18 14:31:19.030 TRACE nova.api.ec2
2014-09-18 14:31:19.032 INFO nova.metadata.
Changed in neutron: | |
importance: | High → Medium |
Changed in neutron: | |
milestone: | none → juno-rc1 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | juno-rc1 → 2014.2 |
Changed in nova: | |
status: | Incomplete → Fix Released |
So I agree that n-api should not stack trace... however it successfully returns a 400 to the service, which I think was expected. Neutron is exploding on that 400 though, which is not.