[rhos-list] EXTERNAL: Re: Passing user-data.

Minton, Rich rich.minton at lmco.com
Mon Jun 17 13:45:23 UTC 2013


I don't have a file "userdata.txt" in /var/lib/cloud/. I put cloud-init in debug mode but all I see is /var/lib/cloud/instance/boot-finished being written at completion.

From: Steven Dake [mailto:sdake at redhat.com]
Sent: Friday, June 14, 2013 4:03 PM
To: Minton, Rich
Cc: Perry Myers; Julie Pichon; Matthias Runge; rhos-list at redhat.com
Subject: Re: [rhos-list] EXTERNAL: Re: Passing user-data.

On 06/14/2013 12:35 PM, Minton, Rich wrote:

Additional info:



I have the latest cloud-init installed in my images, cloud-init-0.7.1-2.el6.noarch.

When I run "curl http://169.254.169.254/2009-04-04/user-data" inside my instance the command returns the metadata I passed in the "Configuration Script" field in Horizon Dashboard but the script is not run during boot of the instance.





Rick
Rick,

Couple possibilities
a) Cloud-init is not downloading the userdata
b) The userdata is not formatted in a way that cloud-init can understand

To eliminate A, check for a file called
/var/lib/cloud/userdata.txt

If this file is present, cloudinit has downloaded the userdata

In order to actually run the data, the userdata must be formatted as a mime multipart message with a cloud-config file as well as a cloud-boothook mime type.  I don't think there is a generic way to run a userdata command with cloudinit without formatting it into a mime multipart message.

It may be that horizon doesn't do this for you, since the formatting of the mime multipart message is cloud-init specific.

See:
http://sdake.wordpress.com/2013/03/03/how-we-use-cloudinit-in-openstack-heat/

I believe the OpenStack docs and tools like Horizon (correct me if I'm wrong Horizon core devs) are designed with using cirros images in mind, which do a curl on the address you mentioned and run that script in rc.local.

This is different then how cloud-init behaves.

Regards
-steve


-----Original Message----- From: Perry Myers [mailto:pmyers at redhat.com] Sent: Friday, June 14, 2013 3:10 PM To: Minton, Rich; Julie Pichon; Matthias Runge Cc: rhos-list at redhat.com<mailto:rhos-list at redhat.com> Subject: EXTERNAL: Re: [rhos-list] Passing user-data. Adding some of our horizon folks in case they miss this On 06/14/2013 11:34 AM, Minton, Rich wrote:

Has anyone had any success passing user-data within the Horizon

Dashboard when launching an instance? If so, what is the secret?







Thanks in advance.



Rick





_______________________________________________

rhos-list mailing list

rhos-list at redhat.com<mailto:rhos-list at redhat.com>

https://www.redhat.com/mailman/listinfo/rhos-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhos-list/attachments/20130617/9a8745f0/attachment.htm>


More information about the rhos-list mailing list