Comment 3 for bug 1907725

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The problem is in charm-helpers, in contrib/openstack/context.py in the ApacheSSLContext as Nobutu notes above.

The problem is in the design of Contexts which eagerly do all their computations at module load time (due to the contexts variable being a global variable in the module).

However, lazily loading the contexts may or may not fix this problem as (in some charms) the contexts are used as part of the assess_status message generation.

The ACTUAL solution to this is to defer each of the Context class __call__() function calls until they are first accessed as part of the larger dictionary of contexts. Which might need a bit of re-engineering of how the context is set up, but not how it gets used. The other, is simply to not use contexts in the update_status generation (and this would need to be determined on a case by case basis).

For the ceph-radosgw charm it calls "assess_status(CONFIGS)" on every single call, so it would need a re-design of whether to use the ApacheSSLContext for assess_status.