When create health_policy_event policy error

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

Bug Description

Policy file:

# Sample health policy based on VM lifecycle events
type: senlin.policy.health
version: 1.0
description: A policy for maintaining node health from a cluster.
properties:
  detection:
    # Type for health checking, valid values include:
    # NODE_STATUS_POLLING, LB_STATUS_POLLING, LIFECYCLE_EVENTS
    type: LIFECYCLE_EVENTS

  recovery:
    # List of actions that can be retried on a failed node
    actions:
      - name: RECREATE

The error log:
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server [req-25f499da-400d-4404-a649-791d5f49f11c 0ed165520f9b443ca9040e4e1f44d7f0 631b9209a992429fb70909d810a4d3b9 - default default] Exception during message handling: TypeError: 'NoneType' object has no attribute '__getitem__'
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 220, in dispatch
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 190, in _do_dispatch
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 153, in wrapper
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/senlin/engine/service.py", line 71, in wrapped
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server return func(self, ctx, req_obj)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/senlin/engine/service.py", line 588, in policy_create
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server validate_props=True)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/senlin/engine/service.py", line 559, in _validate_policy
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server policy = plugin(name, spec, **kwargs)
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/senlin/policies/health_policy.py", line 151, in __init__
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server self.interval = options[self.DETECTION_INTERVAL]
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server TypeError: 'NoneType' object has no attribute '__getitem__'
2017-11-06 02:40:38.755 4003 ERROR oslo_messaging.rpc.server

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

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

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

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

commit f9bbe908eb488f686ad1c6b892d3a168153cd019
Author: ruijie <email address hidden>
Date: Mon Nov 6 17:35:20 2017 +0800

    revise the example health policy template files

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

    Change-Id: I53226ad56c920eaa02b472f1f1438eb7705dd236
    Closes-bug: #1730296

Changed in senlin:
status: In Progress → 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.