Add the ability to disable send_actions option in cinder-volume-usage-audit service.

Change-Id: I351279dab0d90e60573df7db4c80b63320dff787
Closes-Bug: #1968734
This commit is contained in:
siavash sardari 2022-04-12 18:18:38 +04:30
parent 89f48407c0
commit 66eb424de5
3 changed files with 9 additions and 1 deletions

View File

@ -48,6 +48,7 @@ cinder_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups
# Time period for which to generate volume usages. The options are hour, day,
# month, or year. (string value)
cinder_volume_usage_audit: hour
cinder_volume_usage_audit_send_actions_enabled: True
cinder_storage_availability_zone: nova
cinder_default_availability_zone: "{{ cinder_storage_availability_zone }}"

View File

@ -0,0 +1,7 @@
---
features:
- Introduced new variable ``cinder_volume_usage_audit_send_actions_enabled``
to allow the deployer to disable the send actions option in
cinder-volume-usage-audit service unit. To have lowest possible
footprint, the default value would be true to not change the behaviour
of the cinder-volume-usage-audit in existing deployments.

View File

@ -130,7 +130,7 @@
systemd_services:
- service_name: "cinder-volume-usage-audit"
execstarts:
- '/bin/bash -c "{{ cinder_bin }}/cinder-volume-usage-audit --start_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00\s-d\s-1{{ cinder_volume_usage_audit }})\" --end_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00)\" --send_actions"'
- '/bin/bash -c "{{ cinder_bin }}/cinder-volume-usage-audit --start_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00\s-d\s-1{{ cinder_volume_usage_audit }})\" --end_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00)\" {{ (cinder_volume_usage_audit_send_actions_enabled | bool) | ternary( "--send_actions", "--nosend_actions" ) }}"'
timer:
state: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary('started', 'stopped') }}"
options: