The goal of this blueprint is to capture the notification events emitted by Trove (DBaaS) during create, modify volume, resize, delete operations and periodic exist events.
Trove is Database as a Service for OpenStack. It automates the creation, configuration and management of relational or non-relational database without the burden of handling complex administrative tasks.
The trove-taskmanager service dispatches tasks such as provisioning database instances, managing the lifecycle of database instances, and performing operations on the database instance and emits notification event for each such task.
These notifications are CRUD events, that notify the creation, update or modification of a trove instance and its underlying volume, and also have measurement values such as instance size and volume size.
Ceilometer needs to be updated to consume and record these notifications as samples and events (traits).
From Trove perspective they are running instances of a database, not compute instances. Metering and billing will be based on hours that the database has been running, not necessarily how long the hosting instance has been run. This requires a unique set of metering records(samples) to be generated and stored to enable usage tracking and billing of the individual database instances.
If Ceilometer processes and record these notifications, other services will be able to use this for aggregation and billing purpose.
To represent as events, define event definitions and field mappings (trait definitions) for Trove resource type - instance in the /etc/ceilometer/event_definitions.yaml file.
The trait field syntax in trait definitions follow a variant of the JSONPath.
Example of the event definition and field mappings for the domain notifications that need to go in event_definitions.yaml,
To enable event processing in Ceilometer, configuration is needed in ceilometer.conf,
eg - [notification] store_events = True
eg - [event] definitions_cfg_file = event_definitions.yaml
Using events provides better querying of metadata and avoids the effort to aggregate samples with a fixed measurement value of 1.
To represent as samples, a notification plugin is required in Ceilometer, to hear notifications at an exchange and topic and transform them into samples.
This is needed to account for the database uptime hours, which is based on the trove.instance.exists event. Specifically, the audit_period_beginning and audit_period_ending for each exists event will be used to compute the uptime hours
A counter type - database can be used to associate the trove samples
Add a new listener class - TroveMetricsNotificationBase that extends plugin.NotificationBase for DBaaS service to transform Trove event data into samples
A sub-class of TroveMetricsNotificationBase that emits samples for the trove.instance.create and trove.instance.exists events and another for the trove.instance.modify* and trove.instance.delete events
The Trove event types have the following pattern,
, where resource is instance.
No new impacts. Pre-existing concerns with capacity at the notification and storage handling layers remain.
Enable Trove exchange in ceilometer.conf
There could be new types of notifications when new resource types are added or new features are supported like backup/restore, patching, monitoring etc.
When Trove conforms to the PaaS event format, the field mappings for integrated events will need to be refactored to adjust to the new event format.
With the impending move towards declarative metering in Ceilometer, the proposed notification plugin for Trove will become redundant/deprecated and replaced with declarative meter definitions.
DBaaS is construed as a PaaS service by some and might have it own message bus where it is sending notifications. Ceilometer recently was extended to consume notification from multiple message bus - https://review.openstack.org/#/c/77612/
If there are multiple message buses, then ceilometer will need multiple transport endpoints configured in ceilometer configuration. (ceilometer.conf)
Unit and integration Tests will be added to validate events generated.