Trove/DBInstanceLogOperationV1
Contents
Mission
Provide specific API interface to end-user which would allow to manipulate with database log files.
Design
Log manipulations are designed to let user perform log investigations. Since Trove is PaaS - level project, it's user cannot interact with compute instance directly, only with database through given API (database operations). Deployer would decide which log files would be available for trove user.
API Schema
DownloadDBLogFile request parameters and DBLog response object
-
- Description: Downloads current database log file into Swift container.
Request Parameters:
Parameter name | Description | Type | Required |
---|---|---|---|
Instance ID or Name | The customer-assigned name of the DB instance that contains the log files. | String | Yes |
LogFileName | Log file name | String | Yes |
Response Elements
Name | Description | Type | Errors |
---|---|---|---|
LogFileData | The following elements are returned in a structure named DBLog | DBLog | DBInstanceNotFound. HTTP 404 |
DBLog response object
- DBLog is responsible for database log file stored in Swift container
Name | Description | Type |
---|---|---|
Instance ID | instance UUID ID | String |
Filename in container | Log file name | String |
API Calls
- List all available log files for user
GET /{datastore_type}/logs
{ name: server_log name: commit_log name: binary_log }
- Create log entry inside Swift container
POST /{instance_id}/{log_name}
{ instance_id: {instance_id} filename_location: swift_url/{token}/{container_name}/"%s_%s" % ({instance_id}, {log_name}) }
Server-side configuration
- Trove taskmanager and api services would require next conf values:
- list of available log files per datastore (could be retrieved from database configuration at guest side).
Guest-side configuration
- Same as server side, guest side requires several configuration values:
- Mapping of log files names and their paths
- naming convention: {instance_id} + {path according to income filename} +daytime.log
- manifest convention: *.log or *tar.bz2 or *tar.gz
- Storage Strategy: Swift
- Container: logs_files