From 66c4f72c509e3746f090d8b48888a9c42d37705b Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Fri, 12 Jan 2024 18:05:38 +0100 Subject: [PATCH] Enable instance usage audit only when ceilometer is enabled This patch disables periodic compute.instance.exists notifications when designate is enabled. Related-Bug: #2049503 Change-Id: I39fe2db9182de23c1df814d911eec15e86317702 --- ansible/roles/nova-cell/templates/nova.conf.j2 | 2 +- ansible/roles/nova/templates/nova.conf.j2 | 2 +- .../disable-usage-audit-notifications-6e63588bdcc48603.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/disable-usage-audit-notifications-6e63588bdcc48603.yaml diff --git a/ansible/roles/nova-cell/templates/nova.conf.j2 b/ansible/roles/nova-cell/templates/nova.conf.j2 index 41cd9a1046..a3e959fcd2 100644 --- a/ansible/roles/nova-cell/templates/nova.conf.j2 +++ b/ansible/roles/nova-cell/templates/nova.conf.j2 @@ -26,7 +26,7 @@ compute_driver = libvirt.LibvirtDriver # Though my_ip is not used directly, lots of other variables use $my_ip my_ip = {{ api_interface_address }} -{% if enable_ceilometer | bool or enable_designate | bool %} +{% if enable_ceilometer | bool %} instance_usage_audit = True instance_usage_audit_period = hour {% if enable_watcher | bool %} diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 30288da69a..d4ddb7c671 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -16,7 +16,7 @@ allow_resize_to_same_host = true # Though my_ip is not used directly, lots of other variables use $my_ip my_ip = {{ api_interface_address }} -{% if enable_ceilometer | bool or enable_designate | bool %} +{% if enable_ceilometer | bool %} instance_usage_audit = True instance_usage_audit_period = hour {% endif %} diff --git a/releasenotes/notes/disable-usage-audit-notifications-6e63588bdcc48603.yaml b/releasenotes/notes/disable-usage-audit-notifications-6e63588bdcc48603.yaml new file mode 100644 index 0000000000..7c9c00580e --- /dev/null +++ b/releasenotes/notes/disable-usage-audit-notifications-6e63588bdcc48603.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes enabled usage audit notifications when they + are not needed. See `LP##2049503 + `__.