Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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 13:06:23.369 12772 WARNING os_collect_config.request [-] No metadata_url configured.
               2015-07-28 13:06:23.369 12772 WARNING os-collect-config [-] Source [request] Unavailable.
               2015-07-28 13:06:23.370 12772 WARNING os_collect_config.local [-] /var/lib/os-collect-config/local-data not found. Skipping
               2015-07-28 13:06:23.371 12772 WARNING os_collect_config.local [-] No local metadata found (['/var/lib/os-collect-config/local-data'])

After Creating cfn.json , os-collect-config in var/run/ :

          --> [root@nnnnn-server-cmrdykc5fib2 etc]# ll /var/run/os-collect-config
               total 44
               -rw-------. 1 root root 5386 Jul 28 09:45 cfn.json
               -rw-------. 1 root root 5386 Jul 28 09:45 cfn.json.orig
               -rw-------. 1 root root 1100 Jul 28 09:45 ec2.json
               -rw-------. 1 root root 1100 Jul 28 09:45 ec2.json.last
               -rw-------. 1 root root 1100 Jul 28 09:45 ec2.json.orig
               -rw-------. 1 root root  293 Jul 28 09:45 heat_local.json
               -rw-------. 1 root root  293 Jul 28 09:45 heat_local.json.last
               -rw-------. 1 root root  293 Jul 28 09:45 heat_local.json.orig
               -rw-------. 1 root root  124 Jul 28 09:45 os_config_files.json

So these are debugging methods which i have used so far , But I cannot able to trace whether puppet installed or not and deployment is completed or not.

Please give me some software configuration and deployment using puppet group using these templates.

Is there any proper document for group specific software configuration and deployment in openstack? Please look through all links and logs as mentioned above and please help to come up with better solution to fix that. i cant move further in my process because of this issue

Thanks in advance friends. Contact info :