← Back to team overview

cloud-init team mailing list archive

The "maybe trap"

 

Hi,

On aarch64 we are falling into the DS_MAYBE from [1] trap. While I do not see any particular reason not to have a

aarch64) :;;

case to make this deterministic on aarch64 it does ultimately only work as long as what we are doing sticks to those architectures.

As such I'd really like to get a better understanding why DS_MAYBE exists. The way I see it it let's ds-identify kind of bail out and pass the responsibility of identifying a data source to cloud-init by enabling cloud-init.target.

And this is where we are tripping over because we check if cloud-init got enabled and if it did we skip other stuff. But in this case we need other stuff to happen.

So instead of checking on whether or not cloud-init got enabled would it make more sense to check what is in /run/cloud-init/cloud-id?

If it contains "none" do our special stuff?

Thanks,
Robert

[1] https://github.com/canonical/cloud-init/blob/main/tools/ds-identify#L1368

--
Robert Schweikert                   MAY THE SOURCE BE WITH YOU
Distinguished Engineer                       LINUX
rjschwei@xxxxxxxx
IRC: robjo


Follow ups