connection_info returned from attachments API is blank

Bug #1734999 reported by Jay Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
High
Unassigned

Bug Description

When looking at the v3 attachment information for a volume that is attached the connection_info comes back null:

curl -g -i -X GET http://10.10.0.10/volume/v3/5a355bacda5f4efc92d770849a6c232f/attachments/0255b978-7e03-4256-bed2-b631ff23bd82 -H "OpenStack-API-Version: volume 3.44" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: <TOKEN>"
HTTP/1.1 200 OK
Date: Tue, 28 Nov 2017 03:02:56 GMT
Server: Apache/2.4.18 (Ubuntu)
x-compute-request-id: req-81e9b76a-ec5c-492e-af9b-5036e219f453
Content-Type: application/json
Content-Length: 299
OpenStack-API-Version: volume 3.44
Vary: OpenStack-API-Version
x-openstack-request-id: req-81e9b76a-ec5c-492e-af9b-5036e219f453
Connection: close

{"attachment": {"status": "attached", "detached_at": "", "connection_info": null, "attached_at": "2017-11-28T02:30:55.000000", "attach_mode": "rw", "instance": "6a0ff0b8-08b7-4510-9c13-8a103acc24b2", "volume_id": "6d015fd8-86da-4412-9d06-003ef959c8d5", "id": "0255b978-7e03-4256-bed2-b631ff23bd82"}}

Seems like this should be populated when making the request.

Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → High
Revision history for this message
John Griffith (john-griffith) wrote :

Looks like maybe you didn't use the new Cinder API's to create your attachment?

If you use the new Cinder API's, then do a get on the attachment ID:

curl -g -i -X GET http://10.117.36.28/volume/v3/0721bcfa559e458c87ec35d97a6800a9/attachments/7efd5656-dc84-4996-ae7f-323142986a85 -H "OpenStack-API-Version: volume 3.44" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}e1c8c0af3c2badad5938a0959f087ea98ed0028f"
DEBUG:keystoneauth:RESP: [200] Date: Tue, 28 Nov 2017 22:40:00 GMT Server: Apache/2.4.18 (Ubuntu) x-compute-request-id: req-df950ca1-53ea-4987-b294-7c41287a4237 Content-Type: application/json Content-Length: 767 OpenStack-API-Version: volume 3.44 Vary: OpenStack-API-Version x-openstack-request-id: req-df950ca1-53ea-4987-b294-7c41287a4237 Connection: close
RESP BODY: {"attachment": {"status": "attached", "detached_at": "", "connection_info": {"auth_password": "Aa8WDrNaZAYBN8sa", "attachment_id": "7efd5656-dc84-4996-ae7f-323142986a85", "target_discovered": false, "encrypted": false, "driver_volume_type": "iscsi", "qos_specs": null, "target_iqn": "iqn.2010-10.org.openstack:volume-b822fb57-b820-47ae-b97f-0c85ea7bcfa5", "target_portal": "10.117.36.28:3260", "volume_id": "b822fb57-b820-47ae-b97f-0c85ea7bcfa5", "target_lun": 1, "access_mode": "rw", "auth_username": "C4W5WBxj3WgxvCaKMEvR", "auth_method": "CHAP"}, "attached_at": "2017-11-28T22:38:55.000000", "attach_mode": "rw", "instance": "2d509dbc-8b62-49a9-b5fe-ad5d9c169bdd", "volume_id": "b822fb57-b820-47ae-b97f-0c85ea7bcfa5", "id": "7efd5656-dc84-4996-ae7f-323142986a85"}}

Changed in cinder:
status: New → Invalid
Revision history for this message
Jay Bryant (jsbryant) wrote :

John,

Thank you for the investigation and update. You are correct that I was using the old attachment code to get the results above. Thank you for clarifying that that is what will happen when using the old API's.

My co-workers have verified that they are getting the connection_info when using the new API's there was just some misunderstanding on the content. So, I think we are all good now. Thanks!

Jay

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.