OS::Heat::WaitCondition doesnt work after upgrade to Liberty

asked 2016-02-04 21:27:43 -0500

Denis gravatar image

updated 2016-02-23 15:47:06 -0500

zaneb gravatar image

Hi! We have a problem. After upgrade from Juno to Liberty one of our heat templates with OS::Heat:WaitCondition start to fail. Here is the template:


heat_template_version: 2013-05-23

description: waitcondition
parameters:
  domain:
    type: string
    default: default
  key_name:
    type: string
    default: test
  image:
    type: string
    default: cirros-0.3.4
  flavor:
    type: string
    default: m1.tiny
  availability_zone:
    type: string
    default: migration-tests
  timeout:
    type: number
    default: 120
  private_network:
    type: string
    default: network_id
  public_network:
    type: string
    default: network_id

resources:
  instance1:
    type: OS::Nova::Server
    properties:
      networks:
        - port: { get_resource: instance1_port }
      image: {get_param: image}
      availability_zone: {get_param: availability_zone}
      flavor: {get_param: flavor}
      key_name: {get_param: key_name}
      user_data_format: RAW
      user_data:
        str_replace:
          template: |
              #!/bin/bash
              wc_notify --data-binary '{"status": "SUCCESS"}'
          params:
            wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }

  wait_condition:
    type: OS::Heat::WaitCondition
    depends_on: instance1
    properties:
      handle: {get_resource: wait_handle}
      timeout: {get_param: timeout}

  wait_handle:
    type: OS::Heat::WaitConditionHandle

  instance1_port:
    type: OS::Neutron::Port
    properties:
      network: { get_param: private_network }
      security_groups:
          - default-security-group

  floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network: { get_param: public_network }
      port_id: { get_resource: instance1_port }

outputs:
  instance_ip:
    description: The IP address of the deployed instance
    value: { get_attr: ['floating_ip', 'floating_ip_address'] }
  curl_cli:
    value: { get_attr: ['wait_handle', 'curl_cli'] }
  wait_handle_endpoint:
    value: { get_attr: ['wait_handle', 'endpoint'] }
  wc_data:
    value: { get_attr: ['wait_condition', 'data'] } 

The error is: WaitConditionTimeout: resources.wait_condition: 0 of 1 received

All connections between hosts are ok. Is there anybody know how to investigate and fix this problem?

Thanks!

edit retag flag offensive close merge delete

Comments

You'll want to check a number of things - for a start that the user_data script is running, and the response it gets back when posting to Heat. From there you might want to look at the heat-cfn-api and heat-engine logs. Please raise a Launchpad bug if appropriate.

zaneb gravatar imagezaneb ( 2016-02-23 15:52:52 -0500 )edit

Also, looking at the curl_cli output from the stack should help make it obvious whether the heat_waitcondition_server_url option is configured correctly.

zaneb gravatar imagezaneb ( 2016-02-23 16:03:41 -0500 )edit