Comment 2 for bug 1524388

Revision history for this message
Ryan Beisner (1chb1n) wrote :

I'd lean toward (a).

IMHO, the self-aware(tm) charm will possess some basic functionality checks to know if it is running properly, before declaring itself ready. This may involve introspection of more than just running services or processes. It could also be checking for a listening socket, or some arbitrary test method. I think we will be best served by having all three. But a process check is a good start.

Idea: start out by just checking for running processes. Construct a mapping of <charm>: [<expected_processes>] in the form of a centralized helper dict (or yaml file) and process check helper. There may be another layer required in that data, as process names and their existence may vary across Ubuntu releases and/or OpenStack releases.

ex. assess_status remains blocked and status is updated if not expected_processes_are_running('keystone', UBUNTU_RELEASE, OS_RELEASE), then some retries, and ultimately a hook is failed after exhausting a generous retry threshold.

This could lead nicely into a new self-check action, where the same would basically re-trigger.

All of this foo would still require a sync into the charms, but no harm there.