Modify nova config for ceilometer if enabled
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
This commit is contained in:
parent
9f8da4b09b
commit
1fcc6a1fc9
7
lib/nova
7
lib/nova
@ -341,6 +341,13 @@ function create_nova_conf() {
|
||||
# Show user_name and project_name instead of user_id and project_id
|
||||
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"
|
||||
fi
|
||||
if is_service_enabled ceilometer; then
|
||||
add_nova_opt "instance_usage_audit=True"
|
||||
add_nova_opt "instance_usage_audit_period=hour"
|
||||
add_nova_opt "notification_driver=nova.openstack.common.notifier.rabbit_notifier"
|
||||
add_nova_opt "notification_driver=ceilometer.compute.nova_notifier"
|
||||
fi
|
||||
|
||||
|
||||
# Provide some transition from ``EXTRA_FLAGS`` to ``EXTRA_OPTS``
|
||||
if [[ -z "$EXTRA_OPTS" && -n "$EXTRA_FLAGS" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user