[watcher] Compute CDM builder issues (mostly perf related)
On 5/14/2019 3:34 PM, Matt Riedemann wrote:
> 2. I had a question about when the nova CDM gets built now . It looks
> like the nova CDM only gets built when there is an audit? But I thought
> the CDM was supposed to get built on start of the decision-engine
> service and then refreshed every hour (by default) on a periodic task or
> as notifications are processed that change the model. Does this mean the
> nova CDM is rebuilt fresh whenever there is an audit even if the audit
> is not scoped? If so, isn't that potentially inefficient (and an
> unnecessary load on the compute API every time an audit runs?).
Also, it looks like https://bugs.launchpad.net/watcher/+bug/1828582 is
due to a regression caused by that change. The problem is a nova
notification is received before the nova CDM is built which results in
an AttributeError traceback in the decision-engine logs.
Should we be building the nova CDM if nova is sending notifications and
there is no model yet? Or should we just handle the case that the nova
CDM hasn't been built yet when we start getting notifications (and
before an audit builds the CDM)?