Ask Your Question

How can i trace an error for software configuration and deployment in openstack heat template execution

asked 2015-07-28 10:02:56 -0500

SangeethKumar gravatar image

Hi all, I have executed a Heat template in with VM provisioning and software configuration and deployment. The templates that i get it from ( And i have executed template for software configuration group "script" . It works fine and completed successfully. Command used to execute template with software configuration and deployment :

           heat --debug --os-no-client-auth --os-username admin --os-password openstack --heat-url http://localhost:8004/v1/98073903698740af87fb57ca9e41eed5  --os-auth-url stack-create mystack -f example-templates/example-config-pristine-image.yaml -e boot-config/fedora_pip_env.yaml

It creates software configuration and deployment successfully Template file : (

Environment file : (

In this environment file they mapped "Heat::InstallConfigAgent": templates/install_config_agent_fedora_pip.yaml Please look at this ( file . This contains boot config agents and hooks configuration. For group script its working fine. Because in templates/install_config_agent_fedora_pip.yaml they mapped heat-config-script and hook script for "script" group.

Issue : But for executing software configuration for puppet group. I need to know what are the configurations need to be change in environment file. It results in CREATE FAILED due to time out.

For software configuration (group : puppet) , i made some changes before executing template as follows,

Execution command :

                heat --debug --os-no-client-auth --os-username admin --os-password openstack --heat-url http://localhost:8004/v1/98073903698740af87fb57ca9e41eed5  --os-auth-url stack-create nnnnn -f example-templates/example-puppet-template_bak.yaml -e boot-config/fedora_pip_env.yaml

In example-puppet-template_bak.yaml ( ( , I have added boot config resource and mapped to server shown here:

                       type: Heat::InstallConfigAgent**
                       type: OS::Nova::Server
                           image: {get_param: image}
                           flavor: {get_param: flavor}
                           key_name: {get_param: key_name}
                                  - network: {get_param: private_net}
                                  - {get_resource: the_sg}
                          **user_data_format: SOFTWARE_CONFIG
                          user_data: {get_attr: [boot_config, config]}**

And i made changes in (, Replaced the $hook_script at line 25 with

Error Message:

                                    stack_status          | CREATE_FAILED
                                    stack_status_reason   | Create timed out

Debugging Steps:

         -->  [root@nnnnn-server-cmrdykc5fib2 etc]# ll /var/run/heat-config
             total 8
             drwx------. 2 root root  120 Jul 28 12:22 deployed
             -rw-r--r--. 1 root root 4298 Jul 28 12:51 heat-config
             drwx------. 2 root root   40 Jul 28 09:45 heat-config-puppet

       --> [root@nnnnn-server-cmrdykc5fib2 etc]#  cat /etc/os-collect-config.conf
             command = os-refresh-config

             metadata_url =
             stack_name = nnnnn
             secret_access_key = b07c579cfbe34e1a89d0fee0c2240ca4
             access_key_id = 704daf1078324dde92cd168b06459594
             path = server.Metadata

      -->  [root@nnnnn-server-cmrdykc5fib2 os-collect-config]# cat heat_local.json
               "deployments": [], 
               "os-collect-config": {
               "cfn": {
                    "stack_name": "nnnnn", 
                    "metadata_url": "", 
                    "access_key_id": "704daf1078324dde92cd168b06459594", 
                    "secret_access_key": "b07c579cfbe34e1a89d0fee0c2240ca4", 
                    "path": "server.Metadata"

Shows some Warnings :

           --> [root@nnnnn-server-cmrdykc5fib2 heat-config-puppet]# os-collect-config --one-time
              2015-07-28 13:06:23.367 12772 WARNING os_collect_config.heat [-] No auth_url configured.
              2015-07-28 ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-24 16:05:46 -0500

Steve Baker gravatar image

That warning can be ignored. Take a look at this answer for general debugging advice.

You need the puppet hook but the boot-config only installs the script hook. You need to extend the boot-config templates to install the hooks that you need (we can't just install all of them, but it would be good if we can work out a way of allowing users to choose which ones to install and support that in the boot-config environments)

You can look at the install script for the heat-config-puppet element to see what needs to be done to install the puppet hook (which is install the puppet package and the puppet hook script)

edit flag offensive delete link more


Thank you Steve baker....

Could you please share how to apply software config in already launched Virtual machine. (Machine contains all agents for software config)

SangeethKumar gravatar imageSangeethKumar ( 2015-09-25 01:23:59 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-07-28 10:01:28 -0500

Seen: 1,314 times

Last updated: Sep 24 '15