Jump to: navigation, search

Difference between revisions of "Trove/DBInstanceLogOperationV1"

(Request Parameters:)
(Mission)
Line 1: Line 1:
 
= Mission =
 
= Mission =
Provide specific API interface to end-user which would allow to manipulate with database log files.
+
Provide specific API interface to end-user which would allow to manipulate with database log files. This feature provides  the ability to access log files via Swift so the can download them for Auditing/Troubleshooting purposes.
  
 
= Design =
 
= Design =

Revision as of 09:33, 14 February 2014

Mission

Provide specific API interface to end-user which would allow to manipulate with database log files. This feature provides the ability to access log files via Swift so the can download them for Auditing/Troubleshooting purposes.

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:
  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