Skip to content

fix: update nova-compute notification config for telemetry meters - #212

Merged
gboutry merged 2 commits into
canonical:stable/2024.1from
munirsidd:bug/2162762-2024.1
Sep 3, 2026
Merged

gboutry merged 2 commits into
canonical:stable/2024.1from
munirsidd:bug/2162762-2024.1

Conversation

@munirsidd

@munirsidd munirsidd commented Sep 1, 2026

Copy link
Copy Markdown

Change notification_format from versioned to both so that Ceilometer receives unversioned notifications on the notifications topic and Watcher receives versioned notifications on the versioned_notifications topic [0][1]. Ceilometer already subscribes to both topics [2]. Add notify_on_state_change = vm_and_task_state to enable instance lifecycle notifications like compute.instance.booting.time. Enable instance_usage_audit with an hourly period so nova-compute emits the periodic compute.instance.exists audit events that Ceilometer consumes [3].

[0] - https://docs.openstack.org/watcher/2024.1/configuration/configuring.html#configure-nova-notifications
[1] - https://docs.openstack.org/nova/2024.1/configuration/config.html#notifications.notification_format
[2] - https://opendev.org/openstack/sunbeam-charms/commit/15739a4dbf4245234c2a6348c14654f9c2980156
[3] - https://docs.openstack.org/ceilometer/2024.1/install/install-compute-ubuntu.html#configure-compute-to-use-telemetry

Partial-bug: #2162762

QA steps

  1. Deploy sunbeam
  2. Enable telemetry
sunbeam enable telemetry
  1. Build and install the openstack-hypervisor snap with this branch
    Verify nova-compute config
# in the /var/snap/openstack-hypervisor/common/etc/nova/nova.conf
[DEFAULT]
...
instance_usage_audit = True
instance_usage_audit_period = hour
...
[oslo_messaging_notifications]
driver = messagingv2

[notifications]
notify_on_state_change = vm_and_task_state
notification_format = both
  1. Launch an instance and verify compute.instance.booting.time metric
openstack server create --flavor m1.small --image ubuntu --network demo-network test-vm
openstack metric resource show <instance-id>
# Should include compute.instance.booting.time (missing without this fix)
  1. Enable Watcher and verify it receives versioned notifications

Links

Jira card: OPEN-4670

@munirsidd
munirsidd force-pushed the bug/2162762-2024.1 branch 2 times, most recently from 050f105 to e390153 Compare September 2, 2026 14:11
@gboutry

gboutry commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Commits are unsigned

Change notification_format from versioned to both so that Ceilometer
receives unversioned notifications and Watcher receives versioned ones.
Add notify_on_state_change = vm_and_task_state to enable instance
lifecycle notifications like compute.instance.booting.time.

Partial-bug: #2162762

Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com>
(cherry picked from commit 63bb2db)
Signed-off-by: Munir Siddiqui <munir.siddiqui@canonical.com>
Enable instance_usage_audit with an hourly period so nova-compute emits the
periodic compute.instance.exists audit events that Ceilometer consumes. [0]

This commit fixes missing nova.conf Ceilometer notification
settings.

[0] - https://docs.openstack.org/ceilometer/2024.1/install/install-compute-ubuntu.html#configure-compute-to-use-telemetry

Partial-bug: #2162762
Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com>
(cherry picked from commit 1a9a41c)
Signed-off-by: Munir Siddiqui <munir.siddiqui@canonical.com>
@munirsidd

Copy link
Copy Markdown
Author

Commits are unsigned

Fixed

@gboutry
gboutry merged commit 5b34451 into canonical:stable/2024.1 Sep 3, 2026
3 checks passed
@munirsidd
munirsidd deleted the bug/2162762-2024.1 branch September 4, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants