The general approach here LGTM. But I'd love for things to be made a bit more generic so we can just drop this work into other charms unmodified:
- Perhaps save_script_rc() can to be moved to lib/openstack_common.py without the hard-coded KEYSTONE_SERVICE_NAME, and the caller can add that to the kwargs instead?
- I imagine there are some tests that would be common across all charms (service_running, service_ports_live) It would be great if those can be synced to other charms unmodified as well. Eg, perhaps have the ports look for *_OPENSTACK_PORT in the environment and ensure each one? The services check can determine what it should check based on *_OPENSTACK_SERVICE_NAME? Not sure if these common tests should live in some directory other than the tests specific to each service. /var/lib/juju/units/$unit/healthchecks/common.d/ & /var/lib/juju/units/$unit/healthchecks/$unit.d/ ??
End goal for me is to have the common framework for the health checking live with the other common code we maintain, and we can just sync it to other charms when we get it right in one. Of course this is complicated by the combination of bash + python charms we currently maintain, but still doable I think.
Hey Chad-
You targeted this merge into the upstream charm @ lp:charms/keystone, can you retarget toward our WIP HA branch @ lp:~openstack-charmers/charms/precise/keystone/ha-support ?
The general approach here LGTM. But I'd love for things to be made a bit more generic so we can just drop this work into other charms unmodified:
- Perhaps save_script_rc() can to be moved to lib/openstack_ common. py without the hard-coded KEYSTONE_ SERVICE_ NAME, and the caller can add that to the kwargs instead?
- I imagine there are some tests that would be common across all charms (service_running, service_ports_live) It would be great if those can be synced to other charms unmodified as well. Eg, perhaps have the ports look for *_OPENSTACK_PORT in the environment and ensure each one? The services check can determine what it should check based on *_OPENSTACK_ SERVICE_ NAME? Not sure if these common tests should live in some directory other than the tests specific to each service. /var/lib/ juju/units/ $unit/healthche cks/common. d/ & /var/lib/ juju/units/ $unit/healthche cks/$unit. d/ ??
End goal for me is to have the common framework for the health checking live with the other common code we maintain, and we can just sync it to other charms when we get it right in one. Of course this is complicated by the combination of bash + python charms we currently maintain, but still doable I think.