Comment 2 for bug 1600485

Revision history for this message
Shaik Apsar (sa709c) wrote :

publish_quota_notifications method was implemented in trove/taskmanager/manager.py
as implementation part of 'Ceilometer Integration' blueprint[1] in mitaka with the
patch[2].

The dbaas.quotas notification will be periodically emitted to reflect the current
state of utilization of the Trove quotas.The frequency of notification events will
be defined by the quota_notification_interval configuration value.

Each time Trove failing to prepare dbaas.quotas notification with an error
'Client object has no attribute tenants' and the root cause for the failure is
publish_quota_notifications method is trying to get tenant list using 'novaclient'
instead of using 'keystoneclient'.

class DBaaSQuotas in trove/common/notification.py is missing to add tenant_id to the
dbaas.quotas notification payload.

I removed the token_id from admin_context for security concern.

There meight be a change in trove-specs[4] to include tenant_id in traits for event_type: trove.quota.

[1] https://specs.openstack.org/openstack/trove-specs/specs/mitaka/ceilometer-integration.html
[2] https://review.openstack.org/#/c/227870
[3] https://github.com/openstack/trove/blob/master/trove/common/notification.py#L269
[4] https://specs.openstack.org/openstack/trove-specs/specs/mitaka/ceilometer-integration.html#dbaas-quotas
Please review the bug fix https://review.openstack.org/#/c/340022/.