Bug 1588360
| Summary: | Barbican - Unable to delete encryption key for volume | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | bkopilov <bkopilov> | ||||
| Component: | openstack-cinder | Assignee: | Cinder Bugs List <cinder-bugs> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Avi Avraham <aavraham> | ||||
| Severity: | unspecified | Docs Contact: | Kim Nylander <knylande> | ||||
| Priority: | urgent | ||||||
| Version: | 13.0 (Queens) | CC: | aavraham, abishop, cschwede, srevivo, tshefi | ||||
| Target Milestone: | --- | Keywords: | Triaged | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-06-20 13:34:25 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
bkopilov
2018-06-07 07:05:11 UTC
Created attachment 1448623 [details]
cinder.api.logs
Adding version info from system openstack-cinder-12.0.1-0.20180418194613.c476898.el7ost.noarch openstack-barbican-common-6.0.1-0.20180421143301.b10e100.el7ost.noarch openstack-barbican-api-6.0.1-0.20180421143301.b10e100.el7ost.noarch openstack-tripleo-common-8.6.1-18.el7ost.noarch openstack-tripleo-ui-8.3.1-2.el7ost.noarch python-tripleoclient-9.2.1-12.el7ost.noarch puppet-tripleo-8.3.2-6.el7ost.noarch openstack-tripleo-common-containers-8.6.1-18.el7ost.noarch openstack-tripleo-heat-templates-8.0.2-29.el7ost.noarch openstack-tripleo-puppet-elements-8.0.0-2.el7ost.noarch ansible-tripleo-ipsec-8.1.1-0.20180308133440.8f5369a.el7ost.noarch openstack-tripleo-validations-8.4.1-5.el7ost.noarch openstack-tripleo-image-elements-8.0.1-1.el7ost.noarch I did some experimenting, confirmed my understanding of what's happening, and
determined the steps necessary for the admin user to delete the volumes.
Tempest is creating new projects (tenants) for these tests, and the issue is
the admin user is not automatically granted the admin role in the tempest
projects. When cinder tries to delete the barbican secret, barbican checks
whether the secret is owned by that user, or if the user is has the admin role
*in that project*.
It's this last part that fails: the admin (user) is not an admin (the role)
in the tempest project. You see the role assignments using this command:
openstack role assignment list --names
Fortunately, the admin user has the ability to grant themself the admin role
in any project.
openstack role add --project <project> --user admin admin
Now they should be able to delete the volume. But first, the volume state
will need to be reset if its status is error_deleting.
So, using the data in the BZ description, this should work:
openstack role add \
--project tempest-TestEncryptedCinderVolumes-549998142 --user admin admin
openstack volume set --state=available \
tempest-TestEncryptedCinderVolumes-volume-1807924162
openstack volume delete tempest-TestEncryptedCinderVolumes-volume-1807924162
Whoops, sorry, one more thing. For the delete to work, the command must specify the tempest project.
OS_PROJECT_NAME=tempest-TestEncryptedCinderVolumes-549998142 \
OS_TENANT_NAME=tempest-TestEncryptedCinderVolumes-549998142 \
openstack volume delete tempest-TestEncryptedCinderVolumes-volume-1807924162
Benny, we just discussed this in our bugscrub meeting and agreed to close this. Please feel free to re-open if this is still an issue. Thanks! |