failed to create health_policy in listening model

Bug #1730332 reported by RUIJIE YUAN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
RUIJIE YUAN

Bug Description

Failed to create health policy with the spec-file 'example/policies/health_policy_event.yaml':

2017-11-06 17:04:27.183 ERROR oslo_messaging.rpc.server [req-b2ee649b-11bd-4f87-97f6-164d9d0892c3 admin admin] Exception during message handling: TypeError: 'NoneType' object has no attribute '__getitem__'
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 153, in wrapper
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server return f(*args, **kwargs)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/engine/service.py", line 71, in wrapped
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server return func(self, ctx, req_obj)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/engine/service.py", line 588, in policy_create
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server validate_props=True)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/engine/service.py", line 559, in _validate_policy
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server policy = plugin(name, spec, **kwargs)
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/policies/health_policy.py", line 151, in __init__
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server self.interval = options[self.DETECTION_INTERVAL]
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server TypeError: 'NoneType' object has no attribute '__getitem__'
2017-11-06 17:04:27.183 TRACE oslo_messaging.rpc.server

We have a default value for interval field, but the 'super' construct 'Map: options' is NoneObject.

RUIJIE YUAN (cnjie0616)
Changed in senlin:
assignee: nobody → RUIJIE YUAN (cnjie0616)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/517895
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=df69c9a020e5a6f443f2a03dcd962dd538631cb3
Submitter: Zuul
Branch: master

commit df69c9a020e5a6f443f2a03dcd962dd538631cb3
Author: ruijie <email address hidden>
Date: Mon Nov 6 17:25:53 2017 +0800

    failed to create health policy in listening model

    https://bugs.launchpad.net/senlin/+bug/1730296
    https://bugs.launchpad.net/senlin/+bug/1730332

    When using listening model, we may not set the options field which
    will be None by default. However we want to get the 'interval' field
    from option.

    Change-Id: I5882d3aa531993b330dc149b085be38aff0f36a8
    Closes-Bug: #1730332

Changed in senlin:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 5.0.0.0b2

This issue was fixed in the openstack/senlin 5.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 5.0.0.0b3

This issue was fixed in the openstack/senlin 5.0.0.0b3 development milestone.

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.