openstack volume attachment list --volume-id returns attachments from other volumes

Bug #2133168 reported by Marc Vorwerk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

The command
`openstack volume attachment list --volume-id <VOLUME-ID>`
returns attachments that does not belong to the requested volume.
The client appears to ignore the --volume-id filter entirely.

Example:

❯ openstack volume attachment list
+--------------------------------------+--------------------------------------+--------------------------------------+----------+
| ID | Volume ID | Server ID | Status |
+--------------------------------------+--------------------------------------+--------------------------------------+----------+
| aeecd115-d391-4b93-be34-94788a4b14d6 | b56ffc7c-a43d-455c-8d51-1bdf42fc3781 | 80db65cf-cc35-4f9d-9afe-a0ed735434d9 | attached |
| 815f0697-6633-4a2d-9e0f-c804ed3e29a7 | 2f48495e-7be7-41a8-8bca-ac8ac698f7b0 | 80db65cf-cc35-4f9d-9afe-a0ed735434d9 | attached |
+--------------------------------------+--------------------------------------+--------------------------------------+----------+

❯ openstack volume attachment list --volume-id b56ffc7c-a43d-455c-8d51-1bdf42fc3781
+--------------------------------------+--------------------------------------+--------------------------------------+----------+
| ID | Volume ID | Server ID | Status |
+--------------------------------------+--------------------------------------+--------------------------------------+----------+
| aeecd115-d391-4b93-be34-94788a4b14d6 | b56ffc7c-a43d-455c-8d51-1bdf42fc3781 | 80db65cf-cc35-4f9d-9afe-a0ed735434d9 | attached |
| 815f0697-6633-4a2d-9e0f-c804ed3e29a7 | 2f48495e-7be7-41a8-8bca-ac8ac698f7b0 | 80db65cf-cc35-4f9d-9afe-a0ed735434d9 | attached |
+--------------------------------------+--------------------------------------+--------------------------------------+----------+

I debugged the issue a little bit and it appears that the CLI always performs a single unfiltered request to:
GET /v3/<PROJECT-ID>/attachments,
without passing any volume_id filter and without applying client-side filtering.

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.