New Question

Revision history [back]

click to hide/show revision 1
initial version

Sending a signal to OS::Heat::WaitCondition does not appear to work

I am attempting to spawn Windows instances via HEAT template and trying to trigger the wait condition from userdata. It does not matter what timeout value I set for the waitcondition, it still times out with

Resource CREATE failed: WaitConditionTimeout: resources.win10.resources.wait_condition: 0 of 1 received

Looking at the logs, the signal does appear to be sent correctly. Here is the relevant bit

Init\Python27\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:43
2016-11-23 18:10:23.539 1748 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\utils\classloader.py:26
2016-11-23 18:12:33.683 1748 DEBUG cloudbaseinit.plugins.common.userdatautils [-] User_data stdout:


StatusCode        : 200
StatusDescription : OK
Content           : null
RawContent        : HTTP/1.1 200 OK
                    X-Openstack-Request-Id: req-c269e8bf-ccc6-4cfc-82c3-5b4787164902
                    Connection: close
                    Content-Length: 4
                    Content-Type: application/json; charset=UTF-8
                    Date: Wed, 23 Nov 2016 18:12:33 ...
Forms             : 
Headers           : {[X-Openstack-Request-Id, req-c269e8bf-ccc6-4cfc-82c3-5b4787164902], [Connection, close], 
                    [Content-Length, 4], [Content-Type, application/json; charset=UTF-8]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : 
RawContentLength  : 4

Here is what my HEAT template looks like.

resources:
  wait_condition:
    type: OS::Heat::WaitCondition
    properties:
      handle: {get_resource: wait_handle}
      count: 1
      timeout: 600

  wait_handle:
    type: OS::Heat::WaitConditionHandle

  port:
    type: OS::Neutron::Port
    properties:
      network: { get_param: private_network }

  server1:
    type: OS::Nova::Server
    properties:
      availability_zone: nova
      name: win10
      flavor: {get_param: flavor }
      image: { get_param: image }
      key_name: { get_param: key_name }
      networks:
        - port: { get_resource: port }
      user_data_format: RAW
      user_data:
        str_replace:
          template: |
            #ps1_sysnative
            Invoke-WebRequest -Uri "$wc_endpoint" -Headers @{"X-Auth-Token" = "$wc_token"} -ContentType "application/json" -Body '{"Status" : "SUCCESS"}' -Method "POST" -UseBasicPa    rsing
          params:
            $wc_endpoint: { get_attr: [wait_handle, endpoint] }
            $wc_token: { get_attr: [wait_handle, token] }

Any idea why it's not working?