Jump to: navigation, search

Trove/DBInstanceLogOperationV1

< Trove
Revision as of 11:04, 23 December 2013 by Denis M. (talk | contribs) (DBLog response object)

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 Model

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
Marker For paginating String No

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: "%s_%s" % ({instance_id}, {log_name})
}


Server-side configuration

  • Trove taskmanager and api services would require next conf values:
  1. 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:
  1. Mapping of log files names and their paths
  2. naming convention: {instance_id} + {path according to income filename} +daytime.log
  3. manifest convention: *.log or *tar.bz2 or *tar.gz
  4. Storage Strategy: Swift
  5. Container: logs_files