Comment 3 for bug 1663584

Revision history for this message
Casey Marshall (cmars) wrote : Re: metrics collection hook fails

collect-metrics runs in a restricted hook context because it can execute concurrently with other "lifecycle" hooks. This prevents a long-running hook from interrupting data collection.

A workaround for this would be to set leadership (or other desired info) in charmhelpers unitdata, which is accessible from collect-metrics.

Longer term, we could look into allowing read-only hook tools to work in collect-metrics, with the caveat that it would be a point-in-time snapshot of a potentially changing state.