Comment 6 for bug 1374115

Scott Moser (smoser) wrote :

In cloud-init right now we have the following inputs of configuration data, in increasing order of precedence.

a.) system configuration in /etc/cloud/cloud.cfg
b.) system configuration in /etc/cloud/cloud.cfg.d/*.cfg
    these are increasing in C locale sorted order (thus they use XX-name.cfg , XX being a number, for more obvious sorting).
c.) datasource
d.) vendor-data
e.) user-data

As it is, there is no way then to override the 'disk_setup' and 'fs_setup' configuration that azure datasource provides.

One path to this would be to change the azure datasource to read:
 Datasource:
   Azure:
    cloud_config:
      disk_setup: ...
      fs_setup: ...

Then the datasource check to see if there were values in the passed-in ds_cfg, and use those instead of its BUILTIN_CLOUD_CONFIG if there were.

That could work, but without further thinking I dont know oif it would suffice. The datasource object is generally pretty static , and cloud-init might not re-read it on second boot (after the user had configured the new settings).