<div dir="ltr">Thanks.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-19 6:52 GMT+08:00 Steve Baker <span dir="ltr"><<a href="mailto:sbaker@redhat.com" target="_blank">sbaker@redhat.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="">
<div>On 17/05/14 00:49, Alex Yang wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi all and Baker,
<div><br>
</div>
<div>I had try to use Heat::SoftwareDeployment and
Heat::SoftwareConfig but there may be someting wrong with my
configuration that the hook-puppet didn't be invoked.</div>
<div><br>
</div>
<div>Firstly, I follow this <a href="https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements" target="_blank">instruction</a>
to build a golden image.</div>
<div><br>
</div>
<div>
<div><span style="background-color:rgb(153,153,153)"><i>
apt-get install qemu-utils</i></span></div>
<div><span style="background-color:rgb(153,153,153)"><i> </i></span></div>
<div><i style="background-color:rgb(153,153,153)"> git
clone <a href="https://github.com/openstack/diskimage-builder.git" target="_blank">https://github.com/openstack/diskimage-builder.git</a></i></div>
<div><i style="background-color:rgb(153,153,153)"> git
clone <a href="https://github.com/openstack/tripleo-image-elements.git" target="_blank">https://github.com/openstack/tripleo-image-elements.git</a></i></div>
<div><i style="background-color:rgb(153,153,153)"> git
clone <a href="https://github.com/openstack/heat-templates.git" target="_blank">https://github.com/openstack/heat-templates.git</a></i></div>
<div><i style="background-color:rgb(153,153,153)"> </i></div>
<div><i style="background-color:rgb(153,153,153)">
root@cloud-t1:~/alex_scripts/heat# cat set_env_path.sh </i></div>
<div><i style="background-color:rgb(153,153,153)">
#!/bin/bash</i></div>
<div><i style="background-color:rgb(153,153,153)"> </i></div>
<div><i style="background-color:rgb(153,153,153)"> export
ELEMENTS_PATH=/root/alex_scripts/heat/tripleo-image-elements/elements:/root/alex_scripts/heat/heat-templates/hot/software-config/elements</i></div>
<div><i style="background-color:rgb(153,153,153)"> export
DIB_CLOUD_IMAGES=<a href="https://cloud-images.ubuntu.com/" target="_blank">https://cloud-images.ubuntu.com/</a></i></div>
<div><i style="background-color:rgb(153,153,153)"> export
DIB_RELEASE=trusty</i></div>
<div><i style="background-color:rgb(153,153,153)"> export
BASE_IMAGE_FILE=trusty-server-cloudimg-amd64-root.tar.gz</i></div>
<div><i style="background-color:rgb(153,153,153)"> export
SHA256SUMS=<a href="https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS" target="_blank">https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS</a></i></div>
<div><i style="background-color:rgb(153,153,153)"> export
CACHED_FILE=/root/.cache/image-create/trusty-server-cloudimg-amd64-root.tar.gz</i></div>
<div><i style="background-color:rgb(153,153,153)"> </i></div>
<div><i style="background-color:rgb(153,153,153)">
./diskimage-builder/bin/disk-image-create -a amd64 -o
ubuntu-amd64-heat.qcow2 vm ubuntu heat-cfntools
heat-config heat-config-cfn-init heat-config-puppet
heat-config-script os-collect-config os-refresh-config
os-apply-config</i></div>
</div>
<div><br>
</div>
</div>
</blockquote></div>
I've not tested an ubuntu image recently, if you wanted to eliminate
this as an option then you could try the fedora instructions
verbatim, however see below.<div><div class="h5"><br>
<blockquote type="cite">
<div dir="ltr">
<div>Secondly, I use this <a href="https://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-puppet-template.yaml" target="_blank">example</a> to
try it out. Everything is OK but the resource of
SoftwareDeployment. The state of SoftwareDeployment is always
IN_PROGRESS. I login to the vm, I check something as follows:</div>
<div><br>
</div>
<div>1. Checking the /var/lib/heat-config, hook-puppet is
installed.</div>
<div><br>
</div>
<div>
<div><i style="background-color:rgb(153,153,153)">root@puppet-demo:/var/lib/heat-config#
tree</i></div>
<div><i style="background-color:rgb(153,153,153)">.</i></div>
<div><i style="background-color:rgb(153,153,153)">└── hooks</i></div>
<div><i style="background-color:rgb(153,153,153)"> ├──
cfn-init</i></div>
<div><i style="background-color:rgb(153,153,153)"> ├──
puppet</i></div>
<div>
<i style="background-color:rgb(153,153,153)"> └── script</i></div>
</div>
<div> </div>
<div>2. Checking the WORKING_DIR(<span>/var/lib/heat-config/heat-config-puppet</span>)
of hook-puppet. The WORKING_DIR is not created yet. No any .pp
files in the directory.</div>
<div><br>
</div>
<div>3. Checking the status of os-collect-config, it is running.
But there are some warrning in the
/var/log/upstart/os-collect-config.log.</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="background-color:rgb(153,153,153)"><i>2014-05-16
06:19:31.158 1140 WARNING os_collect_config.cfn [-] No
metadata_url configured.</i></span></div>
<div><span style="background-color:rgb(153,153,153)"><i>2014-05-16
06:19:31.158 1140 WARNING os-collect-config [-] Source
[cfn] Unavailable.</i></span></div>
<div><span style="background-color:rgb(153,153,153)"><i>2014-05-16
06:19:31.158 1140 WARNING os_collect_config.heat [-] No
auth_url configured.</i></span></div>
<div><span style="background-color:rgb(153,153,153)"><i>2014-05-16
06:19:31.159 1140 WARNING os-collect-config [-] Source
[heat] Unavailable.</i></span></div>
<div><br>
</div>
<div>4. Checking /var/lib/os-collect-config</div>
<div><br>
</div>
<div>
<div><i style="background-color:rgb(153,153,153)">root@puppet-demo:/var/lib/os-collect-config#
ls</i></div>
<div><i style="background-color:rgb(153,153,153)">ec2.json
ec2.json.last ec2.json.orig heat_local.json
heat_local.json.last heat_local.json.orig
os_config_files.json</i></div>
</div>
<div><i style="background-color:rgb(153,153,153)"><br>
</i></div>
<div>
<div><i style="background-color:rgb(153,153,153)">root@puppet-demo:/var/lib/os-collect-config#
cat heat_local.json</i></div>
<div><i style="background-color:rgb(153,153,153)">{</i></div>
<div><i style="background-color:rgb(153,153,153)"> "os-collect-config":
{</i></div>
<div><i style="background-color:rgb(153,153,153)"> "heat": {</i></div>
<div><i style="background-color:rgb(153,153,153)">
"password": "88cdca28611a47b6af3f92cf350d7e93", </i></div>
<div><i style="background-color:rgb(153,153,153)">
"user_id": "8a8e83631f4544b88435833512f4fe04", </i></div>
<div><i style="background-color:rgb(153,153,153)">
"stack_id":
"puppet-demo/52b04dbb-0bc5-4c89-b4bd-543975a32e06", </i></div>
<div><i style="background-color:rgb(153,153,153)">
"resource_name": "server1", </i></div>
<div><i style="background-color:rgb(153,153,153)">
"auth_url": "<a href="http://10.22.129.21:5000/v2.0" target="_blank">http://10.22.129.21:5000/v2.0</a>", </i></div>
<div><i style="background-color:rgb(153,153,153)">
"project_id": "156739be982340b9b6630bae76984634"</i></div>
<div><i style="background-color:rgb(153,153,153)"> }</i></div>
<div><i style="background-color:rgb(153,153,153)"> }, </i></div>
<div><i style="background-color:rgb(153,153,153)"> "deployments":
[]</i></div>
<div><i style="background-color:rgb(153,153,153)">}</i></div>
</div>
<div><br>
</div>
<div>5. Checking the connection between vm and heat-api-cfn
server. It's OK.</div>
<div><br>
</div>
<div>After checking above things, I still can't to handle thie
problem. There are something I need to understand:</div>
<div><br>
</div>
<div>1. Where to store the puppet file and inputs, after the
heat-engine precessing the template?</div>
<div>2. Which meatadata server(heat_local, ec2 or heat-api-cfn)
the os-collect-config will fetching to get the
SoftwareDeployment meatadata?</div>
<div>3. Is there any chapter to introduce the whole process of
SoftwareDeployment in detial?</div>
<br>
</div>
</blockquote></div></div>
You're possibly being hit by this bug:<br>
<a href="https://launchpad.net/bugs/1299109" target="_blank">https://launchpad.net/bugs/1299109</a><br>
<br>
Which is fixed by:<br>
<a href="https://review.openstack.org/#/c/91733/4" target="_blank">https://review.openstack.org/#/c/91733/4</a><br>
<br>
When an os-collect-config is released with this fix I'll let you
know and you can build a new image and try again.<br>
<br>
Over time we'll have docs on how to diagnose these issues, but some
hints for this particular part of the toolchain would be to run the
following commands until a response yields an error which gives an
indication of where your issue might be:<br>
os-collect-config --one-time<br>
os-refresh-config<br>
os-apply-config<br>
<br>
Clint might be able to provide some further advice for debugging
os-*-config toolchain issues<br>
<br>
cheers<br>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"> 杨雨<div> Email: <a href="mailto:alex890714@gmail.com" target="_blank">alex890714@gmail.com</a><div>GitHub: <a href="https://github.com/AlexYangYu" target="_blank">https://github.com/AlexYangYu</a></div>
<div> Weibo: <a href="http://www.weibo.com/alexyangyu" target="_blank">http://www.weibo.com/alexyangyu</a></div></div></div>
</div>