ValueError on invalid snapshot-list filters

Bug #1816824 reported by Eric Harney on 2019-02-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Undecided
Unassigned

Bug Description

$ cinder --debug snapshot-list --filters metadata={k1=v1}

DEBUG:keystoneauth.session:REQ: curl -g -i -X GET http://10.13.57.164/identity -H "Accept: application/json" -H "User-Agent: cinder keystoneauth1/3.11.2 python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-957.el7.x86_64 CPython/2.7.5"
DEBUG:keystoneauth.session:RESP: [300] connection: close content-length: 271 content-type: application/json date: Wed, 20 Feb 2019 17:13:12 GMT location: http://10.13.57.164/identity/v3/ server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5 vary: X-Auth-Token x-openstack-request-id: req-cbc0ea85-1e98-4b34-b11c-80039a00d349
DEBUG:keystoneauth.session:RESP BODY: {"versions": {"values": [{"status": "stable", "updated": "2018-10-15T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.11", "links": [{"href": "http://10.13.57.164/identity/v3/", "rel": "self"}]}]}}
DEBUG:keystoneauth.session:GET call to http://10.13.57.164/identity used request id req-cbc0ea85-1e98-4b34-b11c-80039a00d349
DEBUG:keystoneauth.identity.v3.base:Making authentication request to http://10.13.57.164/identity/v3/auth/tokens
DEBUG:keystoneauth.identity.v3.base:{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "ba78be2787814412930c09e9f78cb7eb", "name": "anotherrole"}, {"id": "4253f86f6847455e89e28c476392336a", "name": "member"}, {"id": "3dc559b33726439c9779da7483878634", "name": "reader"}], "expires_at": "2019-02-20T18:13:12.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "1de558d79c114461af956b6215893960", "name": "demo"}, "catalog": [{"endpoints": [{"url": "http://10.13.57.164/volume/v3/1de558d79c114461af956b6215893960", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "df001452c38949f4b5970fd276b38151"}], "type": "volumev3", "id": "104de0bb39104adb94377dc62ef59d7d", "name": "cinderv3"}, {"endpoints": [{"url": "http://10.13.57.164/identity", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d0a4b6f9e28343b69bc38b9f674828dc"}, {"url": "http://10.13.57.164/identity", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "eefbcd2125e24c3fb77ca5ac6e6dbb4b"}], "type": "identity", "id": "20cce7c1b1994704a384962762576d0d", "name": "keystone"}, {"endpoints": [{"url": "http://10.13.57.164/volume/v2/1de558d79c114461af956b6215893960", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "09ab52501e314d31ac783f6995f271aa"}], "type": "volumev2", "id": "28c967fbb17c425db6d720064272f708", "name": "cinderv2"}, {"endpoints": [{"url": "http://10.13.57.164/volume/v1/1de558d79c114461af956b6215893960", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "0637622f92aa4627b9baa799e14d488e"}], "type": "volume", "id": "312a994886e74f99afa2195b03c30c01", "name": "cinder"}, {"endpoints": [{"url": "http://10.13.57.164/placement", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "6d280f4c4663472eb1c481c00620af00"}], "type": "placement", "id": "7f3e9eb9acba45439c5804d89ecc60c1", "name": "placement"}, {"endpoints": [{"url": "http://10.13.57.164/compute/v2/1de558d79c114461af956b6215893960", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9250d8d26f084f5f903979443db794c7"}], "type": "compute_legacy", "id": "83b23150e7554fe3bccb172223be58c5", "name": "nova_legacy"}, {"endpoints": [{"url": "http://10.13.57.164/image", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "24d800c07e8041d883027ff6898e9592"}], "type": "image", "id": "8a2ea123a9a6455bb76fd1504c845599", "name": "glance"}, {"endpoints": [{"url": "http://10.13.57.164/compute/v2.1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "96fd649e1ba547db974707a8c5d58257"}], "type": "compute", "id": "c57b9c671bfb4a06879f56f189577f06", "name": "nova"}, {"endpoints": [{"url": "http://10.13.57.164/volume/v3/1de558d79c114461af956b6215893960", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "68e0a5f77aa546db9c35837612a3d006"}], "type": "block-storage", "id": "eb67ce581b66405293d1b21d022d0be1", "name": "cinder"}, {"endpoints": [{"url": "http://10.13.57.164:9696/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "484664d4e07a47e5ba4757d8e2878fa6"}], "type": "network", "id": "f226befd959d4235951258c183ba7309", "name": "neutron"}], "user": {"domain": {"id": "default", "name": "Default"}, "password_expires_at": null, "name": "demo", "id": "37299c6e9d8d4b88b6f8e9976ac3f39c"}, "audit_ids": ["igDpZ7LOS8u-JyiJAJi-lQ"], "issued_at": "2019-02-20T17:13:12.000000Z"}}
DEBUG (shell:911) need more than 1 value to unpack
Traceback (most recent call last):
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 906, in main
    for item in sys.argv[1:]])
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 726, in main
    args.func(self.cs, args)
  File "/opt/stack/python-cinderclient/cinderclient/v3/shell.py", line 2051, in do_snapshot_list
    search_opts.update(shell_utils.extract_filters(args.filters))
  File "/opt/stack/python-cinderclient/cinderclient/shell_utils.py", line 157, in extract_filters
    value = _build_internal_dict(value[1:-1])
  File "/opt/stack/python-cinderclient/cinderclient/shell_utils.py", line 168, in _build_internal_dict
    k, v = pair.split(':', 1)
ValueError: need more than 1 value to unpack
DEBUG:cinderclient.shell:need more than 1 value to unpack
Traceback (most recent call last):
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 906, in main
    for item in sys.argv[1:]])
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 726, in main
    args.func(self.cs, args)
  File "/opt/stack/python-cinderclient/cinderclient/v3/shell.py", line 2051, in do_snapshot_list
    search_opts.update(shell_utils.extract_filters(args.filters))
  File "/opt/stack/python-cinderclient/cinderclient/shell_utils.py", line 157, in extract_filters
    value = _build_internal_dict(value[1:-1])
  File "/opt/stack/python-cinderclient/cinderclient/shell_utils.py", line 168, in _build_internal_dict
    k, v = pair.split(':', 1)
ValueError: need more than 1 value to unpack
ERROR: need more than 1 value to unpack

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers