Portworx OpenStorageDiags API
The OpenStorageDiags API from Portworx — 1 operation(s) for openstoragediags.
The OpenStorageDiags API from Portworx — 1 operation(s) for openstoragediags.
openapi: 3.0.0
info:
title: OpenStorage SDK OpenStorageAlerts OpenStorageDiags API
version: 0.186.0
security:
- bearerAuth: []
tags:
- name: OpenStorageDiags
paths:
/v1/diags:
post:
operationId: OpenStorageDiags_Collect
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkDiagsCollectRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkDiagsCollectResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: 'Collect starts a job to collect diagnostics from set of nodes that are selected based on the selectors provided
in the SdkDiagsCollectRequest. See SdkDiagsCollectRequest for more details on how to select the nodes
Returns SdkDiagsCollectResponse which has the job that is responsible for collecting the diags.'
tags:
- OpenStorageDiags
components:
schemas:
apiDiagsNodeSelector:
properties:
all:
title: All selects all nodes for diags collection
type: boolean
node_ids:
items:
type: string
title: NodeIDs are unique IDs fo the nodes for which the diags will be collected
type: array
node_label_selector:
items:
$ref: '#/components/schemas/apiLabelSelectorRequirement'
title: NodeLabelSelector is a label selector used to select the nodes for which diags will be collected
type: array
title: 'DiagsNodeSelector allows selecting nodes for diags collection
User can select NodeLabelSelector AND/OR NodeIDs. If both are provided, the implementation will select nodes based on
both labels and IDs and also handle overlaps
If All is set to true, other selectors are ignored since it selects all nodes'
type: object
apiSdkDiagsCollectRequest:
properties:
filename:
description: Filename is an optional flag only to be used for testing purposes.
type: string
issuer:
title: Issuer is an optional user friendly name for the caller invoking the API
type: string
live:
title: Live is an optional flag if true will collect live cores from running processes of the driver
type: boolean
node:
$ref: '#/components/schemas/apiDiagsNodeSelector'
profile_only:
title: 'ProfileOnly is an optional flag if true will only collect the stack and heap profile of the driver and will skip
other diag components'
type: boolean
timeout_mins:
format: int64
title: 'TimeoutMins is the timeout in minutes for the job. This is an optional field and if not provided, the
implementation of the SDK will use a sane default'
type: string
volume:
$ref: '#/components/schemas/apiDiagsVolumeSelector'
title: 'SdkDiagsCollectRequest is the request object that specifies what should be part of the diags that are collected
User can specify both Node and Volume or just one of them. If both are provided, the implementation will select
nodes based on both and also handle overlaps'
type: object
protobufAny:
properties:
type_url:
type: string
value:
format: byte
type: string
type: object
apiCloudDriveTransferJob:
properties:
destination_instance_id:
title: DestinationInstanceID is the ID of the storageless instance that needs to take over the SourceDriveSetID
type: string
source_driveset_id:
title: SourceDrivesetID is the ID of the current driveset that needs to be transferred
type: string
status:
title: Status describes a helpful status of this operation
type: string
type: object
apiDiagsCollectionStatus:
properties:
message:
title: Message is a user friendly message for current status of diags collection
type: string
node:
title: Node is the node that's collecting the diags
type: string
state:
$ref: '#/components/schemas/apiDiagsCollectionStatusState'
type: object
apiDiagsVolumeSelector:
properties:
volume_ids:
items:
type: string
title: 'VolumeIDs selects volumes by their unique IDs and then uses replica and attached nodes for those volumes for diags
collection'
type: array
volume_label_selector:
items:
$ref: '#/components/schemas/apiLabelSelectorRequirement'
title: 'VolumeLabelSelector selects volumes by their labels and then uses replica and attached nodes for those volumes for
diags collection'
type: array
title: 'DiagsVolumeSelector allows selecting volumes for diags collection
User can select VolumeLabelSelector AND/OR VolumeIDs. If both are provided, the implementation will select nodes
based on both labels and IDs and also handle overlaps'
type: object
apiLabelSelectorRequirement:
description: 'LabelSelectorRequirement is a selector that contains values, a key, and an operator that
relates the key and values.'
properties:
key:
description: Key is the label key that the selector applies to.
type: string
operator:
$ref: '#/components/schemas/LabelSelectorRequirementOperator'
values:
description: 'Values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.'
items:
type: string
type: array
type: object
apiJobState:
default: UNSPECIFIED_STATE
description: "- UNSPECIFIED_STATE: Unspecified\n - PENDING: Pending indicates job is still pending and has not started work\n - RUNNING: Running indicates job is actively running\n - DONE: Done indicates job has finished processing\n - PAUSED: Paused indicates job is paused\n - CANCELLED: Cancelled indicates job is cancelled\n - FAILED: Failed indicates job has failed"
enum:
- UNSPECIFIED_STATE
- PENDING
- RUNNING
- DONE
- PAUSED
- CANCELLED
- FAILED
title: State is an enum for state of a node drain operation
type: string
apiNodeDrainAttachmentsJob:
properties:
Status:
title: Status describes a helpful status of this node drain operation
type: string
create_time:
format: date-time
title: CreateTime is the time the job was created
type: string
issuer:
title: 'Issuer is a user friendly name for the caller who is
invoking the API. It can be used by caller to filter out
drain requests from a particular issuer'
type: string
last_update_time:
format: date-time
title: LastUpdateTime is the time the job was updated
type: string
node_id:
title: NodeID of the node for which this drain job is running
type: string
parameters:
$ref: '#/components/schemas/apiSdkNodeDrainAttachmentsRequest'
title: NodeDrainAttachmentsJob describe a job to drain volume attachments from a node
type: object
apiSdkDiagsCollectResponse:
properties:
job:
$ref: '#/components/schemas/apiJob'
title: SdkDiagsCollectResponse defines a response for an SDK request to collect diags
type: object
apiDefragJob:
properties:
current_running_nodes:
items:
type: string
title: CurrentRunningNodes stores the nodes on which the job is currently running
type: array
exclude_nodes:
items:
type: string
title: 'ExcludeNodes is a list of node UUID: if provided, the job will skip these nodes;
if not provided, will run on all nodes
cannot coexist with IncludeNodes'
type: array
include_nodes:
items:
type: string
title: 'IncludeNodes is a list of node UUID: if provided, will only run the job on these nodes;
if not provided, will run on all nodes
cannot coexist with ExcludeNodes and NodeSelector'
type: array
max_duration_minutes:
format: int64
title: MaxDurationMinutes defines the time limit in minutes
type: integer
max_nodes_in_parallel:
format: int64
title: MaxNodesInParallel defines the maximum number of nodes running the defrag job in parallel
type: integer
node_selector:
items:
$ref: '#/components/schemas/apiLabelSelectorRequirement'
title: 'NodeSelector is a list of node label `key=value` pairs,
which selects the nodes to be run on for the job
can coexist with ExcludeNodes but cannot coexist with IncludeNodes'
type: array
schedule_id:
title: ScheduleId is the ID of the schedule which started this job
type: string
schedule_one_iteration_only:
title: ScheduleOneIterationOnly is true when the defragJob is run by a one-iteration-only schedule
type: boolean
title: DefragJob describes a job to run defragmentation on cluster nodes
type: object
apiDiagsCollectionStatusState:
default: UNSPECIFIED
description: "- UNSPECIFIED: Unspecified means uninitialized or unknown state\n - PENDING: Pending indicates the diags collection is pending and hasn't started\n - RUNNING: Running indicates diags collection is actively running\n - DONE: Done indicates diags collection has finished\n - FAILED: Failed indicates diags collection has failed"
enum:
- UNSPECIFIED
- PENDING
- RUNNING
- DONE
- FAILED
title: State is an enum for state of diags collection on a given node
type: string
apiJobType:
default: UNSPECIFIED_TYPE
description: "- UNSPECIFIED_TYPE: Unspecified\n - NONE: None\n - DRAIN_ATTACHMENTS: Job for draining volume attachments\n - CLOUD_DRIVE_TRANSFER: Job for transferring cloud drives between nodes\n - COLLECT_DIAGS: Job for collecting diags from the cluster nodes\n - DEFRAG: Job for storage defragmentation on cluster nodes"
enum:
- UNSPECIFIED_TYPE
- NONE
- DRAIN_ATTACHMENTS
- CLOUD_DRIVE_TRANSFER
- COLLECT_DIAGS
- DEFRAG
title: Type are the supported job types
type: string
runtimeError:
properties:
code:
format: int32
type: integer
details:
items:
$ref: '#/components/schemas/protobufAny'
type: array
error:
type: string
message:
type: string
type: object
apiJob:
properties:
clouddrive_transfer:
$ref: '#/components/schemas/apiCloudDriveTransferJob'
collect_diags:
$ref: '#/components/schemas/apiCollectDiagsJob'
create_time:
format: date-time
title: CreateTime is the time the job was created
type: string
defrag:
$ref: '#/components/schemas/apiDefragJob'
drain_attachments:
$ref: '#/components/schemas/apiNodeDrainAttachmentsJob'
id:
title: ID of the job
type: string
last_update_time:
format: date-time
title: LastUpdateTime is the time the job was updated
type: string
state:
$ref: '#/components/schemas/apiJobState'
type:
$ref: '#/components/schemas/apiJobType'
title: 'Job is a generic job object that can encapsulate other
messages which follow the job framework of APIs'
type: object
LabelSelectorRequirementOperator:
default: In
description: "- In: In means the value for 'key' should be in one of the given value(s)\n - NotIn: NotIn means the value for 'key' should NOT be in one of the given value(s)\n - Exists: Exists means the 'key' should just exist regardless of the value\n - DoesNotExist: DoesNotExist means the 'key' should NOT exist\n - Gt: Gt means the 'key' should be greater than the value(s)\n - Lt: Lt means the 'key' should be less than the value(s)"
enum:
- In
- NotIn
- Exists
- DoesNotExist
- Gt
- Lt
title: This defines operator types used in a label matching rule
type: string
apiSdkNodeDrainAttachmentsRequest:
properties:
issuer:
title: 'Issuer is a user friendly name for the caller who is
invoking the API. It can be used by caller to filter out
drain requests from a particular issuer'
type: string
node_id:
title: Id of the node to drain
type: string
only_sharedv4:
description: 'Drain only sharedv4 volumes from a node
By default all volumes will be drained.'
type: boolean
selector:
description: 'Selector is used for selecting volumes whose
attachment needs to be moved from this node.
The selector could be a list of volume label
key value pairs to select a subset of volumes.'
items:
$ref: '#/components/schemas/apiLabelSelectorRequirement'
type: array
title: Defines a node drain volume attachments request
type: object
apiCollectDiagsJob:
properties:
request:
$ref: '#/components/schemas/apiSdkDiagsCollectRequest'
statuses:
items:
$ref: '#/components/schemas/apiDiagsCollectionStatus'
title: Statuses is a list of statuses for diags collection for each node that is part of the request
type: array
type: object
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT