yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #82493
[Bug 1876375] [NEW] datasource from earlier file with datasource_list not used
Public bug reported:
Cloud-init version 20.1-10-g71af48df-0ubuntu5 from a core20 image
I added a file called 98_nocloud.cfg that looks like this:
----------
#cloud-config
datasource_list: [ NoCloud, None ]
datasource:
NoCloud:
user-data: |
#cloud-config
users:
- name: ubuntu
ssh-authorized-keys:
- <MY_SSH_KEY>
homedir: /home/ubuntu
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
meta-data: |
instance_id: cloud-image
----------
== Reproducing ==
1. create a usb stick, or kvm image for core20
2. place the above file in the ubuntu-seed partition under /data/etc/cloud/cloud.cfg.d/98_nocloud.cfg
=================
When I boot, the datasource is not used and cloud-init does not process it *unless* I also include this line at the top:
datasource_list: [ NoCloud, None ]
This was surprising though, because another existing file in /etc/cloud/cloud.cfg.d called 90_dpkg.cfg has these contents:
# to update this file, run dpkg-reconfigure cloud-init
datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Hetzner, IBMCloud, Oracle, Exoscale, RbxCloud, None ]
Here are the contents of /run/cloud-init/ds_identify.log when it fails:
[up 4.57s] ds-identify
policy loaded: mode=search report=false found=first maybe=none notfound=disabled
/etc/cloud/cloud.cfg.d/90_dpkg.cfg set datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Hetzner, IBMCloud, Oracle, Exoscale, RbxCloud, None ]
DMI_PRODUCT_NAME=Standard PC (i440FX + PIIX, 1996)
DMI_SYS_VENDOR=QEMU
DMI_PRODUCT_SERIAL=
DMI_PRODUCT_UUID=unavailable
PID_1_PRODUCT_NAME=unavailable
DMI_CHASSIS_ASSET_TAG=
FS_LABELS=ubuntu-seed,ubuntu-boot,ubuntu-data
ISO9660_DEVS=
KERNEL_CMDLINE=snapd_recovery_mode=run console=ttyS0 console=tty1 panic=-1
VIRT=kvm
UNAME_KERNEL_NAME=Linux
UNAME_KERNEL_RELEASE=5.4.0-26-generic
UNAME_KERNEL_VERSION=#30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020
UNAME_MACHINE=x86_64
UNAME_NODENAME=ubuntu
UNAME_OPERATING_SYSTEM=GNU/Linux
DSNAME=
DSLIST=NoCloud ConfigDrive OpenNebula DigitalOcean Azure AltCloud OVF MAAS GCE OpenStack CloudSigma SmartOS Bigstep Scaleway AliYun Ec2 CloudStack Hetzner IBMCloud Oracle Exoscale RbxCloud None
MODE=search
ON_FOUND=first
ON_MAYBE=none
ON_NOTFOUND=disabled
pid=607 ppid=591
is_container=false
is_ds_enabled(IBMCloud) = true.
is_ds_enabled(IBMCloud) = true.
ec2 platform is 'Unknown'.
No ds found [mode=search, notfound=disabled]. Disabled cloud-init [1]
[up 4.76s] returning 1
** Affects: cloud-init
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1876375
Title:
datasource from earlier file with datasource_list not used
Status in cloud-init:
New
Bug description:
Cloud-init version 20.1-10-g71af48df-0ubuntu5 from a core20 image
I added a file called 98_nocloud.cfg that looks like this:
----------
#cloud-config
datasource_list: [ NoCloud, None ]
datasource:
NoCloud:
user-data: |
#cloud-config
users:
- name: ubuntu
ssh-authorized-keys:
- <MY_SSH_KEY>
homedir: /home/ubuntu
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
meta-data: |
instance_id: cloud-image
----------
== Reproducing ==
1. create a usb stick, or kvm image for core20
2. place the above file in the ubuntu-seed partition under /data/etc/cloud/cloud.cfg.d/98_nocloud.cfg
=================
When I boot, the datasource is not used and cloud-init does not process it *unless* I also include this line at the top:
datasource_list: [ NoCloud, None ]
This was surprising though, because another existing file in /etc/cloud/cloud.cfg.d called 90_dpkg.cfg has these contents:
# to update this file, run dpkg-reconfigure cloud-init
datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Hetzner, IBMCloud, Oracle, Exoscale, RbxCloud, None ]
Here are the contents of /run/cloud-init/ds_identify.log when it fails:
[up 4.57s] ds-identify
policy loaded: mode=search report=false found=first maybe=none notfound=disabled
/etc/cloud/cloud.cfg.d/90_dpkg.cfg set datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Hetzner, IBMCloud, Oracle, Exoscale, RbxCloud, None ]
DMI_PRODUCT_NAME=Standard PC (i440FX + PIIX, 1996)
DMI_SYS_VENDOR=QEMU
DMI_PRODUCT_SERIAL=
DMI_PRODUCT_UUID=unavailable
PID_1_PRODUCT_NAME=unavailable
DMI_CHASSIS_ASSET_TAG=
FS_LABELS=ubuntu-seed,ubuntu-boot,ubuntu-data
ISO9660_DEVS=
KERNEL_CMDLINE=snapd_recovery_mode=run console=ttyS0 console=tty1 panic=-1
VIRT=kvm
UNAME_KERNEL_NAME=Linux
UNAME_KERNEL_RELEASE=5.4.0-26-generic
UNAME_KERNEL_VERSION=#30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020
UNAME_MACHINE=x86_64
UNAME_NODENAME=ubuntu
UNAME_OPERATING_SYSTEM=GNU/Linux
DSNAME=
DSLIST=NoCloud ConfigDrive OpenNebula DigitalOcean Azure AltCloud OVF MAAS GCE OpenStack CloudSigma SmartOS Bigstep Scaleway AliYun Ec2 CloudStack Hetzner IBMCloud Oracle Exoscale RbxCloud None
MODE=search
ON_FOUND=first
ON_MAYBE=none
ON_NOTFOUND=disabled
pid=607 ppid=591
is_container=false
is_ds_enabled(IBMCloud) = true.
is_ds_enabled(IBMCloud) = true.
ec2 platform is 'Unknown'.
No ds found [mode=search, notfound=disabled]. Disabled cloud-init [1]
[up 4.76s] returning 1
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1876375/+subscriptions
Follow ups