Internal Server Error when attempring to use an incorrect URL within the metadata API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Anton Kurbatov |
Bug Description
When trying to GET a non-existent metadata key within the VM, like '/latest/
Inside a VM:
$ curl http://
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
An unknown error has occurred. Please try your request again.<br /><br />
</body>
</html>$
The nova metadata service logs:
CRITICAL nova [None req-3286f047-
ERROR nova Traceback (most recent call last):
ERROR nova File "/usr/local/
ERROR nova return app(environ, start_response)
ERROR nova File "/usr/local/
ERROR nova resp = self.call_func(req, *args, **kw)
ERROR nova File "/usr/local/
ERROR nova return self.func(req, *args, **kwargs)
ERROR nova File "/usr/local/
ERROR nova response = req.get_
ERROR nova File "/usr/local/
ERROR nova status, headers, app_iter = self.call_
ERROR nova File "/usr/local/
ERROR nova app_iter = application(
ERROR nova File "/usr/local/
ERROR nova resp = self.call_func(req, *args, **kw)
ERROR nova File "/usr/local/
ERROR nova return self.func(req, *args, **kwargs)
ERROR nova File "/usr/local/
ERROR nova response = req.get_
ERROR nova File "/usr/local/
ERROR nova status, headers, app_iter = self.call_
ERROR nova File "/usr/local/
ERROR nova app_iter = application(
ERROR nova File "/usr/local/
ERROR nova resp = self.call_func(req, *args, **kw)
ERROR nova File "/usr/local/
ERROR nova return self.func(req, *args, **kwargs)
ERROR nova File "/opt/stack/
ERROR nova data = meta_data.
ERROR nova File "/opt/stack/
ERROR nova data = self.get_
ERROR nova File "/opt/stack/
ERROR nova return find_path_
ERROR nova File "/opt/stack/
ERROR nova data = data[path_
ERROR nova TypeError: string indices must be integers
ERROR nova
[pid: 156048|app: 0|req: 5/9] 10.136.16.184 () {40 vars in 687 bytes} [Tue Mar 26 04:37:44 2024] GET /latest/
Changed in nova: | |
assignee: | nobody → Anton Kurbatov (akurbatov) |
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /914249
Review: https:/