Re:[watcher] Compute CDM builder issues (mostly perf related)

li.canwei2 at zte.com.cn li.canwei2 at zte.com.cn
Thu May 16 02:15:03 UTC 2019


On 5/15/2019 4:13 AM, li.canwei2 at zte.com.cn wrote:






> [licanwei]:please refer to 
> <https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L144>https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L144 
> 
> 
> When a nova notification is received before the nova CDM is built or no 
> node in the CDM,
> 
> the node will be add to the CDM.
> 

That's not what's happening in this bug. We're getting an 
instance.update event from nova during scheduling/building of an 
instance before it has a host, so when this is called:

https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L220

node_uuid is None.

Which means we never call get_or_create_node here:

https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L44

And then we blow up here:

https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L50

because self.cluster_data_model is None.

Based on your earlier reply about when the nova CDM is built:

 > [licanwei]:Yes, the CDM will be built when the first audit being created.

It seems the fix for this notification traceback bug is to just make 
sure the self.cluster_data_model is not None and return early if it's 
not, i.e. gracefully handle receiving notifications before we've ever 
done an audit and built the nova CDM.
[licanwei]: In this case, I think we can just ignore the exception.




-- 

Thanks,

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190516/da7a1dd9/attachment.html>


More information about the openstack-discuss mailing list