← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1999781] Re: How is the cloud_init_modules stage executed?

 

This page is probably the most helpful:
https://cloudinit.readthedocs.io/en/latest/topics/boot.html

Modules get run in Network, Config, and Final stages, so that's
cloud-init init
cloud-init modules --mode=config
cloud-init modules --mode=final

respectively.

Which modules get executed in which stage along with their order is
defined in /etc/cloud/cloud.cfg. Modules can be
enabled/disabled/reordered as desired, but that could cause system
instability as later modules may rely on something executed earlier
(e.g., running mounts before disk_setup probably doesn't make much
sense). We don't define any hard requirements between modules though. If
moving things works for your use case, then do what works for you. Just
know that the upstream ordering is the tested and supported
configuration, and we can't guarantee that anything outside of that will
work properly.

You'll notice that in https://github.com/canonical/cloud-
init/blob/main/config/cloud.cfg.tmpl, distros modify which modules get
run and their order for their particular distro.

I'm going to mark this bug invalid as it isn't actually a bug, but we
can continue the conversation here if I didn't answer your question. We
do have a #cloud-init channel on Libera IRC for chat, a discourse
(https://discourse.ubuntu.com/c/server/cloud-init/54) for something
resembling a message board, and cloud-init mailing list
(https://lists.launchpad.net/cloud-init/). Those would all be better
places to ask questions, and you'd probably get responses quicker.

** Changed in: cloud-init
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1999781

Title:
  How is the cloud_init_modules stage executed?

Status in cloud-init:
  Invalid

Bug description:
  Sorry, I've been looking at the code and documentation of cloud-init recently and have a question:
  How is the cloud_init_modules stage executed?

  Which command does it correspond to? "cloud-init modules --mode init"
  or "cloud-init init".

  Also, are there any modules must be defined at a certain stage(cloud_init_modules, cloud_config_modules, and cloud_final_modules)? eg.
  "ca-certs" modules in cloud_init_modules stages:
  https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl#L107

  Can we put it in cloud_config_modules or even cloud_final_modules? If
  so, what's the impact? If not, why? I did not find instructions for
  this in the documentation.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1999781/+subscriptions



References