I dug around some on this, and talked a bit to Robert Jennings who gave me some more info.
softlayer works to feed cloud-init a datasource in 2 ways
a.) /var/lib/cloud/seed/nocloud-net/ has data in it in the image.
/etc/cloud/cloud.cfg.d/99_networklayer_common.cfg contained
datasource_list: [ ConfigDrive, NoCloud ]
b.) if user provides metadata (or userdata) then a disk (xvdh1) is attached
that has openstack config drive like data on it.
of note here is that it contains *only* 'latest' as the version.
I really dont like that they provided the versioned information 'latest'.
I consider it a bug that cloud-init reads that at all.
The best way forward here is either:
1.) modify the openstack datasource (and ds-identify) to consider this 'METADATA' disk to be a ConfigDrive. That will actually mean that Ubuntu images do not need the tricks they have to mount that disk over /var/lib/cloud/seed/config-drive and would also remove some possible race conditions there. What I don't like about this is that the word 'METADATA' is so generic, and ds-identify doesn't actually mount anything, meaning it could return true for this datasource on someone elses system that just happened to have a disk named METADATA.
2.) create a specific datasource for softlayer that basically just does the above, but only in more specific scenario and not enabled by default.
Heres some information for my own reference later.
I dug around some on this, and talked a bit to Robert Jennings who gave me some more info. cloud/seed/ nocloud- net/ has data in it in the image. cloud/cloud. cfg.d/99_ networklayer_ common. cfg contained list: [ ConfigDrive, NoCloud ]
softlayer works to feed cloud-init a datasource in 2 ways
a.) /var/lib/
/etc/
datasource_
b.) if user provides metadata (or userdata) then a disk (xvdh1) is attached
that has openstack config drive like data on it.
of note here is that it contains *only* 'latest' as the version.
I really dont like that they provided the versioned information 'latest'.
I consider it a bug that cloud-init reads that at all.
The best way forward here is either: cloud/seed/ config- drive and would also remove some possible race conditions there. What I don't like about this is that the word 'METADATA' is so generic, and ds-identify doesn't actually mount anything, meaning it could return true for this datasource on someone elses system that just happened to have a disk named METADATA.
1.) modify the openstack datasource (and ds-identify) to consider this 'METADATA' disk to be a ConfigDrive. That will actually mean that Ubuntu images do not need the tricks they have to mount that disk over /var/lib/
2.) create a specific datasource for softlayer that basically just does the above, but only in more specific scenario and not enabled by default.
Heres some information for my own reference later.
# sudo blkid "3d631e09- 01" 6b10-4934- a572-f3898dfd88 40" TYPE="swap" PARTUUID= "00025cdb- 01" cloudimg- bootfs" UUID="85caed83- 8815-4770- 94b5-853ca2e034 31" TYPE="ext3" PARTUUID= "974bb19a- 01" cloudimg- rootfs" UUID="22ca45b9- 13f2-481d- 9251-0dd08d36ea ce" TYPE="ext4" PARTUUID= "974bb19a- 02"
/dev/xvdh1: SEC_TYPE="msdos" LABEL="METADATA" UUID="681B-8C5D" TYPE="vfat" PARTUUID=
/dev/xvdb1: LABEL="SWAP-xvdb1" UUID="d51fcca0-
/dev/xvda1: LABEL="
/dev/xvda2: LABEL="
# mount /dev/xvdh1 /mnt /sh\r\nssh- import- id smoser"] latest/ user_data == latest/ meta_data. json == :[[]]," network_ config" :{"content_ path":" \/content\ /interfaces" },"hostname" :"smfoo2" ,"name" :"smfoo2" ,"domain" :"softlayer. brickies. net","meta" :{"dsmode" :"net"} ,"uuid" :"f20e93bb- 212e-2a17- 6d70-c33dbf891c 12"} content/ interfaces ==
# ( cd /mnt && for f in $(find * -type f); do echo == $f ==; cat $f; echo; done )
== meta.js ==
["#!\/bin\
== openstack/
#!/bin/sh
ssh-import-id smoser
== openstack/
{"files"
== openstack/
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.170.230.200
netmask 255.255.255.192
post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.170.230.193
post-up route add -net 161.26.0.0 netmask 255.255.0.0 gw 10.170.230.193
auto eth1
allow-hotplug eth1
iface eth1 inet static
address 169.45.206.71
netmask 255.255.255.240
gateway 169.45.206.65
# rm -f /run/cloud- init/ds- identify. log cloud-init/ ds-identify --force init/ds- identify. log init/ds- identify. log cloud.cfg. d/99_networklay er_common. cfg set datasource_list: [ ConfigDrive, NoCloud ] NAME=unavailabl e VENDOR= unavailable SERIAL= unavailable UUID=unavailabl e unavailable METADATA, SWAP-xvdb1, cloudimg- bootfs, cloudimg- rootfs CMDLINE= root=UUID= 22ca45b9- 13f2-481d- 9251-0dd08d36ea ce ro console=hvc0 elevator=noop NAME=Linux RELEASE= 4.4.0-45- generic VERSION= #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 smfoo2 _SYSTEM= GNU/Linux ConfigDrive'
# sudo DEBUG_LEVEL=3 /usr/lib/
# cat /run/cloud-
# cat /run/cloud-
[up 11015.19s] ds-identify --force
policy loaded: mode=report report=false found=all maybe=all notfound=enabled
/etc/cloud/
DMI_PRODUCT_
DMI_SYS_
DMI_PRODUCT_
DMI_PRODUCT_
PID_1_PLATFORM=
FS_LABELS=
KERNEL_
VIRT=xen
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_MACHINE=
UNAME_NODENAME=
UNAME_OPERATING
DSNAME=
DSLIST=ConfigDrive NoCloud
MODE=report
ON_FOUND=all
ON_MAYBE=all
ON_NOTFOUND=enabled
pid=10895 ppid=10894
is_container=false
Checking for datasource 'ConfigDrive' via 'dscheck_
check for 'ConfigDrive' returned not-found[1]
Checking for datasource 'NoCloud' via 'dscheck_NoCloud'
check for 'NoCloud' returned found
found=NoCloud maybe=
Found single datasource: NoCloud
[up 11015.24s] returning 0