Need a Success / Failure notification mechanism when cloud-init finishes.

Bug #1724128 reported by Sankar Tanguturi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Wishlist
Unassigned

Bug Description

I discussed this issue during the 'cloud-init' summit that happened in August 2017. Logging a bug for tracking purposes. Today, there is no way for datasources to get notified about success / failure when cloud-init finishes executing.

Following is an example:

> From cloudinit/sources/DataSourceOVF.py

            # TODO: Need to set the status to DONE only when the
            # customization is done successfully.
            enable_nics(self._vmware_nics_to_enable)
            set_customization_status(
                GuestCustStateEnum.GUESTCUST_STATE_DONE,
                GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)

Ideally, the datasourceOVF wants to get notified when the cloud-init finally completes. Then, the datasource needs to send success / failure events to the underlying hypervisor. But today the mechanism / framework is not available. So, the datasourceOVF just blindly returns SUCCESS to the hypervisor without even waiting for the completion.

We really really need a better framework / mechanism to handle situations like this. Please do let me know if any information is requried.

Thanks
Sankar.

Revision history for this message
Scott Moser (smoser) wrote :

There are two paths we could pursue for this:
a.) Utilize reporting mechanism (reporting.handlers.ReportHandler), which already does this in many senses. MAAS uses this mechanism to accomplish both "status" events and "pass/fail". This general mechanism is already in place. To use it for vmware we would have to add some Reporter that worked for vmware.

b.) Modify cloud-init to call a 'report_status' function on a datasource if that function was present. We'd just change cloud-init to call that at different points in its runtime.

The only issue with this is that it very much is implementing a subset of what reporting already does do.

So I'd prefer to work towards the ReportHandler solution (a).

Dan Watkins (oddbloke)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Wishlist
Bryce Harrington (bryce)
no longer affects: open-vm-tools (Ubuntu)
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.