"cinder list --all-tenant 1 --metadata" does not show any volumes

Bug #1883490 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rajat Dhasmana

Bug Description

$ cinder list --all-tenants 1 --metadata key_X=value_X
 +----+-----------+--------+------+------+-------------+----------+-------------+
 | ID | Tenant ID | Status | Name | Size | Volume Type | Bootable | Attached to |
 +----+-----------+--------+------+------+-------------+----------+-------------+
 +----+-----------+--------+------+------+-------------+----------+-------------+

 A volume which has key_X=value_X was exist in the environment.

 $ cinder show d502e522-b82a-4e92-acbf-91cd9847afca
 +--------------------------------+--------------------------------------+
 | Property | Value |
 +--------------------------------+--------------------------------------+
 | attached_servers | [] |
 | attachment_ids | [] |
 | availability_zone | nova |
 | bootable | false |
 | consistencygroup_id | None |
 | created_at | 2020-06-04T06:11:03.000000 |
 | description | None |
 | encrypted | False |
 | id | d502e522-b82a-4e92-acbf-91cd9847afca |
 | metadata | key_X : value_X | <---
 | migration_status | None |
 | multiattach | False |
 | name | volume_X |
 | os-vol-host-attr:host | some_host |
 | os-vol-mig-status-attr:migstat | None |
 | os-vol-mig-status-attr:name_id | None |
 | os-vol-tenant-attr:tenant_id | a615ce56ec7c44f89d2da2e1aeefe1b3 |
 | replication_status | None |
 | size | 1 |
 | snapshot_id | None |
 | source_volid | None |
 | status | available |
 | updated_at | 2020-06-04T06:11:04.000000 |
 | user_id | 86cc4defd774471690e9dca381a33741 |
 | volume_type | tripleo |
 +--------------------------------+--------------------------------------+

description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/735513

Changed in cinder:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/735513
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=aed94a76cf62fdaedff793c7a9d998920b56c072
Submitter: Zuul
Branch: master

commit aed94a76cf62fdaedff793c7a9d998920b56c072
Author: Rajat Dhasmana <email address hidden>
Date: Mon Jun 15 07:10:05 2020 +0000

    Fix: listing volumes with filters

    This patch includes 2 fix for the following issues:

    1) ast.literal_eval() doesn't work with int and float values
    See comment inline

    2) Do not traverse and modify the same dict:
    while traversing filters dict, we're modifying it inside the loop
    which distorts the order of elements (adding modified elements in the
    end). to fix this, i've used a temp dict that will be used to traverse
    and modification will be done in the filters dict.

    Closes-Bug: #1883490

    Change-Id: I18b4b0b1b71904b766f7b89df49f5539e3c7662a

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/759056

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 16.2.1

This issue was fixed in the openstack/cinder 16.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 15.5.0

This issue was fixed in the openstack/cinder 15.5.0 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.