If ceilometer is enabled, nova instance usage auditing and the
appropriate notification drivers should be automatically enabled,
as opposed to relying on manual reconfiguration and service restart.
Change-Id: I41643a1418a87942be7b2b7979797ff5eb7e5479
... | ... |
@@ -341,6 +341,13 @@ function create_nova_conf() { |
341 | 341 |
# Show user_name and project_name instead of user_id and project_id |
342 | 342 |
add_nova_opt "logging_context_format_string=%(asctime)s %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" |
343 | 343 |
fi |
344 |
+ if is_service_enabled ceilometer; then |
|
345 |
+ add_nova_opt "instance_usage_audit=True" |
|
346 |
+ add_nova_opt "instance_usage_audit_period=hour" |
|
347 |
+ add_nova_opt "notification_driver=nova.openstack.common.notifier.rabbit_notifier" |
|
348 |
+ add_nova_opt "notification_driver=ceilometer.compute.nova_notifier" |
|
349 |
+ fi |
|
350 |
+ |
|
344 | 351 |
|
345 | 352 |
# Provide some transition from ``EXTRA_FLAGS`` to ``EXTRA_OPTS`` |
346 | 353 |
if [[ -z "$EXTRA_OPTS" && -n "$EXTRA_FLAGS" ]]; then |