← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~r00ta/curtin:maas-debian-cloudconfig into curtin:master

 


Diff comments:

> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index b54e3c9..c334c94 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -1689,7 +1689,9 @@ def handle_cloudconfig(cfg, base_dir=None):
>      #   generate a path based on item key
>      #   if path is already in the item, LOG warning, and use generated path
>      for cfgname, cfgvalue in cfg.items():
> -        cfgpath = "50-cloudconfig-%s.cfg" % cfgname
> +        # cloud-init on debian-like distros includes a config '90_dpkg'.
> +        # To ensure our config is applied afterward, we use a prefix > 90.
> +        cfgpath = "95-cloudconfig-%s.cfg" % cfgname

> old_dpkg_cfg is very old file that is no longer read by cloud-init.

Think that comment doesn't appear relevant - it's just explaining that cloud-init used to use a different file name.

> I need an explanation here on what's really going on.

Configurations in /etc/cloud/cloud.cfg.d/ override the cloud.cfg file. Files which sort later override earlier ones.

> This is not what I've observed, that 90_dpkg file is still used by cloud init and using a prefix < 90 is not working (in noble, at least).

This file is shipped in many Ubuntu images. `dpkg-reconfigure` is typically the source of this file-> https://github.com/canonical/cloud-init/blob/2be760ba5b55d50e93a0486548a449a63008a7f0/debian/cloud-init-base.postinst#L287

>          if 'path' in cfgvalue:
>              LOG.warning("cloudconfig ignoring 'path' key in config")
>          cfgvalue['path'] = cfgpath


-- 
https://code.launchpad.net/~r00ta/curtin/+git/curtin/+merge/486221
Your team curtin developers is requested to review the proposed merge of ~r00ta/curtin:maas-debian-cloudconfig into curtin:master.



References