yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #92227
[Bug 1890528] Re: cloud-init status --wait returns before cloud-final has finished executing
Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/3769
** Bug watch added: github.com/canonical/cloud-init/issues #3769
https://github.com/canonical/cloud-init/issues/3769
** Changed in: cloud-init
Status: Triaged => Expired
--
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/1890528
Title:
cloud-init status --wait returns before cloud-final has finished
executing
Status in cloud-init:
Expired
Bug description:
I'm instrumenting our EC2 instances to report whether cloud-init
succeeded or failed during the boot process. I've implemented this as
a systemd unit that is triggered early in the boot process that runs a
script that resembles the following:
cloud_init_status=0
cloud-init status --wait || cloud_init_status=$?
if [ "$cloud_init_status" = "0" ]; then
report_launch_success
else
report_launch_failure
fi
I was expecting `cloud-init status --wait` to only return after cloud-
final has completed, but I discovered today that it can return early
if there is an error encountered during the cloud-config stage.
I reported this in IRC and @blackboxsw thought the issue might be
somewhere in this code ( https://github.com/canonical/cloud-
init/blob/a13febd286d21f1754e32f4a05e722039eb452b8/cloudinit/cmd/status.py#L133-L144)
and suggested I file a bug here.
I am using cloud-init 20.2-45 on Xenial.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1890528/+subscriptions
References