Deleted keypair causes metadata failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Mitaka |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
Description
===========
If a user deletes a keypair that was used to create an instance, that instance receives HTTP 400 errors when attempting to get metadata via http://
This causes problems in the instance when cloud-init fails to retrieve the OpenStack datasource.
Steps to reproduce
==================
1. Create instance with SSH keypair defined.
2. Delete SSH keypair
3. Attempt 'curl http://
Expected result
===============
Instance receives metadata from http://
Actual result
=============
Instance receives HTTP 400 error. Additionally, Ubuntu Cloud Image instances will fail back to the ec2 datasource and re-generate Host SSH keys.
Environment
===========
Nova: 2015.1.4.2
Hypervisor: Libvirt + KVM
Storage: Ceph
Network: Liberty Neutron ML2+OVS
Logs
====
[req-a8385839-
Traceback (most recent call last):
File "/opt/cat/
return req.get_
File "/opt/cat/
application, catch_exc_
File "/opt/cat/
app_iter = application(
File "/opt/cat/
resp = self.call_func(req, *args, **self.kwargs)
File "/opt/cat/
return self.func(req, *args, **kwargs)
File "/opt/cat/
rv = req.get_
File "/opt/cat/
application, catch_exc_
File "/opt/cat/
app_iter = application(
File "/opt/cat/
resp = self.call_func(req, *args, **self.kwargs)
File "/opt/cat/
return self.func(req, *args, **kwargs)
File "/opt/cat/
data = meta_data.
File "/opt/cat/
data = self.get_
File "/opt/cat/
return self._route_
File "/opt/cat/
return path_handler(
File "/opt/cat/
self.
File "/opt/cat/
result = fn(cls, context, *args, **kwargs)
File "/opt/cat/
db_keypair = db.key_
File "/opt/cat/
return IMPL.key_
File "/opt/cat/
return f(*args, **kwargs)
File "/opt/cat/
raise exception.
KeypairNotFound: Keypair keypair_name not found for user fffffffffffffff
You're using an end of life branch for Nova (kilo). Can you try to recreate this against at least mitaka, but preferably master and see if it's still an issue?