Statistic SampleCount works incorrect if heat engine restart

Bug #1202552 reported by JunJie Nan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Angus Salkeld

Bug Description

Steps to reproduce:
1. heat stack-create -f WordPress_Single_Instance_With_IHA.template iha -P "..."
    "HeartbeatFailureAlarm": {
     "Type": "AWS::CloudWatch::Alarm",
     "DependsOn" : "WaitCondition",
     "Properties": {
        "AlarmDescription": "Restart the WikiDatabase if we miss a heartbeat",
        "MetricName": "Heartbeat",
        "Namespace": "system/linux",
        "Statistic": "SampleCount",
        "Period": "60",
        "EvaluationPeriods": "1",
        "Threshold": "1",
        "AlarmActions": [ { "Ref": "WebServerRestartPolicy" } ],
        "ComparisonOperator": "LessThanThreshold"
      }
    }
2. heat resource-list iha
    | CfnUser | AWS::IAM::User
    | WebServerKeys | AWS::IAM::AccessKey
    | WikiDatabase | AWS::EC2::Instance
    | HeartbeatFailureAlarm | AWS::CloudWatch::Alarm
    | WaitCondition | AWS::CloudFormation::WaitCondition
    | WaitHandle | AWS::CloudFormation::WaitConditionHandle
    | WebServerRestartPolicy | OS::Heat::HARestarter
3. Stop heat engine, wait more than 60 seconds and start heat engine,
4. Check result
Expected result:
Resources WebServerRestartPolicy, WaitCondition, HeartbeatFailureAlarm and WikiDatabase should NOT be destroyed and recreated.
Actual result:
Resources WebServerRestartPolicy, WaitCondition, HeartbeatFailureAlarm and WikiDatabase were destroyed and recreated.

Get `WordPress_Single_Instance_With_IHA.template' at
https://github.com/openstack/heat-templates/blob/master/cfn/WordPress_Single_Instance_With_IHA.template

JunJie Nan (nanjj)
Changed in heat:
assignee: nobody → JunJie Nan (nanjj)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in heat:
assignee: JunJie Nan (nanjj) → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/37839
Committed: http://github.com/openstack/heat/commit/07d1a9c90b2c96f231f9bd8fe6d59bfec8c1d22d
Submitter: Jenkins
Branch: master

commit 07d1a9c90b2c96f231f9bd8fe6d59bfec8c1d22d
Author: Angus Salkeld <email address hidden>
Date: Fri Jul 19 16:06:20 2013 +1000

    Reset the the watch_rule.last_evaluated on start up

    This is so we don't fire off alarms when the engine has not been running.

    bug 1202552

    Change-Id: Ief258fd601b48e2495ac69091a942f23a019e92c

Changed in heat:
status: In Progress → Fix Committed
Steven Hardy (shardy)
Changed in heat:
milestone: none → havana-3
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: havana-3 → 2013.2
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.