Support Rancher on vSphere by adding extra config-drive label check and file path for cloudinit
mitchellmaler opened this issue · 2 comments
Current situation
Currently you cannot provision Flatcar Linux nodes using Rancher on vSphere due to how the cloudinit labels and paths are setup. Rancher uses rancher-machine (fork of docker-machine) and it creates a config drive with the label cidata and the root path just has the files user-data and meta-data instead of user_data/meta_data under an openstack/latest path.
https://github.com/rancher/machine/blob/master/drivers/vmwarevsphere/cloudinit.go
Impact
Unable to provision Flatcar using Rancher 2 on vSphere.
Ideal future situation
Ability to provision Flatcar nodes using Rancher 2 on vSphere.
Implementation options
Add check to cloudinit to look for a drive label cidata and user-data and meta-data files in the root path of the drive as a cloud-init source.
Note: Usage of ignition is not possible right now due to Rancher (rancher-machine) only supporting cloud-init.
Sounds like a good idea. You would need to implement a new config drive backend (https://github.com/flatcar-linux/coreos-cloudinit/blob/cfcc44197d11f44441e5aa2c9db34bcd0bf16015/datasource/configdrive/configdrive.go) for coreos-cloudinit.
I am running into the same issue using Proxmox as when using their standard CI support, it only attaches a drive with the label cidata
, like the NoCloud option of cloud-init.
localhost # lsblk -o name,mountpoint,label,size,uuid
NAME MOUNTPOINT LABEL SIZE UUID
sr0 cidata 4M 2023-05-01-10-28-54-00
What would be the preferred way of implementing this, either adjusting the existing unit files and backend to allow for two drive labels and two locations or re-implementing new unit files and a new NoCloud
backend?