host_passes_filters KeyError: 'volume_id'

Bug #1493580 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Eric Harney

Bug Description

I hit this error in the scheduler while passing (likely invalid) data to volume manage.

scheduler:
2015-09-08 18:27:13.694 ERROR cinder.scheduler.manager [req-c413b1f3-8b03-4712-93ff-ef8bf1b9dfcd c26e0190f4264fcb94f74f0b9a54d92b 00fe664e5bee47c7a839eff9dfbbf854] Failed to schedule_manage_existing: 'volume_id'
2015-09-08 18:27:13.696 ERROR oslo_messaging.rpc.dispatcher [req-c413b1f3-8b03-4712-93ff-ef8bf1b9dfcd c26e0190f4264fcb94f74f0b9a54d92b 00fe664e5bee47c7a839eff9dfbbf854] Exception during message handling: 'volume_id'
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/scheduler/manager.py", line 253, in manage_existing
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher _manage_existing_set_error(self, context, ex, request_spec)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 119, in __exit__
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/scheduler/manager.py", line 248, in manage_existing
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher filter_properties)
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/scheduler/filter_scheduler.py", line 116, in host_passes_filters
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher {'id': request_spec['volume_id'],
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher KeyError: 'volume_id'
2015-09-08 18:27:13.696 TRACE oslo_messaging.rpc.dispatcher

api:
2015-09-08 18:27:13.589 DEBUG cinder.volume.api [req-c413b1f3-8b03-4712-93ff-ef8bf1b9dfcd c26e0190f4264fcb94f74f0b9a54d92b 00fe664e5bee47c7a839eff9dfbbf854] Task 'cinder.volume.flows.api.manage_existing.EntryCreateTask;volume:manage_existing' (576ee4ec-92a4-48a4-9f98-38ac5acb1b9c) transitioned into state 'SUCCESS' from state 'RUNNING' with result '{'volume': <cinder.db.sqlalchemy.models.Volume object at 0x7f6fb53b3290>, 'volume_properties': {'status': 'creating', 'volume_type_id': None, 'availability_zone': u'nova', 'host': u'devstacktest@lvmdriver-1', 'display_name': None, 'id': '493eb5c0-8e03-4599-b356-28cf4cba6203', 'size': 0, 'user_id': u'c26e0190f4264fcb94f74f0b9a54d92b', 'bootable': False, 'attach_status': 'detached', 'display_description': None, 'volume_metadata': [], 'volume_admin_metadata': [], 'project_id': u'00fe664e5bee47c7a839eff9dfbbf854', 'metadata': None}}' from (pid=19540) _task_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:178

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

Fix proposed to branch: master
Review: https://review.openstack.org/221537

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

Reviewed: https://review.openstack.org/221537
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=364e8cb92b0584de84a99bb9e5a664d3d94657da
Submitter: Jenkins
Branch: master

commit 364e8cb92b0584de84a99bb9e5a664d3d94657da
Author: Eric Harney <email address hidden>
Date: Tue Sep 8 18:40:53 2015 -0400

    Filter scheduler: Fix KeyError on invalid create request

    An invalid request can generate a KeyError here rather
    than the intended failure message.

    Closes-Bug: #1493580

    Change-Id: Ia73d8c2834e564ee14d72303001e11be2ea14900

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.0
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.