On Fri, Feb 14, 2020 at 5:02 PM Michael Johnson <johnsomor@gmail.com> wrote:
I haven't had time to look at your logs, but I can tell you that configdrive has worked in the Ubuntu images since at least Xenial (I am pretty sure trusty, but I can't remember for sure). The Octavia project uses it exclusively for the amphora instances.
I'm not sure where you got your image, but there is a setting for cloud-init that defines which data sources it will use. For Octavia we explicitly set this in our images to only poll configdrive to speed the boot process.
We build our images using diskimage-builder, and this element (script) is the component we use to set the cloud-init datasource:
https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder...
Maybe check the settings for cloud-init inside your image by grep for "datasource_list" in /etc/cloud/cloud.cfg.d/* ?
Michael
On Fri, Feb 14, 2020 at 11:29 AM Ignazio Cassano <ignaziocassano@gmail.com> wrote:
Hello, at the following link you can find the cloud init logs file:
https://drive.google.com/open?id=1IXp85kfLAC4H3Jp2pHrkwij61XWiFNva
PS I can mount and read metadata mount manually the cdrom and I do not understand why cloud-init cannot. Ignazio
Il giorno ven 14 feb 2020 alle ore 20:14 Ignazio Cassano <ignaziocassano@gmail.com> ha scritto:
Hello, attaced here thera are the cloud-init logs form ubuntu 18 instance. Note I can mount /dev/cdrom and see metadata: mount -o ro /dev/cdrom /mnt ls -laR /mnt total 10 dr-xr-xr-x 4 root root 2048 Feb 14 17:05 . drwxr-xr-x 24 root root 4096 Feb 14 17:08 .. dr-xr-xr-x 4 root root 2048 Feb 14 17:05 ec2 dr-xr-xr-x 11 root root 2048 Feb 14 17:05 openstack
/mnt/ec2: total 8 dr-xr-xr-x 4 root root 2048 Feb 14 17:05 . dr-xr-xr-x 4 root root 2048 Feb 14 17:05 .. dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2009-04-04 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 latest
/mnt/ec2/2009-04-04: total 5 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 4 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 963 Feb 14 17:05 meta-data.json
/mnt/ec2/latest: total 5 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 4 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 963 Feb 14 17:05 meta-data.json
/mnt/openstack: total 22 dr-xr-xr-x 11 root root 2048 Feb 14 17:05 . dr-xr-xr-x 4 root root 2048 Feb 14 17:05 .. dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2012-08-10 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2013-04-04 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2013-10-17 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2015-10-15 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2016-06-30 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2016-10-06 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2017-02-22 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 2018-08-27 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 latest
/mnt/openstack/2012-08-10: total 6 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1056 Feb 14 17:05 meta_data.json
/mnt/openstack/2013-04-04: total 6 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1759 Feb 14 17:05 meta_data.json
/mnt/openstack/2013-10-17: total 7 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1759 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json
/mnt/openstack/2015-10-15: total 7 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1809 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json
/mnt/openstack/2016-06-30: total 7 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1824 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json
/mnt/openstack/2016-10-06: total 8 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1824 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json -r--r--r-- 1 root root 14 Feb 14 17:05 vendor_data2.json
/mnt/openstack/2017-02-22: total 8 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1824 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json -r--r--r-- 1 root root 14 Feb 14 17:05 vendor_data2.json
/mnt/openstack/2018-08-27: total 8 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1824 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json -r--r--r-- 1 root root 14 Feb 14 17:05 vendor_data2.json
/mnt/openstack/latest: total 8 dr-xr-xr-x 2 root root 2048 Feb 14 17:05 . dr-xr-xr-x 11 root root 2048 Feb 14 17:05 .. -r--r--r-- 1 root root 1824 Feb 14 17:05 meta_data.json -r--r--r-- 1 root root 397 Feb 14 17:05 network_data.json -r--r--r-- 1 root root 2 Feb 14 17:05 vendor_data.json -r--r--r-- 1 root root 14 Feb 14 17:05 vendor_data2.json
Thanks Ignazio
Il giorno ven 14 feb 2020 alle ore 19:16 Jeremy Stanley <fungi@yuggoth.org> ha scritto:
On 2020-02-14 17:51:01 +0100 (+0100), Ignazio Cassano wrote:
Hello, I configured config drive and centos instances works fine with it. Ubuntu bionic tries to get metadata from network and cloud-init does not set hostname and does not insert keys for ssh.
The cloud-init changelog indicates that initial support for configdrive first appeared in 0.6.3, so the versions in Ubuntu Bionic (and even Xenial) should be new enough to make use of it. In fact, the official Ubuntu bionic-updates package suite includes cloud-init 19.4 (the most recent release), so missing features/support seem unlikely. Detailed log entries from cloud-init running at boot might help in diagnosing the problem. -- Jeremy Stanley
Lately I have been using glean for my own images and I do believe the openstack CI uses it as well. Works great for me. https://docs.openstack.org/infra/glean/ -- ~/DonnyD C: 805 814 6800 "No mission too difficult. No sacrifice too great. Duty First"