cloud-init 18.3 cannot detect OpenStack datasource on Oracle cloud across reboots.
18.2 properly detects DataSourceOpenstack, but 18.3 added a detect_openstack helper function which fails to detect openstack datasource from the environment or DMI data matching a limit set of conditions:
- DMI system-product_name in ['OpenStack Nova', 'OpenStack Compute']
OracleCloud product-name is 'Standard PC (i440FX + PIIX, 1996)'
- DMI chassis_asset_tag in ['OpenTelekomCloud']
Oracle's chassis asset tag is 'OracleCloud.com'
- proc/1/environ:product_name == 'OpenStack Nova'
return True # Non-Intel cpus don't properly report dmi product names
product_name = util.read_dmi_data('system-product-name')
if product_name in VALID_DMI_PRODUCT_NAMES:
return True
elif util.read_dmi_data('chassis-asset-tag') in VALID_DMI_ASSET_TAGS:
return True
elif util.get_proc_env(1).get('product_name') == DMI_PRODUCT_NOVA:
Oracle's /proc/1/environ has no product_name key:
$ sudo cat /proc/1/environ
HOME=/init=/sbin/initrecovery=TERM=linuxdrop_caps=BOOT_IMAGE=/boot/vmlinuz-4.15.0-29-genericPATH=/sbin:/usr/sbin:/bin:/usr/binPWD=/rootmnt=/root
We need a more permissive detect_openstack function to allow for detecting Oracle during cloud-init's get_data() method.
cloud-init 18.3 cannot detect OpenStack datasource on Oracle cloud across reboots.
18.2 properly detects DataSourceOpens tack, but 18.3 added a detect_openstack helper function which fails to detect openstack datasource from the environment or DMI data matching a limit set of conditions:
- DMI system-product_name in ['OpenStack Nova', 'OpenStack Compute'] oud']
OracleCloud product-name is 'Standard PC (i440FX + PIIX, 1996)'
- DMI chassis_asset_tag in ['OpenTelekomCl
Oracle's chassis asset tag is 'OracleCloud.com'
- proc/1/ environ: product_ name == 'OpenStack Nova' dmi_data( 'system- product- name') PRODUCT_ NAMES: dmi_data( 'chassis- asset-tag' ) in VALID_DMI_ ASSET_TAGS: proc_env( 1).get( 'product_ name') == DMI_PRODUCT_NOVA: /sbin/initrecov ery=TERM= linuxdrop_ caps=BOOT_ IMAGE=/ boot/vmlinuz- 4.15.0- 29-genericPATH= /sbin:/ usr/sbin: /bin:/usr/ binPWD= /rootmnt= /root
return True # Non-Intel cpus don't properly report dmi product names
product_name = util.read_
if product_name in VALID_DMI_
return True
elif util.read_
return True
elif util.get_
Oracle's /proc/1/environ has no product_name key:
$ sudo cat /proc/1/environ
HOME=/init=
We need a more permissive detect_openstack function to allow for detecting Oracle during cloud-init's get_data() method.