/srv/irclogs.ubuntu.com/2023/07/17/#cloud-init.txt

cjp256esv: did you sort out that mount issue by chance?  the pastes are 404ing14:55
esvsort of, give me a moment to explain it further14:57
esvI noticed disk_setup and mounts modules are under cloud_init_modules in /etc/cloud/cloud.cfg in my azure vms, I don't think that is the standard place 15:02
esvor at least it will force the modules to be called more often than once per-instance 15:03
meenahttps://cathode.church/@meena/110729982907967506 an ouroboros of yaks 16:45
esvhey folks, is once-per-instance executed when the  iid changes or whenever the machine is started from de-allocated state?16:50
minimalesv: a iid change is a new instance16:50
esvthat I already understood16:53
esvin Azure you can stop an instance, which the OS goes dormant and no charges are incurred then you kick it off again, you are almost guaranteed to get a new host hypervisor.16:54
minimalesv: so you know the answer to your question then16:54
esvaccording to me once-per-instance should not execute then but one of my colleagues says otherwise 16:54
minimalyou mentioned "once-per-instance" and I indicated a change in iid is a new instance, therefore when the iid changes then the "once-per-instance" modules are executed16:55
esvI guess I need to redefine the question16:56
esvare once-per-instance stcripts only run when the iid changes16:56
minimalif you include the 1st boot when there is no pre-existing iid and so it is an idd change from "none" to the new iid, yes16:58
esvthank you minimal, I would interpret the "no pre-existing iid" as a iid change. 16:59
minimalto be more precise, upon boot after a iid change (as cloud-init runs as part of booting process)16:59
minimalso the question is whether Azure provides a new iid or the same iid when a machine is restarted from deallocated state17:03
esvno, it does not provide a new iid unless you execute cloud-init clean b4 the reboot17:04
minimalas for disk_setup and mount modules, yes they are in cloud_init_modules section by default. Why would that cause them to be called more than once-per-instance?17:08
cjp256The instance id should not change between allocations on Azure.17:40
blackboxswesv: sorry to jump in late on this thread. once-per-instance are run only when instance-id changes.... so, as you said "no pre-existing iid" -> "some uuid" also qualifies as that instance-id change.... and the only way you get to "no pre-existing iid" is a cloud image with cloud-init which was never launched, or a reboot that happens after a `cloud-init clean` because that removes the cached /var/lib/cloud/data/previous-instance-id17:41
blackboxswesn: and for general instance-id changes besides that, it's up to the cloud platform to determine when the meta-data/instance-id value changes. typically this would be over the migration of an instance to a new private network or significant changes in VM metadata. Some clouds change instance-id when new NICs are attached to an instance17:43
blackboxswesv* rather17:43
esvblackboxsw, thnx17:43
blackboxswyeah, think I'm just restating what minimal said, but with some extra context17:44
blackboxswthx cjp256 17:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!