yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #96067
[Bug 2115251] [NEW] Nova doesn't clean up keypairs when a user is deleted
Public bug reported:
Description
===========
When a user creates a keypair and the user is deleted afterwards, the keypair stays in the system forever. It cannot be deleted on the cli afterwards because the lookup of the user fails:
```
openstack keypair delete test --user 188a5578dffe44feb326be902be5764c
No user with a name or ID of '188a5578dffe44feb326be902be5764c' exists.
```
Steps to reproduce
==================
- create a user
- create a keypair with the user
- delete the user
- check database
```
mysql> select * from nova_api.key_pairs where id = 384;
[... still shows my key ...]
```
- try to delete via cli:
```
openstack keypair delete test --user 188a5578dffe44feb326be902be5764c
No user with a name or ID of '188a5578dffe44feb326be902be5764c' exists.
```
Expected result
===============
I expect the keys to be removed along with the user. Or at least that I have the option to list/delete the keys after user removal.
Actual result
=============
The key stays in the system.
Environment
===========
This is a jammy/yoga cloud, running nova 3:25.2.1-0ubuntu2.7
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2115251
Title:
Nova doesn't clean up keypairs when a user is deleted
Status in OpenStack Compute (nova):
New
Bug description:
Description
===========
When a user creates a keypair and the user is deleted afterwards, the keypair stays in the system forever. It cannot be deleted on the cli afterwards because the lookup of the user fails:
```
openstack keypair delete test --user 188a5578dffe44feb326be902be5764c
No user with a name or ID of '188a5578dffe44feb326be902be5764c' exists.
```
Steps to reproduce
==================
- create a user
- create a keypair with the user
- delete the user
- check database
```
mysql> select * from nova_api.key_pairs where id = 384;
[... still shows my key ...]
```
- try to delete via cli:
```
openstack keypair delete test --user 188a5578dffe44feb326be902be5764c
No user with a name or ID of '188a5578dffe44feb326be902be5764c' exists.
```
Expected result
===============
I expect the keys to be removed along with the user. Or at least that I have the option to list/delete the keys after user removal.
Actual result
=============
The key stays in the system.
Environment
===========
This is a jammy/yoga cloud, running nova 3:25.2.1-0ubuntu2.7
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2115251/+subscriptions