canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
3.02k stars 888 forks source link

Unable to identify datasource in IBM Bluemix #2884

Closed ubuntu-server-builder closed 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1689890

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2022-11-03T09:40:05.982457+00:00
date_created = 2017-05-10T18:54:43.510844+00:00
date_fix_committed = None
date_fix_released = None
id = 1689890
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1689890
milestone = None
owner = conslo
owner_name = Travis Johnson
private = False
status = wont_fix
submitter = conslo
submitter_name = Travis Johnson
tags = ['dsid', 'dsid-block-xenial', 'id-591ce7b554857f22b9aa2dd7']
duplicates = []

Launchpad user Travis Johnson(conslo) wrote on 2017-05-10T18:54:43.510844+00:00


A new feature in cloud-init identified possible datasources for

this system as:

['NoCloud', 'None']

However, the datasource used was: ConfigDrive

In the future, cloud-init will only attempt to use datasources that

are identified or specifically configured.

For more information see

https://bugs.launchpad.net/bugs/1669675

If you are seeing this message, please file a bug against

cloud-init at

https://bugs.launchpad.net/cloud-init/+filebug?field.tags=dsid

Make sure to include the cloud provider your instance is

running on.

After you have filed a bug, you can disable this warning by launching

your instance with the cloud-config below, or putting that content

into /etc/cloud/cloud.cfg.d/99-warnings.cfg

cloud-config

warnings:

dsid_missing_source: off


Disable the warnings above by:   touch /root/.cloud-warnings.skip or   touch /var/lib/cloud/instance/warnings/.skip

This is in IBM Bluemix, I believe they use openstack (as hinted below)

I don't know anything about cloud-init data sources, but here's how I retrieve user_data manually from within these instances:

root@:~# mkdir -p /tmp/meta root@:~# mount /dev/xvdh1 /tmp/meta root@:~# tree /tmp/meta /tmp/meta ├── meta.js └── openstack     ├── content     │   └── interfaces     └── latest         ├── meta_data.json         └── user_data

3 directories, 4 files root@:~#

Related bugs:

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-05-17T20:44:07.922127+00:00

This is going to take some work. The cloud-images built to run on IBM Bluemix are very odd. To my understanding, they actually have data in /var/lib/cloud/nocloud and then sometimes also have a config drive attached. I'm not sure if the config drive has a valid label or not (config-v2).

I'm going to need some help from CPC team here.

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-05-17T21:06:15.815966+00:00

I've just confirmed this, launched a vm in bluemix/softlayer and ssh'd in.

root@smfoo:~# cat /etc/cloud/build.info build_name: server serial: 20170330 root@smfoo:~# dpkg-query --show cloud-init cloud-init 0.7.9-48-g1c795b9-0ubuntu1~16.04.1

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-05-17T21:10:11.320316+00:00

After seeing the warning, I did: $ sudo umount /var/lib/cloud/seed/config_drive $ sudo rm -Rf /var/lib/cloud/seed/config_drive/ /var/lib/cloud/{data,handlers,instance,instances,scripts,sem}

$ sudo apt-get update && sudo apt-get install cloud-init ... Setting up cloud-init (0.7.9-113-g513e99e0-0ubuntu1~16.04.1) ...

$ sudo reboot

I still see the warnings.

cat /run/cloud-init/ds-identify.log

[up 3.82s] ds-identify policy loaded: mode=report report=false found=all maybe=all notfound=enabled /etc/cloud/cloud.cfg.d/99_networklayer_common.cfg set datasource_list: [ ConfigDrive, NoCloud ] DMI_PRODUCT_NAME=unavailable DMI_SYS_VENDOR=unavailable DMI_PRODUCT_SERIAL=unavailable DMI_PRODUCT_UUID=unavailable PID_1_PRODUCT_NAME=unavailable FS_LABELS=SWAP-xvdb1,cloudimg-bootfs,cloudimg-rootfs,METADATA KERNEL_CMDLINE=root=UUID=52c6959b-79b0-4bdd-8ed6-71e0ba782fb4 ro console=hvc0 elevator=noop
VIRT=xen UNAME_KERNEL_NAME=Linux UNAME_KERNEL_RELEASE=4.4.0-71-generic UNAME_KERNEL_VERSION=#92-Ubuntu SMP Fri Mar 24 12:59:01 UTC 2017 UNAME_MACHINE=x86_64 UNAME_NODENAME=smfoo UNAME_OPERATING_SYSTEM=GNU/Linux DSNAME= DSLIST=ConfigDrive NoCloud MODE=report ON_FOUND=all ON_MAYBE=all ON_NOTFOUND=enabled pid=318 ppid=309 is_container=false check for 'NoCloud' returned found Found single datasource: NoCloud [up 3.95s] returning 0

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-05-31T16:03:21.558252+00:00

Daniel grabbed some more info from a node that i had neglected. not necessarily helpful, but $ sudo sh -c 'cd /sys/hypervisor && grep -r . *' compilation/compiled_by:mockbuild compilation/compile_date:Mon Apr 24 15:29:46 UTC 2017 compilation/compiler:gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) properties/pagesize:1000 properties/changeset:86f912c86501, pq 5f429748345d properties/virtual_start:ffff800000000000 properties/features:000020f0 properties/capabilities:xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 type:xen uuid:367fb048-191c-7ca9-1f86-79ee7f227a5e version/extra:.1-1.3 version/major:4 version/minor:7

more of that conversation at https://irclogs.ubuntu.com/2017/05/31/%23cloud-init.html#t15:17

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-05-31T16:05:04.029872+00:00

And some more of my thoughts in https://bugs.launchpad.net/cloud-init/+bug/1673637/comments/4

ubuntu-server-builder commented 1 year ago

Launchpad user James Falcon(falcojr) wrote on 2022-11-03T09:39:53.406870+00:00

"BlueMix" is no longer a product, and we have an IBM datasource with working checks in ds-identify.