Comment 3 for bug 1738100

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : Re: [17.11][ocata] Host power off event does not get passed from nova-os-api to ceilometer and, in turn, to aodh

Turns out the errors about were due to the fact that I've created an HA router on a non-HA neutron.

Anyway, after solving that problem I encountered something else: versioned nova notification counters were increased (not consumed though due to https://bugs.launchpad.net/ceilometer/+bug/1665449) but unversioned were not.

After staring at this for a while I saw a pattern that did not make any sense:

https://github.com/openstack/nova/blob/stable/pike/nova/conf/notifications.py#L88-L105
    cfg.StrOpt(
        'notification_format',
        choices=['unversioned', 'versioned', 'both'],
        default='both', ...

as we use a default "both" option, both topics should get messages and queues must get messages too (consumed or not).

While staring I also noticed that designate_notifications had increasing counters.

I went in and checked whether on the "good" cloud I had a relation between charm-designate and charm-nova-compute-kvm and I did not.

And this is why it was all working as expected - there is a code path in charm-nova-compute which overrides "topics" option to use notifications_designate instead of notifications:
 https://review.openstack.org/#/c/521072 (my patch to remove that)

Here is a live demo of how it works and then breaks after a designate <-> nova-compute relation is added.

https://asciinema.org/a/zrIYQZhYWkhjjDXBiRVArttxK

Added field-high to facilitate the inclusion of https://review.openstack.org/#/c/521072 and backporting of this as my current project depends on this functionality.