user-data via CDROM

Perry Myers pmyers at redhat.com
Mon Dec 10 17:03:25 UTC 2012


On 12/10/2012 12:00 PM, Shahar Havivi wrote:
> On 10.12.12 10:55, jvlcek wrote:
>> Shahar,
>>
>> It's complaining about the ec2-user not being there?
>>
>> Are you specifying the ec2-user in the cloud-init.conf file or are you just
>> using root?
> No,
> Where is this file suppose to be?

That version of cloud-init should be released with the RHEL 6.4 public
beta last week.

It could be that the file is not properly showing up on the beta
channel.  If you have access to the 6.4 Beta channels, there's the core
channel, optional, supplementary and then there should be a new RHEL
Common channel where cloud-init lives.

Can you see if you have access to this channel?

(adding some add'l folks to help with details on how to get access to
that channel)

Perry

>>
>> The version of cloud-init you are using is also a bit old. The user
>> creation/
>> default user handling has changed. We are targeting cloud-init-0.7.1-2 for
>> RHEL6.4
> I will try that with Fedora 18 which have cloud-init-0.7.1-1
>>
>> Joe
>>
>>
>> On 12/10/2012 09:38 AM, Shahar Havivi wrote:
>>> On 10.12.12 09:11, jvlcek wrote:
>>>> Shahar,
>>>>
>>>> Are you launching on EC2 or a different cloud backend?
>>> No, I am testing on oVirt.
>>> The log is different now, and there is some exception regarding
>>> apply_credentials().
>>> Attaching the new log, look at the last run where the lines starts with:
>>> Dec 10 16:31:12 vm-17-184
>>>
>>> Thank you,
>>> Shahar.
>>>> If EC2, I am not sure, but I don't think you can set an VM's IP address
>>>> on EC2. So you might be encountering an EC2 issue.
>>>>
>>>> It looks as if you are not using user-data alone but the yaml formated
>>>> meta-data, which user-data can be a part of, in a iso or vfat filesystem
>>>> with a known label.
>>>>
>>>> The log below may be from one of your earlier runs, before you
>>>> started using genisoimage to pass in the meta-data. Does the lates
>>>> log file and shed any light on the IP address issue?
>>>>
>>>> I'm not overly familiar with it but I know there is a utility in cloud-utils
>>>> called 'cloud-localds' [1] that creates a iso or vfat.  the --help
>>>> output will
>>>> give example usage, and you can  look at the created disk image.
>>>>
>>>> If you are launching on Openstack it uses the data source:
>>>> "config-drive-v2",
>>>> which is an option for passing metadata to instances in OpenStack folsom
>>>> and later (doc added at [2])
>>>>
>>>> [1]
>>>> http://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/view/head:/bin/cloud-localds
>>>>
>>>> [2] https://review.openstack.org/#/c/16504/
>>>>
>>>>
>>>> Hope this helps and let me know what the latest log file shows if you
>>>> need more help.
>>>>
>>>> Joe
>>>>
>>>> On 12/10/2012 06:31 AM, Shahar Havivi wrote:
>>>>> Hi,
>>>>> I had a little progress but still I have a questions.
>>>>> I can set the hostname but not the ip:
>>>>> meta-data:
>>>>>     instance-id: iid-test4
>>>>>     local-hostname: test4
>>>>>     local-ipv4: 192.168.1.1
>>>>>
>>>>> the ip field is ignored...
>>>>> what interface does the ip suppose to set if I have a few?
>>>>>
>>>>>
>>>>> On 09.12.12 16:21, Shahar Havivi wrote:
>>>>>> Update:
>>>>>> I manage to change the host name when I generate the iso via:
>>>>>> $ genisoimage  -output seed.iso -volid cidata -joliet -rock user-data meta-data
>>>>>>
>>>>>> On 09.12.12 15:23, Shahar Havivi wrote:
>>>>>>> Hi,
>>>>>>> I am trying to configure RHEL 6.3 via cloud-init.
>>>>>>> I am using cloud-init-0.6.3-0.7.bzr532.el6.noarch package and have a RHEL 6.3
>>>>>>> guest os.
>>>>>>>
>>>>>>> iso format ant label are:
>>>>>>> [root at vm-17-184 cloudinit]# blkid /dev/sr0
>>>>>>> /dev/sr0: LABEL="cidata" TYPE="iso9660"
>>>>>>>
>>>>>>> iso file content:
>>>>>>> [root at vm-17-184 cdrom]# cat meta-data 
>>>>>>> instance-id: iid-abcdefg
>>>>>>> network-interfaces: |
>>>>>>>   iface eth0 inet static
>>>>>>>   address 192.168.1.10
>>>>>>>   network 192.168.1.0
>>>>>>>   netmask 255.255.255.0
>>>>>>>   broadcast 192.168.1.255
>>>>>>>   gateway 192.168.1.254
>>>>>>>
>>>>>>> and I try the user-data file:
>>>>>>> [root at vm-17-184 ~]# cat cdrom/user-data 
>>>>>>> hostname: mynode
>>>>>>> fqdn: mynode.example.com
>>>>>>> manage_etc_hosts: true
>>>>>>>
>>>>>>>
>>>>>>> There is no effect on the IP address or host name, am I doing something wrong?
>>>>>>>
>>>>>>> Attached the cloud-init.log
>>>>>>> Thank you,
>>>>>>> Shahar Havivi.
>>>>>>> Dec  6 06:07:18 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Thu, 06 Dec 2012 04:07:18 +0000. up 13.90 seconds
>>>>>>> Dec  6 06:07:19 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  6 06:07:19 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  6 06:07:19 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start running: Thu, 06 Dec 2012 04:07:19 +0000. up 14.63 seconds
>>>>>>> Dec  6 06:07:19 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  6 06:07:19 vm-17-184 [CLOUDINIT] DataSourceEc2.py[DEBUG]: removed the following from metadata urls: ['http://instance-data:8773']
>>>>>>> Dec  6 06:08:09 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out]
>>>>>>> Dec  6 06:09:00 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: url error [timed out]
>>>>>>> Dec  6 06:09:18 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: url error [timed out]
>>>>>>> Dec  6 06:09:19 vm-17-184 [CLOUDINIT] DataSourceEc2.py[CRITICAL]: giving up on md after 120 seconds
>>>>>>> Dec  6 06:09:19 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 01:17:32 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Sat, 08 Dec 2012 23:17:32 +0000. up 13.67 seconds
>>>>>>> Dec  9 01:17:32 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 01:17:32 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 01:17:33 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start running: Sat, 08 Dec 2012 23:17:33 +0000. up 14.12 seconds
>>>>>>> Dec  9 01:17:33 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 01:17:35 vm-17-184 [CLOUDINIT] DataSourceEc2.py[DEBUG]: removed the following from metadata urls: ['http://instance-data:8773']
>>>>>>> Dec  9 01:18:25 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out]
>>>>>>> Dec  9 01:19:16 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: url error [timed out]
>>>>>>> Dec  9 01:19:34 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: url error [timed out]
>>>>>>> Dec  9 01:19:35 vm-17-184 [CLOUDINIT] DataSourceEc2.py[CRITICAL]: giving up on md after 120 seconds
>>>>>>> Dec  9 01:19:35 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 01:53:25 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Sat, 08 Dec 2012 23:53:25 +0000. up 14.37 seconds
>>>>>>> Dec  9 01:53:25 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 01:53:25 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 01:53:25 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start running: Sat, 08 Dec 2012 23:53:25 +0000. up 14.83 seconds
>>>>>>> Dec  9 01:53:25 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 01:53:27 vm-17-184 [CLOUDINIT] DataSourceEc2.py[DEBUG]: removed the following from metadata urls: ['http://instance-data:8773']
>>>>>>> Dec  9 01:54:18 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out]
>>>>>>> Dec  9 01:55:09 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: url error [timed out]
>>>>>>> Dec  9 01:55:27 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: url error [timed out]
>>>>>>> Dec  9 01:55:28 vm-17-184 [CLOUDINIT] DataSourceEc2.py[CRITICAL]: giving up on md after 120 seconds
>>>>>>> Dec  9 01:55:28 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 02:13:35 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Sun, 09 Dec 2012 00:13:35 +0000. up 11.82 seconds
>>>>>>> Dec  9 02:13:35 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 02:13:36 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
>>>>>>> Dec  9 02:13:36 vm-17-184 [CLOUDINIT] cloud-init[INFO]: cloud-init start running: Sun, 09 Dec 2012 00:13:36 +0000. up 12.31 seconds
>>>>>>> Dec  9 02:13:36 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>>>>>> Dec  9 02:13:36 vm-17-184 [CLOUDINIT] DataSourceEc2.py[DEBUG]: removed the following from metadata urls: ['http://instance-data:8773']
>>>>>>> Dec  9 02:14:26 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out]
>>>>>>> Dec  9 02:15:17 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: url error [timed out]
>>>>>>> Dec  9 02:15:35 vm-17-184 [CLOUDINIT] DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: url error [timed out]
>>>>>>> Dec  9 02:15:36 vm-17-184 [CLOUDINIT] DataSourceEc2.py[CRITICAL]: giving up on md after 120 seconds
>>>>>>> Dec  9 02:15:36 vm-17-184 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceEc2']
>>



More information about the cloud mailing list