Unable to access both deleted and active records
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Rick Harris |
Bug Description
Per https:/
In cases of bad data we may have cases where something is deleted but a related object isn't. In order to perform the cleanup, we need an admin context that can see both objects.
To fix this, I'm proposing refactoring `context.
The valid values of `deleted_
Changed in nova: | |
assignee: | nobody → Rick Harris (rconradharris) |
status: | New → In Progress |
summary: |
- Context.read_deleted returns only deleted records + Unable to access both deleted and active records |
Changed in nova: | |
milestone: | none → essex-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-2 → 2012.1 |
I'm all for showing active and deleted records. i would prefer that rather than using an enum in deleted_visibility, that do this:
1) change context.read_delete to context. can_read_ deleted. This indicates that the authenticated user has access to deleted records. We should return either only active or active AND deleted records based on this attribute.
2) Support a boolean 'deleted' filter on our queries that allows users to narrow down results to only deleted or only active. This allows us to keep the behavior where an admin can see only deleted records. We also shouldn't filter on a specific value for deleted by default.