Heat AutoSaling : problem to add network

Asked by Malleshi C N

Hello team,

I am working on autoscaling with heat teamplate.

When I was launching a stack I got below error:
==> heat-engine.log <==
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource while not check(handle_data):
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/autoscaling.py", line 353, in check_create_complete
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource done = super(AutoScalingGroup, self).check_create_complete(task)
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/autoscaling.py", line 150, in check_create_complete
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource done = super(InstanceGroup, self).check_create_complete(task)
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/stack_resource.py", line 116, in check_create_complete
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource raise exception.Error(self._nested.status_reason)
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource Error: Resource create failed: BadRequest: Multiple possible networks found, use a Network ID to be more specific. (HTTP 400) (Request-ID: req-c6552a16-090f-4b2b-a984-a2949218bb33)
2014-03-19 05:17:24.854 947 TRACE heat.engine.resource
2014-03-19 05:17:24.885 947 WARNING heat.engine.service [-] Stack create failed, status FAILED

so please let me know where I need to add network details.. is it in LaunchConfig? ibefore that I declared it in parametes section , but its shows Invalid template. Please suggest me

Below is my modified template
=============================================================================
HeatTemplateFormatVersion: '2012-12-12'
Description: |
  Template which tests autoscaling
Parameters:
  KeyName:
    Type: String
    Default: heat_key
  InstanceType:
    Type: String
    Default: m1.small
  ImageId:
    Type: String
    Default: F17-x86_64-cfntools
Resources:
  ServerGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      AvailabilityZones: {'Fn::GetAZs': ''}
      LaunchConfigurationName: {Ref: LaunchConfig}
      MinSize: "1"
      MaxSize: "3"
      Tags:
      - {Key: metering.server_group, Value: ServerGroup}
  ServerScaleUpPolicy:
    Type: AWS::AutoScaling::ScalingPolicy
    Properties:
      AdjustmentType: ChangeInCapacity
      AutoScalingGroupName: {Ref: ServerGroup}
      Cooldown: "60"
      ScalingAdjustment: "1"
  ServerScaleDownPolicy:
    Type: AWS::AutoScaling::ScalingPolicy
    Properties:
      AdjustmentType: ChangeInCapacity
      AutoScalingGroupName: {Ref: ServerGroup}
Cooldown: "60"
      ScalingAdjustment: "-1"
  CPUAlarmHigh:
    Type: OS::Ceilometer::Alarm
    Properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: "60"
      evaluation_periods: "1"
      threshold: "60"
      alarm_actions:
      - {"Fn::GetAtt": [ServerScaleUpPolicy, AlarmUrl]}
      matching_metadata: {'metadata.user_metadata.server_group': 'ServerGroup'}
      comparison_operator: gt
  CPUAlarmLow:
    Type: OS::Ceilometer::Alarm
    Properties:
      description: Scale-down if the average CPU < 15% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: "60"
      evaluation_periods: "1"
      threshold: "20"
      alarm_actions:
      - {"Fn::GetAtt": [ServerScaleDownPolicy, AlarmUrl]}
      matching_metadata: {'metadata.user_metadata.server_group': 'ServerGroup'}
      comparison_operator: lt
  LaunchConfig:
    Type: AWS::AutoScaling::LaunchConfiguration
      Properties:
      ImageId: {Ref: ImageId}
      InstanceType: {Ref: InstanceType}
      KeyName: {Ref: KeyName}
       UserData:
        Fn::Base64:
          Fn::Replace:
          - 'AWS::StackName': {Ref: 'AWS::StackName'}
            'AWS::Region': {Ref: 'AWS::Region'}
          - |
            #!/bin/bash -v
            /opt/aws/bin/cfn-init -s AWS::StackName -r LaunchConfig --region AWS::Region
            # yum make-cache gobbles up the whole of root.
           rm -rf /var/cache/yum/
            # report on memory consumption every 4 seconds
            at -f /root/watch_loop now
            # ramp up memory consumption until it is over 70%
            # then exits ConsumeStopSeconds seconds after stack launch
            /root/consume_memory &
======================================================================

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu heat Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Malleshi C N (malleshicn) said :
#1

Hi Team,

 after modifying many parameters I ended at below error

2014-03-21 09:31:27.138 22406 ERROR heat.engine.resource [-] CREATE : LoadBalancer "ElasticLoadBalancer"
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource Traceback (most recent call last):
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 361, in _do_action
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource while not check(handle_data):
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/stack_resource.py", line 116, in check_create_complete
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource raise exception.Error(self._nested.status_reason)
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource Error: Resource create failed: BadRequest: Multiple possible networks found, use a Network ID to be more specific. (HTTP 400) (Request-ID: req-e21332a8-a730-40d4-9e87-9d9ae7908b31)
2014-03-21 09:31:27.138 22406 TRACE heat.engine.resource
2014-03-21 09:31:27.347 22406 WARNING heat.engine.service [-] Stack create failed, status FAILED

I have mentioned my network details in my template.

  "SubnetId" : {
        "Default" :"69b3ddd9-b092-4361-b541-4f171c736a9d",
          "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
          "Type" : "String"
        },

   "PublicNetworkId" : {
        "Default" :"fbfc3fa8-473b-40fa-89e8-8c7a1acb0d0b",
          "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
          "Type" : "String"
       },

   "PrivateNetworkId" : {
        "Default" :"ad5a1e6c-24b7-4190-b4e7-6e4f19b046ce",
          "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
          "Type" : "String"
       },

Do I need to mention it somewhere in load balancer as well ?...?

"ElasticLoadBalancer" : {
      "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
      "Properties" : {
        "AvailabilityZones" : { "Fn::GetAZs" : "" },
         "Listeners" : [ {
          "LoadBalancerPort" : "80",
          "InstancePort" : "80",
          "Protocol" : "HTTP"
        } ],
        "HealthCheck" : {
          "Target" : "HTTP:80/",
          "HealthyThreshold" : "3",
          "UnhealthyThreshold" : "5",
          "Interval" : "30",
          "Timeout" : "5"
        }
      }

======================================================
This is the last error I received after modifying in ElasticLoadBalancer

"ElasticLoadBalancer" : {
      "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
      "Properties" : {
        "AvailabilityZones" : { "Fn::GetAZs" : "" },
        "Instances" : [ { "Ref": "WikiDatabase" } ],
        "Subnets" : [ { "SubnetId": "69b3ddd9-b092-4361-b541-4f171c736a9d" ,"Implemented": "False" } ],
         "Listeners" : [ {
          "LoadBalancerPort" : "80",
          "InstancePort" : "80",
          "Protocol" : "HTTP"
        } ],
        "HealthCheck" : {
          "Target" : "HTTP:80/",
          "HealthyThreshold" : "3",
          "UnhealthyThreshold" : "5",
          "Interval" : "30",
          "Timeout" : "5"

ERROR: Property Subnets not implemented yet
root@controller:/home/oss#

Please suggest me ...

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.