From 1a9a41cd1d599dd8678a34549257503c39904854 Mon Sep 17 00:00:00 2001 From: Marcin Wilk Date: Mon, 31 Aug 2026 17:14:00 +0200 Subject: [PATCH] Fix ceilometer notification settings in the nova.conf This is a follow up to the previous commit [1], which did not properly configured nova.conf to support Ceilometer notifications. On 2026.1, according to [2], all instance-related metric are collected by pollster, so theoretically, no nova.conf changes are needed at all. However, when enabled, Nova sends the legacy, unversioned notifications to Ceilometer, with the following meters, which are not available via pollster [4]: - memory - vcpus - disk.root.size - disk.ephemeral.size Without the Nova notifications enabled the above, flavor-based, meters will not be available. This is important because some external or third party billing systems may rely on that. This commit fixes missing nova.conf Ceilometer notification settings. [1] https://github.com/canonical/snap-openstack-hypervisor/pull/208 [2] https://docs.openstack.org/ceilometer/2026.1/admin/telemetry-measurements.html#openstack-compute [3] https://opendev.org/openstack/nova/src/branch/stable/2026.1/nova/compute/utils.py#L342 [4] https://opendev.org/openstack/nova/src/branch/stable/2026.1/nova/notifications/base.py#L337 Partial-bug: #2162762 Signed-off-by: Marcin Wilk --- templates/nova.conf.j2 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index d0ca0b6..f0acc9a 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -36,6 +36,11 @@ ram_allocation_ratio = 1.0 {% if sev and sev.reserved_host_memory_mb -%} reserved_host_memory_mb = {{ sev.reserved_host_memory_mb }} {% endif %} +{% endif -%} + +{%- if telemetry.enable %} +instance_usage_audit = True +instance_usage_audit_period = hour {% endif %} [workarounds] @@ -199,7 +204,7 @@ cafile = {{ snap_common }}/etc/ssl/certs/receive-ca-bundle.pem {% if credentials.ovn_metadata_proxy_shared_secret is defined -%} service_metadata_proxy = True metadata_proxy_shared_secret = {{ credentials.ovn_metadata_proxy_shared_secret }} -{% endif -%} +{% endif %} [placement] auth_url = {{ identity.auth_url }} @@ -232,7 +237,7 @@ password = {{ identity.password }} {% if ca and ca.bundle -%} verify_ssl_path = {{ snap_common }}/etc/ssl/certs/receive-ca-bundle.pem {% endif -%} -{% endif -%} +{% endif %} {% if telemetry.enable -%} [oslo_messaging_notifications] @@ -240,7 +245,7 @@ driver = messagingv2 [notifications] notify_on_state_change = vm_and_task_state -notification_format = versioned +notification_format = both {%- endif %} [oslo_messaging_rabbit]