ERROR: Property error: : resources.monitor.properties: : Property pool not assigned

Bug #1647266 reported by Anand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Unassigned

Bug Description

Hello,

I am just deploying the Openstack Mitaka in ubuntu14.04 LTS. During the setup i just added the loadbalancer service under Neutron API. everything works fine, while i am creating heat stack for auto scaling and down with loadbalncer using heat and ceilometer .
when i am launching the stack ,I am getting following error

"ERROR: Property error: : resources.monitor.properties: : Property pool not assigned"

Please refer my code as below :

heat_template_version: 2014-10-16
description: AutoScaling Fedora 22 Web Application
parameters:
  image:
    type: string
    description: Image used for servers
    default: fedora
  key_name:
    type: string
    description: SSH key to connect to the servers
    default: test
  flavor:
    type: string
    description: flavor used by the web servers
    default: m2.tiny
  network:
    type: string
    description: Network used by the server
    default: provider
  subnet_id:
    type: string
    description: subnet on which the load balancer will be located
    default: 7074a67b-5091-47fc-86d6-e2685cbafee3
  external_network_id:
    type: string
    description: UUID of a Neutron external network
    default: 7074a67b-5091-47fc-86d6-e2685cbafee3

resources:
  webserver:
    type: OS::Heat::AutoScalingGroup
    properties:
      min_size: 1
      max_size: 3
      cooldown: 60
      desired_capacity: 1
      resource:
        type: file:///etc/heat/templates/lb-env.yaml
        properties:
          flavor: {get_param: flavor}
          image: {get_param: image}
          key_name: {get_param: key_name}
          network: {get_param: network}
          pool_id: {get_resource: pool}
          metadata: {"metering.stack": {get_param: "OS::stack_id"}}
          user_data:
            str_replace:
              template: |
                #!/bin/bash -v
                yum -y install httpd php
                systemctl enable httpd
                systemctl start httpd
                cat < /var/www/html/hostname.php

                EOF
              params:
                hostip: 172.16.1.181
                fqdn: sat6.lab.com
                shortname: sat6

  web_server_scaleup_policy:
    type: OS::Heat::ScalingPolicy

  properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: webserver}
      cooldown: 60
      scaling_adjustment: 1

  web_server_scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: webserver}
      cooldown: 60
      scaling_adjustment: -1

  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 95% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 95
      alarm_actions:
        - {get_attr: [web_server_scaleup_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: gt

  cpu_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-down if the average CPU < 15% for 60 minutes
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 15
      alarm_actions:
        - {get_attr: [web_server_scaledown_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: lt

  monitor:
    type: OS::Neutron::LBaaS::HealthMonitor
    properties:
      type: TCP
      delay: 5
      max_retries: 5
      timeout: 5

  pool:
    type: OS::Neutron::LBaaS::Pool
    properties:
      protocol: TCP
      monitors: [{get_resource: monitor}]
      subme: test-lb-pool-http
      lb_method: ROUND_ROBIN
      vip:
        protocol_port: 80
  lb:
    type: OS::Neutron::LBaaS::LoadBalancer
    properties:
 protocol_port: 80
      pool_id: {get_resource: pool}
  lb_floating:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: {get_param: external_network_id}
      port_id: {get_attr: [pool, vip, port_id]}

outputs:
  scale_up_url:
    description: >
      This URL is the webhook to scale up the autoscaling group. You
      can invoke the scale-up operation by doing an HTTP POST to this
      URL; no body nor extra headers are needed.
    value: {get_attr: [web_server_scaleup_policy, alarm_url]}
  scale_dn_url:
    description: >
      This URL is the webhook to scale down the autoscaling group.
      You can invoke the scale-down operation by doing an HTTP POST to
      this URL; no body nor extra headers are needed.
    value: {get_attr: [web_server_scaledown_policy, alarm_url]}
  pool_ip_address:
    value: {get_attr: [pool, vip, address]}
    description: The IP address of the load balancing pool
  website_url:
    value:
      str_replace:
        template: http://serviceip/hostname.php
        params:
          serviceip: { get_attr: [lb_floating, floating_ip_address] }
    description: >
      This URL is the "external" URL that can be used to access the
      website.
  ceilometer_query:
    value:
      str_replace:
        template: >
          ceilometer statistics -m cpu_util
          -q metadata.user_metadata.stack=stackval -p 600 -a avg
        params:
          stackval: { get_param: "OS::stack_id" }
    description: >
      This is a Ceilometer query for statistics on the cpu_util meter
      Samples about OS::Nova::Server instances in this stack. The -q
      parameter selects Samples according to the subject's metadata.
      When a VM's metadata includes an item of the form metering.X=Y,
      the corresponding Ceilometer resource has a metadata item of the
      form user_metadata.X=Y and samples about resources so tagged can
      be queried with a Ceilometer query term of the form
      metadata.user_metadata.X=Y. In this case the nested stacks give
      their VMs metadata that is passed as a nested stack parameter,
      and this stack passes a metadata of the form metering.stack=Y,
      where Y is this stack's ID.

Anand (anand.visolve)
description: updated
Revision history for this message
Zane Bitter (zaneb) wrote :

That's a required attribute: https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::LBaaS::HealthMonitor-prop-pool

Referencing monitors in the pool is the wrong way around. Probably this changed between the LBaaS v1 and v2 APIs. It looks like that switch happened in Mitaka.

affects: heat-templates → heat
Changed in heat:
status: New → Invalid
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.