Comment 8 for bug 1390246

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

vagrant@devstack:~$ heat stack-show f5a06c66-3d1d-4ecd-9ef9-d0e3a25c4e29
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| capabilities | [] |
| creation_time | 2014-11-11T17:42:47Z |
| description | Basic app deploy. |
| disable_rollback | True |
| id | f5a06c66-3d1d-4ecd-9ef9-d0e3a25c4e29 |
| links | http://10.0.2.15:8004/v1/1cb3982d28cc480cbf72cfdfe90e5e6f/stacks/coreos3-nov11-df718e8a-14c3-4756-95d7-9e9cd2a8a4bd/f5a06c66-3d1d-4ecd-9ef9-d0e3a25c4e29 (self) |
| notification_topics | [] |
| outputs | [ |
| | { |
| | "output_value": "", |
| | "description": "The public IP address of the newly configured Server.", |
| | "output_key": "public_ip" |
| | }, |
| | { |
| | "output_value": "http://:5000", |
| | "description": "The URL for the Server.", |
| | "output_key": "URL" |
| | } |
| | ] |
| parameters | { |
| | "OS::stack_id": "f5a06c66-3d1d-4ecd-9ef9-d0e3a25c4e29", |
| | "OS::stack_name": "coreos3-nov11-df718e8a-14c3-4756-95d7-9e9cd2a8a4bd", |
| | "key_name": "", |
| | "image": "coreos", |
| | "du_image": "10.0.2.15:5042/nodeus", |
| | "flavor": "m1.small", |
| | "port": "5000", |
| | "app_name": "coreos3-nov11" |
| | } |
| parent | None |
| stack_name | coreos3-nov11-df718e8a-14c3-4756-95d7-9e9cd2a8a4bd |
| stack_owner | None |
| stack_status | CREATE_COMPLETE |
| stack_status_reason | Stack CREATE completed successfully |
| template_description | Basic app deploy. |
| timeout_mins | None |
| updated_time | None |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+

Notice that the the output_value for "public_ip" and "URL" are empty. Here is the part of the "output" section of the heat template that I am using:

outputs:
  public_ip:
    description: The public IP address of the newly configured Server.
    value: { get_attr: [ compute, accessIPv4 ] }
  URL:
    description: The URL for the Server.
    value:
      str_replace:
        template: http://%host%:%port%
        params:
          "%host%": { get_attr: [ compute, accessIPv4 ] }
          "%port%": { get_param: port }

Notice that I am using the "accessIPv4" attribute of heat to get the public_ip of the spun up server.

Based on the output of heat stack-show command, it looks like the "accessIPv4" attribute is not providing the IP address of the spun up server.

This is confirmed by

vagrant@devstack:~$ nova list
+--------------------------------------+---------------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------------+--------+------------+-------------+----------+
| f7c9825a-5adc-4a99-a80e-45923056df6e | coreos3-nov11 | ACTIVE | - | Running | |
+--------------------------------------+---------------+--------+------------+-------------+----------+

Notice that the there is no value for "Networks" attribute.

Notice that in the path that used nova boot directly, I had to create nova-network first and then use that within the "nova boot" command. Looks like I would need to do something similar within the heat template.