Considering a situation where admins, users, or external automation to MAAS (e.g. Juju/Charms) modifies /etc/hosts after the initial provisioning by MAAS. Those changes will be lost immediately after a reboot.
By looking to the detail, the deployed hosts have the following:
[/etc/cloud/cloud.cfg.d/90_dpkg_local_cloud_config.cfg]
# written by cloud-init debian package per preseed entry
# cloud-init/local-cloud-config
manage_etc_hosts: true
manual_cache_clean: true
reporting:
maas:
consumer_key: Kmc8Wz45YnfQ2nT6EG
endpoint: http://192.168.151.1:5248/MAAS/metadata/status/fhq6qa
token_key: LDpwjgW5DVMPCdZRrH
token_secret: 9neUuyUPdBwamfCw4JBLjvH86TAnQvDf
type: webhook
1:3.4.5- 14373-g. ab434d5402- 0ubuntu1~ 22.04.1
Considering a situation where admins, users, or external automation to MAAS (e.g. Juju/Charms) modifies /etc/hosts after the initial provisioning by MAAS. Those changes will be lost immediately after a reboot.
By looking to the detail, the deployed hosts have the following:
[/etc/cloud/ cloud.cfg. d/90_dpkg_ local_cloud_ config. cfg] local-cloud- config 192.168. 151.1:5248/ MAAS/metadata/ status/ fhq6qa w4JBLjvH86TAnQv Df
# written by cloud-init debian package per preseed entry
# cloud-init/
manage_etc_hosts: true
manual_cache_clean: true
reporting:
maas:
consumer_key: Kmc8Wz45YnfQ2nT6EG
endpoint: http://
token_key: LDpwjgW5DVMPCdZRrH
token_secret: 9neUuyUPdBwamfC
type: webhook
And the explicit manage_ etc_hosts= true (non default in cloud-init) is coming from MAAS generated curtin config. /cloudinit. readthedocs. io/en/latest/ reference/ yaml_examples/ update_ etc_hosts. html
https:/
[/root/ curtin- install- cfg.yaml] datasources multiselect MAAS
debconf_selections:
grub2: grub2 grub2/update_nvram boolean false
maas: 'cloud-init cloud-init/
cloud-init cloud-init/ maas-metadata- url string http:// 192.168. 151.1:5248/ MAAS/metadata/
cloud-init cloud-init/ maas-metadata- credentials string oauth_consumer_ key=Kmc8Wz45Ynf Q2nT6EG& oauth_token_ key=LDpwjgW5DVM PCdZRrH& oauth_token_ secret= 9neUuyUPdBwamfC w4JBLjvH86TAnQv Df
cloud-init cloud-init/ local-cloud- config string manage_etc_hosts: true\nmanual_ cache_clean: nreporting: \n maas:\n consumer_key: Kmc8Wz45YnfQ2nT 6EG\n endpoint: 192.168. 151.1:5248/ MAAS/metadata/ status/ fhq6qa\n token_key: LDpwjgW5DVMPCdZ RrH\n token_secret: amfCw4JBLjvH86T AnQvDf\ n type: webhook\n
true\
http://
9neUuyUPdBw
'