delete secret fails with http 400
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
High
|
Juan Antonio Osorio Robles |
Bug Description
Running a smoke test, test_deleting_
Stack from server:
2014-10-03 16:51:07.364 96079 ERROR barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
2014-10-03 16:51:07.364 96079 TRACE barbican.
This test creates a secret, then deletes it.
The secret create request being passed in contains only name and expiration date, and both are None. This returns 201 as expected. There is no entry in the SECRET_
id=<the id>
created_
updated_at = <today date>
deleted = 0
status=ACTIVE
all other fields in the row are null.
The delete comes in and tries to find a plugin to handle the delete. plugin/resources.py method _get_secret_meta gets the secret model (which matches the record in the DB) and tries to find a record in the secret_meta_repo matching the ID of the secret. It can't so it returns an empty dict for the metadata.
That empty metadata is returned to delete_secret which tries to get the data using key 'plugin_name' and it comes back emtpy so no plugin can be found and we get the error.
Changed in barbican: | |
importance: | Undecided → High |
status: | New → Confirmed |
milestone: | none → kilo-1 |
Changed in barbican: | |
milestone: | kilo-1 → none |
Changed in barbican: | |
assignee: | John Wood (john-wood-w) → nobody |
Changed in barbican: | |
assignee: | nobody → Juan Antonio Osorio Robles (juan-osorio-robles) |
tags: | added: verified |
Changed in barbican: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in barbican: | |
milestone: | kilo-1 → 2015.1.0 |
This is a simple fix, will put up a CR next week (after Juno RC1).