OS::Heat::ResourceGroup and waitconditions

asked 2016-12-05 12:27:54 -0500

toddbaumann gravatar image

I am attempting to use an OS::Heat::ResourceGroup with OS::Heat::WaitCondition and unable to get them to function at all. The stack gets created but fails on the waitcondition. If I deploy just the OS::Nova::Server and call the wait condition from only that it works as it should

  ServerGroup1:
    type: OS::Heat::ResourceGroup
    update_policy:
      rolling_update:
        min_in_service: 2
    properties:
      count: 3
      resource_def:
        type: OS::Nova::Server
        properties:
          flavor: { get_param: flavor }
          image: { get_param: image_name }
          key_name: { get_param: key }
          name: server-%index%
          networks:
          - network: { get_param: private_net }
          user_data_format: SOFTWARE_CONFIG
          user_data: { get_resource: server_config }

Above I have resources defined for the wait_condition.

wait_condition:
    type: OS::Heat::WaitCondition
    properties:
      handle: { get_resource: wait_handle }
      count: 1
      timeout: 500
  wait_handle:
    type: OS::Heat::WaitConditionHandle

Do WaitConditions work differently in a resourcegroup ? I am at a loss for what to do next.

edit retag flag offensive close merge delete

Comments

In the snippet you pasted, I don't see anything in the resource group members to signal the wait_handle, so I can't explain how it's working when you use that server definition outside of a ResourceGroup, or what the difference is when it's inside a ResourceGroup.

zaneb gravatar imagezaneb ( 2016-12-05 14:10:15 -0500 )edit

I have a script that gets executed on instance creation.

Inside the softwareConfig I pass the wait condition URL into a script and curl to it. If I take out the resource group and just deploy single stand alone OS::Nova::Server instances this works fine.

toddbaumann gravatar imagetoddbaumann ( 2016-12-05 15:11:39 -0500 )edit