<div class="zcontentRow"><p style="font-size:14px;font-family:arial;"><span style="font-family: sans-serif;"><br></span></p><p style="font-size:14px;font-family:arial;"><span style="font-family: sans-serif;">On 5/15/2019 4:13 AM, li.canwei2@zte.com.cn wrote:</span><br></p><div><div class="zhistoryRow" style="display:block"><div id="zwriteHistoryContainer"><div class="control-group zhistoryPanel"><div class="zhistoryContent"><div>> [licanwei]:please refer to <br>> <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 <br>> <br>> <br>> When a nova notification is received before the nova CDM is built or no <br>> node in the CDM,<br>> <br>> the node will be add to the CDM.<br>> <br><br>That's not what's happening in this bug. We're getting an <br>instance.update event from nova during scheduling/building of an <br>instance before it has a host, so when this is called:<br><br>https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L220<br><br>node_uuid is None.<br><br>Which means we never call get_or_create_node here:<br><br>https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L44<br><br>And then we blow up here:<br><br>https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/notification/nova.py#L50<br><br>because self.cluster_data_model is None.<br><br>Based on your earlier reply about when the nova CDM is built:<br><br> > [licanwei]:Yes, the CDM will be built when the first audit being created.<br><br>It seems the fix for this notification traceback bug is to just make <br>sure the self.cluster_data_model is not None and return early if it's <br>not, i.e. gracefully handle receiving notifications before we've ever <br>done an audit and built the nova CDM.<br><p>[licanwei]: In this case, I think we can just ignore the exception.</p><p><br></p>-- <br><br>Thanks,<br><br>Matt<br></div></div></div></div></div></div><p><br></p></div>