cinder attachment-list always shows empty Server ID

Bug #1860393 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Medium
Unassigned

Bug Description

In Queens, we observe that cinder attachment-list always shows empty server ID, while cinder api returns instance id correctly.

~~~
$ cinder --debug --os-volume-api-version 3.50 attachment-list
...
DEBUG:keystoneauth:RESP: [200] Date: Tue, 21 Jan 2020 00:14:27 GMT Server: Apache x-compute-request-id: req-7bbb807d-8ae6-4f53-a1fd-09aa9a5e2f34 OpenStack-API-Version: volume 3.50 Vary: OpenStack-API-Version,Accept-Encoding x-openstack-request-id: req-7bbb807d-8ae6-4f53-a1fd-09aa9a5e2f34 Content-Encoding: gzip Content-Length: 161 Content-Type: application/json
RESP BODY: {"attachments": [{"status": "attached", "instance": "8f1f617d-9f8f-492d-bf02-4929d37ed298", "id": "b0b71b46-3d38-48cd-85e0-d63c72d1a5ba", "volume_id": "4f51dd40-95ef-4a5d-ba02-27f9fff62a22"}]}

DEBUG:keystoneauth:GET call to volumev3 for http://10.0.0.1:8776/v3/470b11ac8f90471ebef6c7f550ce76b6/attachments used request id req-7bbb807d-8ae6-4f53-a1fd-09aa9a5e2f34
+--------------------------------------+--------------------------------------+----------+-----------+
| ID | Volume ID | Status | Server ID |
+--------------------------------------+--------------------------------------+----------+-----------+
| b0b71b46-3d38-48cd-85e0-d63c72d1a5ba | 4f51dd40-95ef-4a5d-ba02-27f9fff62a22 | attached | |
+--------------------------------------+--------------------------------------+----------+-----------+
~~~

We have the fix for this issue merged in master and included in stable/trains.
 https://review.opendev.org/#/c/658948/

Let's backport that fix to other stable branches so that we can get the basic attachment information by a single command.

description: updated
affects: cinder → python-cinderclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/703525

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/703526

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/703527

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (stable/stein)

Reviewed: https://review.opendev.org/703525
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=511224425804621550bf30403f7768eebe6f34ca
Submitter: Zuul
Branch: stable/stein

commit 511224425804621550bf30403f7768eebe6f34ca
Author: Minmin Ren <email address hidden>
Date: Tue May 14 02:42:30 2019 +0000

    Add missed 'Server ID' output in attachment-list

    'server_id' is not Attachment attribute, should be
    set by 'instance' attribute.

    v3/attachments respond body:

    {"attachments":
       [{"status": "attached",
         "instance": INSTANCE_UUID,
         "id": ATTACHMENT_UUID,
         "volume_id": VOLUME_UUID,
        },
        ...
        ]
    }

    Closes-Bug: #1860393
    Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a
    (cherry picked from commit 03f228c11e0d88dcc396b30b7544b5cfde894750)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (stable/rocky)

Reviewed: https://review.opendev.org/703526
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=14547dfb1b9aced82d5d333ab329870461034565
Submitter: Zuul
Branch: stable/rocky

commit 14547dfb1b9aced82d5d333ab329870461034565
Author: Minmin Ren <email address hidden>
Date: Tue May 14 02:42:30 2019 +0000

    Add missed 'Server ID' output in attachment-list

    'server_id' is not Attachment attribute, should be
    set by 'instance' attribute.

    v3/attachments respond body:

    {"attachments":
       [{"status": "attached",
         "instance": INSTANCE_UUID,
         "id": ATTACHMENT_UUID,
         "volume_id": VOLUME_UUID,
        },
        ...
        ]
    }

    Closes-Bug: #1860393
    Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a
    (cherry picked from commit 03f228c11e0d88dcc396b30b7544b5cfde894750)
    (cherry picked from commit 511224425804621550bf30403f7768eebe6f34ca)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (stable/queens)

Reviewed: https://review.opendev.org/703527
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=522e5a938bb478ec190e741a0d47eb16f8c4af00
Submitter: Zuul
Branch: stable/queens

commit 522e5a938bb478ec190e741a0d47eb16f8c4af00
Author: Minmin Ren <email address hidden>
Date: Tue May 14 02:42:30 2019 +0000

    Add missed 'Server ID' output in attachment-list

    'server_id' is not Attachment attribute, should be
    set by 'instance' attribute.

    v3/attachments respond body:

    {"attachments":
       [{"status": "attached",
         "instance": INSTANCE_UUID,
         "id": ATTACHMENT_UUID,
         "volume_id": VOLUME_UUID,
        },
        ...
        ]
    }

    Closes-Bug: #1860393
    Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a
    (cherry picked from commit 03f228c11e0d88dcc396b30b7544b5cfde894750)
    (cherry picked from commit 511224425804621550bf30403f7768eebe6f34ca)
    (cherry picked from commit 14547dfb1b9aced82d5d333ab329870461034565)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 4.0.3

This issue was fixed in the openstack/python-cinderclient 4.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 4.2.2

This issue was fixed in the openstack/python-cinderclient 4.2.2 release.

Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

Looks like we can close this already.

Changed in python-cinderclient:
status: New → Fix Released
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient queens-eol

This issue was fixed in the openstack/python-cinderclient queens-eol release.

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.