Cannot determine boot-finished state reliably
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
From outside an instance, ssh becomes available before cloud-init is done. If I ssh in, I'd like to be able to automatically wait until cloud-init has finished, so as not to collide with anything it is doing.
I'd like to be able to do this independently of any userdata. I think this makes for a cleaner separation between components, and makes everything easier to develop and test. For example, I'ld like uvtool to allow the user to completely override everything that is passed through to cloud-init, but for uvtool to still be able to detect when the instance is ready "from the outside". This is why I don't like the idea of having to make my own arrangement for this via userdata.
/var/lib/
We discussed doing something in /run instead.
I can't think of any other mechanism that can be used "from the outside", independent of userdata, that is not horribly obtuse or racy.
Could whatever we end up doing please be added in time for Ubuntu Trusty, so that tools that boot Trusty images will be able to use it? Otherwise we'll need to wait another two years I think. Thanks!
We can make final_modules write a marker file in /run.
I think jst adding a different 'final-marker' module (cc_final_marker) would be best.
We cna make it write to /run/cloud- init/finished.
and also try to figure out how we can make it mark "all passed" or some indication of pass/failed there too.
patches are most definitely welcome.