Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi i figured this out why it was happening. This is because when you run tempest test tempest.api.orchestration.test_neutron_resources with the default given template neutron_basic.yaml, that template uses waitcondition api of heat that you define in your heat.conf in mine it was : heat_waitcondition_server_url = https://10.240.134.179:8000/v1/waitcondition

you have to make sure you can curl this api from inside your vm , any nova vm . if you cannot curl , you simply will get timeout on that wait condition, because the curl keeps failing to connect to /v1/waitcondition api, and unless that waitcondition is fulfilled, your stack status will never be in COMPLETE state.

now the template creates a wait condition, wait condition is fulfilled when the vm lauched through the stack sends a signal. the signal is using the following command defined in neutron_basic.yaml:

        #!/bin/sh -v
        SIGNAL_DATA='{"Status": "SUCCESS", "Reason": "SmokeServerNeutron created", "Data": "Application has completed configuration.", "UniqueId": "00000"}'
        while ! curl --fail -X PUT -H 'Content-Type:' --data-binary "$SIGNAL_DATA" \
        'wait_handle' ; do sleep 3; done

this is the command runs inside your vm, how i know this, when the test is running, you can go to horizon, click orchestration, click on tempest stack and click on the server > log. i could see the error:

curl: failed to curl localhost by simply removing the following part from neutron_basics.yaml, your test shall pass :)

     REMOVE FOLLOWING PART FROM NEUTRON_BASIC.YAML      
     user_data_format: RAW
      user_data:
      str_replace:
      template: |
        #!/bin/sh -v
        SIGNAL_DATA='{"Status": "SUCCESS", "Reason": "SmokeServerNeutron created", "Data": "Application has completed configuration.", "UniqueId": "00000"}'
        while ! curl --fail -X PUT -H 'Content-Type:' --data-binary "$SIGNAL_DATA" \
        'wait_handle' ; do sleep 3; done
      params:
        wait_handle: {get_resource: WaitHandleNeutron}
     WaitHandleNeutron:
         type: AWS::CloudFormation::WaitConditionHandle
     WaitCondition:
         type: AWS::CloudFormation::WaitCondition
depends_on: Server
properties:
  Handle: {get_resource: WaitHandleNeutron}
  Timeout: {get_param: timeout}

After you removed this , rerun and it shall pass :)