Ask Your Question
0

SoftwareDeployment does not provision user data [closed]

asked 2016-09-05 10:56:34 -0500

laurentiusoica gravatar image

Hello,

For the following heat template, the SoftwareDeployment does not provision the user data:

heat_template_version: 2015-10-15

resources:

  server:
    type: OS::Nova::Server
    properties:
      config_drive: "true"
      name: test
      image: some_image
      flavor: some_flavor
      key_name: key
      user_data_format: SOFTWARE_CONFIG
      networks:
       - port: { get_resource: some_port }
    metadata:
      os-collect-config:
        collectors:
          - heat_local
        polling_interval: 60

  some_port:
    type: OS::Neutron::Port
    properties:
      network_id: some_network
      fixed_ips:
        - subnet_id: some_subnet

  config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config: |
        #!/bin/bash
        echo "one" > /tmp/one

  deployment:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: config
      server:
        get_resource: server
      signal_transport: NO_SIGNAL

All resources are successfully created

| config        | 43a7b6b7-1f56-4034-8d88-429fd6f8ff8a | OS::Heat::SoftwareConfig     | CREATE_COMPLETE | 2016-09-05T15:43:20 |
| deployment    | d061caa9-8101-4414-b97c-f956ccd622bd | OS::Heat::SoftwareDeployment | CREATE_COMPLETE | 2016-09-05T15:43:20 |
| some_port     | 84bdac40-34dc-4098-9e3e-75d87f4aa72c | OS::Neutron::Port            | CREATE_COMPLETE | 2016-09-05T15:43:20 |
| server        | 51c53179-60f1-4261-8951-8748e8ad43da | OS::Nova::Server             | CREATE_COMPLETE | 2016-09-05T15:43:20 |

But the user data on the VM is empty. I'm logging to the VM and mounting the cdrom (that is the config drive where metadata is mapped)

# mount /dev/sr0 /mnt/
# cat /mnt/openstack/latest/user_data
.....
--===============3431605606305300090==
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata"

...
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by laurentiusoica
close date 2016-09-23 02:28:05.957495

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-09-23 02:27:45 -0500

laurentiusoica gravatar image

This is because cloud-init needs access to the HEAT API.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-09-05 10:56:34 -0500

Seen: 414 times

Last updated: Sep 23 '16