barbican's secret_ref created by nova misses barbican version

Bug #1599385 reported by Jeremy Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

I created a volume in cinder which was encryped with barbican.
Then I tried to attach this volume to a vm using command "nova volume-attach vm2 15d7b84a-9f08-4aac-9fcf-495ede08593c /dev/vdc", it failed.
After debugging, I found the secret_ref created in nova was wrong.
The secret_ref returned here https://github.com/openstack/nova/blob/stable/mitaka/nova/keymgr/barbican.py#L308 was "http://controller:9311/secrets/00000000-0000-0000-0000-000000000000".
In fact, it should contain barbican version number "v1", which means the secret_ref should be "http://controller:9311/v1/secrets/00000000-0000-0000-0000-000000000000".
My dev env is "stable/mitaka".
Any further information will be attached if needed.

nova-compute logs is as follows:
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "nova/keymgr/barbican.py", line 284, in _get_secret_data
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/secrets.py", line 192, in payload
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/secrets.py", line 260, in _fetch_payload
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/secrets.py", line 181, in payload_content_type
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/secrets.py", line 34, in wrapper
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/secrets.py", line 416, in _fill_lazy_properties
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/client.py", line 72, in get
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 176, in get
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher return self.request(url, 'GET', **kwargs)
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/client.py", line 65, in request
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher File "barbicanclient/client.py", line 109, in _check_status_code
2016-07-05 23:37:37.255 28451 ERROR oslo_messaging.rpc.dispatcher HTTPClientError: Not Found

Jeremy Liu (liujiong)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/338077

Jeremy Liu (liujiong)
Changed in nova:
assignee: nobody → Jiong Liu (liujiong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/mitaka)

Change abandoned by Jiong Liu (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/338077

Revision history for this message
Jeremy Liu (liujiong) wrote :

sorry, it's not a bug. some options in "barbican" section are not configured in nova.conf, like "endpoint_template". abandoned.

Jeremy Liu (liujiong)
Changed in nova:
assignee: Jiong Liu (liujiong) → nobody
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.