stack create failed with AlarmActions in AWS::CloudWatch::Alarm

Bug #1461736 reported by hanwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned

Bug Description

My problem is similar as https://bugs.launchpad.net/heat/+bug/1380168.But that bug is solved in my environment.

Here is the relevant resource snippet of mine:

    "Instance_Alarm": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
         "AlarmDescription": "Restart the specific instance",
         "MetricName": "Heartbeat",
         "Namespace": "system/linux",
         "Statistic": "SampleCount",
         "Period": "300",
         "EvaluationPeriods": "1",
         "Threshold": "1",
         "ComparisonOperator": "LessThanThreshold",
         "AlarmActions": [ { "Ref": "Instance_RestartPolicy" } ]
       }
    }

 the resources of "Instance_RestartPolicy" is CREATE_COMPLETE. while I remove the "AlarmActions","Instance_Alarm" is OK. I got the message in my heat engine log:

2015-06-03 06:50:02.556 941 INFO heat.engine.resource [-] creating CeilometerAlarm "__alarm__" Stack "ha1-Test_Instance_1_killed-4s3ixmhy3z2b" [aac8695c-a3ae-4766-9284-fae12e7cea17]
2015-06-03 06:50:02.653 941 INFO heat.engine.resource [-] CREATE: CeilometerAlarm "__alarm__" Stack "ha1-Test_Instance_1_killed-4s3ixmhy3z2b" [aac8695c-a3ae-4766-9284-fae12e7cea17]
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource Traceback (most recent call last):
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 489, in _action_recorder
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource yield
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 559, in _do_action
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 296, in wrapper
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource step = next(subtask)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 530, in action_handler_task
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource handler_data = handler(*args)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/openstack/ceilometer/alarm.py", line 264, in handle_create
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource alarm = self.ceilometer().alarms.create(**props)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/v2/alarms.py", line 154, in create
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource return self._create(self._path(), new)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/common/base.py", line 62, in _create
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource body = self.api.post(url, json=body).json()
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 358, in post
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource return self.client_request("POST", url, **kwargs)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 345, in client_request
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource self, method, url, **kwargs)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 261, in client_request
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource method, self.concat_url(endpoint, url), **kwargs)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 201, in request
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource raise exceptions.from_response(resp, method, url)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource BadRequest: Unsupported action a0fe45477a2849de9ccdca3d0bcd7bc6 (HTTP 400) (Request-ID: req-4b309b62-efeb-4baa-a7ae-7aec66c19650)
2015-06-03 06:50:02.653 941 TRACE heat.engine.resource
2015-06-03 06:50:02.713 941 INFO heat.engine.stack [-] Stack CREATE FAILED (ha1-Test_Instance_1_killed-4s3ixmhy3z2b): Resource CREATE failed: BadRequest: Unsupported action a0fe45477a2849de9ccdca3d0bcd7bc6 (HTTP 400) (Request-ID: req-4b309b62-efeb-4baa-a7ae-7aec66c19650)
2015-06-03 06:50:02.714 941 INFO heat.engine.service [-] Stack create failed, status FAILED
2015-06-03 06:50:03.623 938 INFO heat.engine.resource [-] CREATE: AWS::CloudWatch::Alarm "Test_Instance_1_killed" [aac8695c-a3ae-4766-9284-fae12e7cea17] Stack "ha1" [5a55bc10-9cc1-463a-a8a3-4240a6757023]
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource Traceback (most recent call last):
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 489, in _action_recorder
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource yield
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 559, in _do_action
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 313, in wrapper
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource step = next(subtask)
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 533, in action_handler_task
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource while not check(handler_data):
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 288, in check_create_complete
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource return self._check_status_complete(resource.Resource.CREATE)
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 331, in _check_status_complete
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource status_reason=nested.status_reason)
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource ResourceUnknownStatus: Resource failed - Unknown status FAILED due to "Resource CREATE failed: BadRequest: Unsupported action a0fe45477a2849de9ccdca3d0bcd7bc6 (HTTP 400) (Request-ID: req-4b309b62-efeb-4baa-a7ae-7aec66c19650)"
2015-06-03 06:50:03.623 938 TRACE heat.engine.resource
2015-06-03 06:50:04.671 938 INFO heat.engine.stack [-] Stack CREATE FAILED (ha1): Resource CREATE failed: ResourceUnknownStatus: Resource failed - Unknown status FAILED due to "Resource CREATE failed: BadRequest: Unsupported action a0fe45477a2849de9ccdca3d0bcd7bc6 (HTTP 400) (Request-ID: req-4b309b62-efeb-4baa-a7ae-7aec66c19650)"
2015-06-03 06:50:04.672 938 INFO heat.engine.service [-] Stack create failed, status FAILED

Revision history for this message
carl (gsl0610) wrote :

Did you have a try with "AlarmActions": [ "Instance_RestartPolicy" ], or "AlarmActions": "Instance_RestartPolicy"

Revision history for this message
gagarinq9@gmail.com (gagarinq9) wrote :

Looks like I have same problem. Does anybody have any advices?

Revision history for this message
gagarinq9@gmail.com (gagarinq9) wrote :

According to http://docs.openstack.org/developer/heat/mitaka/template_guide/unsupported.html OS::Heat::HARestarter is DEPRECATED, but enabled and officially not supported, posible previous releases of Heat has working variant of OS::Heat::HARestarter resource.

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.