Documentation ¶
Index ¶
- Constants
- func CheckAllMayastorVolumesAreHealthy() error
- func CheckForMayastorVolumes() (bool, error)
- func CheckPluginError(jsonInput []byte, err error) error
- func GetClusterRestAPINodeIPs() ([]string, error)
- func GetMayastorNodeStatus(nodeName string) (string, error)
- func GetMayastorVolumeChildState(uuid string) (string, error)
- func GetMayastorVolumeChildren(volName string) ([]common.TargetChild, error)
- func GetMayastorVolumeState(volName string) (string, error)
- func GetMayastorVolumeTargetNode(uuid string) (string, error)
- func GetPluginPath() string
- func GetPluginVersion() (string, error)
- func HasNotFoundRestJsonError(str string) bool
- func IsMayastorVolumeDeleted(uuid string) bool
- func IsMayastorVolumePublished(uuid string) bool
- type CPv1
- func (cp CPv1) CanDeleteMsv() bool
- func (cp CPv1) CheckAllMsvsAreHealthy() error
- func (cp CPv1) CheckForMsvs() (bool, error)
- func (cp CPv1) ChildStateDegraded() string
- func (cp CPv1) ChildStateFaulted() string
- func (cp CPv1) ChildStateOnline() string
- func (cp CPv1) ChildStateUnknown() string
- func (cp CPv1) CordonNode(nodeName string, cordonLabel string) error
- func (cp CPv1) CreatePoolOnInstall() bool
- func (cp CPv1) DeleteMsv(volName string) error
- func (cp CPv1) DeleteUpgrade() error
- func (cp CPv1) DrainNode(nodeName string, drainLabel string, drainTimeOut int) error
- func (cp CPv1) GetCordonNodeLabels(nodeName string) ([]string, error)
- func (cp CPv1) GetDrainNodeLabels(nodeName string) ([]string, []string, error)
- func (cp CPv1) GetMSN(nodeName string) (*common.MayastorNode, error)
- func (cp CPv1) GetMSV(uuid string) (*common.MayastorVolume, error)
- func (cp CPv1) GetMsNodeStatus(nodeName string) (string, error)
- func (cp CPv1) GetMsPool(poolName string) (*common.MayastorPool, error)
- func (cp CPv1) GetMsvMaxSnapshotCount(uuid string) (int32, error)
- func (cp CPv1) GetMsvNexusChildren(volName string) ([]common.TargetChild, error)
- func (cp CPv1) GetMsvNexusState(uuid string) (string, error)
- func (cp CPv1) GetMsvNodes(uuid string) (string, []string)
- func (cp CPv1) GetMsvReplicaTopology(volUuid string) (common.ReplicaTopology, error)
- func (cp CPv1) GetMsvReplicas(volName string) ([]common.MsvReplica, error)
- func (cp CPv1) GetMsvSize(uuid string) (int64, error)
- func (cp CPv1) GetMsvState(uuid string) (string, error)
- func (cp CPv1) GetMsvTargetNode(volName string) (string, error)
- func (cp CPv1) GetMsvTargetUuid(uuid string) (string, error)
- func (cp CPv1) GetPerSnapshotVolumeSnapshotTopology(snapshotId string) (common.SnapshotSchema, error)
- func (cp CPv1) GetSnapshot(snapshotId string) (common.SnapshotSchema, error)
- func (cp CPv1) GetSnapshots() ([]common.SnapshotSchema, error)
- func (cp CPv1) GetToUpgradeVersion() (string, error)
- func (cp CPv1) GetUpgradeStatus() (string, error)
- func (cp CPv1) GetVolumeSnapshot(volUuid string, snapshotId string) (common.SnapshotSchema, error)
- func (cp CPv1) GetVolumeSnapshotTopology() ([]common.SnapshotSchema, error)
- func (cp CPv1) GetVolumeSnapshots(volUuid string) ([]common.SnapshotSchema, error)
- func (cp CPv1) IsMsvDeleted(uuid string) bool
- func (cp CPv1) IsMsvPublished(uuid string) bool
- func (cp CPv1) IsTimeoutError(err error) bool
- func (cp CPv1) ListMsPools() ([]common.MayastorPool, error)
- func (cp CPv1) ListMsns() ([]common.MayastorNode, error)
- func (cp CPv1) ListMsvs() ([]common.MayastorVolume, error)
- func (cp CPv1) ListRestoredMsvs() ([]common.MayastorVolume, error)
- func (cp CPv1) MajorVersion() int
- func (cp CPv1) MspStateOnline() string
- func (cp CPv1) NexusStateDegraded() string
- func (cp CPv1) NexusStateFaulted() string
- func (cp CPv1) NexusStateOnline() string
- func (cp CPv1) NexusStateUnknown() string
- func (cp CPv1) NodeStateEmpty() string
- func (cp CPv1) NodeStateOffline() string
- func (cp CPv1) NodeStateOnline() string
- func (cp CPv1) NodeStateUnknown() string
- func (cp CPv1) ReplicaStateDegraded() string
- func (cp CPv1) ReplicaStateFaulted() string
- func (cp CPv1) ReplicaStateOnline() string
- func (cp CPv1) ReplicaStateUnknown() string
- func (cp CPv1) SetMsvReplicaCount(uuid string, replicaCount int) error
- func (cp CPv1) SetVolumeMaxSnapshotCount(uuid string, maxSnapshotCount int32) error
- func (cp CPv1) UnCordonNode(nodeName string, cordonLabel string) error
- func (cp CPv1) UpdateNodeLabel(nodeName string, labelKey, labelValue string) error
- func (cp CPv1) Upgrade(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) (string, error)
- func (cp CPv1) UpgradeWithSkipCordonNodeValidation(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
- func (cp CPv1) UpgradeWithSkipDataPlaneRestart(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
- func (cp CPv1) UpgradeWithSkipReplicaRebuild(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
- func (cp CPv1) UpgradeWithSkipSingleReplicaValidation(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
- func (cp CPv1) Version() string
- func (cp CPv1) VolStateDegraded() string
- func (cp CPv1) VolStateFaulted() string
- func (cp CPv1) VolStateHealthy() string
- func (cp CPv1) VolStateUnknown() string
- type CordonDrainState
- type CordonedState
- type DrainedState
- type DrainingState
- type MayastorCpNode
- type MayastorCpPool
- type NodeCordonLabelsInfo
- type NodeCordonSpec
- type NodeCordonState
Constants ¶
const ( SkipDataPlaneRestartFlag upgradeFlags = "--skip-data-plane-restart" SkipSingleReplicaValidationFlag upgradeFlags = "--skip-single-replica-volume-validation" SkipReplicaRebuildFlag upgradeFlags = "--skip-replica-rebuild" SkipCordonNodeValidationFlag upgradeFlags = "--skip-cordoned-node-validation" AllowUpgradeToUnstableBranchFlag upgradeFlags = "--allow-unstable" DisablePartialRebuild upgradeFlags = "agents.core.rebuild.partial.enabled=false" )
const ErrOutput = "Error error"
const ErrorResponse = "412 Precondition Failed"
Variables ¶
This section is empty.
Functions ¶
func CheckAllMayastorVolumesAreHealthy ¶
func CheckAllMayastorVolumesAreHealthy() error
func CheckForMayastorVolumes ¶
func CheckPluginError ¶
func GetClusterRestAPINodeIPs ¶
GetClusterRestAPINodeIPs return a set of IP addresses which can be used to communicate mayastor using the REST API returns test control nodes IP addresses
func GetMayastorNodeStatus ¶
func GetMayastorVolumeChildren ¶
func GetMayastorVolumeChildren(volName string) ([]common.TargetChild, error)
func GetMayastorVolumeState ¶
func GetPluginPath ¶
func GetPluginPath() string
func GetPluginVersion ¶
GetPluginVersion returns the kubectl-maystor plugin version this function uses the kubectl-mayastor --version command and filter the output to get plugin version using `awk`
func IsMayastorVolumeDeleted ¶
Types ¶
type CPv1 ¶
type CPv1 struct {
// contains filtered or unexported fields
}
func (CPv1) CanDeleteMsv ¶
func (CPv1) CheckAllMsvsAreHealthy ¶
func (CPv1) CheckForMsvs ¶
func (CPv1) ChildStateDegraded ¶
func (CPv1) ChildStateFaulted ¶
func (CPv1) ChildStateOnline ¶
func (CPv1) ChildStateUnknown ¶
func (CPv1) CreatePoolOnInstall ¶
func (CPv1) DeleteUpgrade ¶
func (CPv1) GetCordonNodeLabels ¶
func (CPv1) GetDrainNodeLabels ¶
GetDrainNodeLabels returns draining, drained labels and error
func (CPv1) GetMSN ¶
func (cp CPv1) GetMSN(nodeName string) (*common.MayastorNode, error)
GetMSN Get pointer to a mayastor control plane volume returns nil and no error if the msn is in pending state.
func (CPv1) GetMSV ¶
func (cp CPv1) GetMSV(uuid string) (*common.MayastorVolume, error)
GetMSV Get pointer to a mayastor control plane volume returns nil and no error if the msv is in pending state.
func (CPv1) GetMsPool ¶
func (cp CPv1) GetMsPool(poolName string) (*common.MayastorPool, error)
GetMsPool Get pointer to a mayastor control plane pool
func (CPv1) GetMsvMaxSnapshotCount ¶
func (CPv1) GetMsvNexusChildren ¶
func (cp CPv1) GetMsvNexusChildren(volName string) ([]common.TargetChild, error)
func (CPv1) GetMsvNodes ¶
GetMsvNodes Retrieve the nexus node hosting the Mayastor Volume, and the names of the replica nodes
func (CPv1) GetMsvReplicaTopology ¶
func (cp CPv1) GetMsvReplicaTopology(volUuid string) (common.ReplicaTopology, error)
func (CPv1) GetMsvReplicas ¶
func (cp CPv1) GetMsvReplicas(volName string) ([]common.MsvReplica, error)
func (CPv1) GetPerSnapshotVolumeSnapshotTopology ¶
func (cp CPv1) GetPerSnapshotVolumeSnapshotTopology(snapshotId string) (common.SnapshotSchema, error)
func (CPv1) GetSnapshot ¶
func (cp CPv1) GetSnapshot(snapshotId string) (common.SnapshotSchema, error)
func (CPv1) GetSnapshots ¶
func (cp CPv1) GetSnapshots() ([]common.SnapshotSchema, error)
func (CPv1) GetToUpgradeVersion ¶
func (CPv1) GetUpgradeStatus ¶
func (CPv1) GetVolumeSnapshot ¶
func (CPv1) GetVolumeSnapshotTopology ¶
func (cp CPv1) GetVolumeSnapshotTopology() ([]common.SnapshotSchema, error)
func (CPv1) GetVolumeSnapshots ¶
func (cp CPv1) GetVolumeSnapshots(volUuid string) ([]common.SnapshotSchema, error)
func (CPv1) IsMsvDeleted ¶
func (CPv1) IsMsvPublished ¶
func (CPv1) IsTimeoutError ¶
func (CPv1) ListMsPools ¶
func (cp CPv1) ListMsPools() ([]common.MayastorPool, error)
func (CPv1) ListRestoredMsvs ¶
func (cp CPv1) ListRestoredMsvs() ([]common.MayastorVolume, error)
func (CPv1) MajorVersion ¶
func (CPv1) MspStateOnline ¶
func (CPv1) NexusStateDegraded ¶
func (CPv1) NexusStateFaulted ¶
func (CPv1) NexusStateOnline ¶
func (CPv1) NexusStateUnknown ¶
func (CPv1) NodeStateEmpty ¶
func (CPv1) NodeStateOffline ¶
func (CPv1) NodeStateOnline ¶
func (CPv1) NodeStateUnknown ¶
func (CPv1) ReplicaStateDegraded ¶
func (CPv1) ReplicaStateFaulted ¶
func (CPv1) ReplicaStateOnline ¶
func (CPv1) ReplicaStateUnknown ¶
func (CPv1) SetMsvReplicaCount ¶
func (CPv1) SetVolumeMaxSnapshotCount ¶
func (CPv1) UpdateNodeLabel ¶
UpdateNodeLabel adds or remove labels from nodes
func (CPv1) Upgrade ¶
func (cp CPv1) Upgrade(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) (string, error)
This function is to fire upgrade command with kubectl mayastor plugin Syntax is: `kubectl-mayastor upgrade` this function takes one boolean parameter, `isUpgradingToUnstableBranch` this parameters is passed as true if we want to test upgrade to unstable main branch and uses --allow-unstable flag with upgrade command.
func (CPv1) UpgradeWithSkipCordonNodeValidation ¶
func (cp CPv1) UpgradeWithSkipCordonNodeValidation(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
this function takes one boolean parameter, `isUpgradingToUnstableBranch` this parameters is passed as true if we want to test upgrade to unstable main branch and uses --allow-unstable flag with upgrade command.
func (CPv1) UpgradeWithSkipDataPlaneRestart ¶
func (cp CPv1) UpgradeWithSkipDataPlaneRestart(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
This function is for starting upgrade with a flag to skip data plane restart User can manually restart data plane later. During upgrade images will be upgraded but pod restart will be manual process when used this flag. Syntax is: `kubectl-mayastor upgrade --skip-data-plane-restart` this function takes one boolean parameter, `isUpgradingToUnstableBranch` this parameters is passed as true if we want to test upgrade to unstable main branch and uses --allow-unstable flag with upgrade command.
func (CPv1) UpgradeWithSkipReplicaRebuild ¶
func (cp CPv1) UpgradeWithSkipReplicaRebuild(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
This function is to fire upgrade command with kubectl mayastor plugin with --skip-replica-rebuild flag Syntax is: `kubectl-mayastor upgrade --skip-replica-rebuild` this function takes one boolean parameter, `isUpgradingToUnstableBranch` this parameters is passed as true if we want to test upgrade to unstable main branch and uses --allow-unstable flag with upgrade command.
func (CPv1) UpgradeWithSkipSingleReplicaValidation ¶
func (cp CPv1) UpgradeWithSkipSingleReplicaValidation(isUpgradingToUnstableBranch, isPartialRebuildDisableNeeded bool) error
This function is to fire upgrade command with skip single replica volume validation flag Syntax is: `kubectl-mayastor upgrade --skip-single-replica-volume-validation` this function takes one boolean parameter, `isUpgradingToUnstableBranch` this parameters is passed as true if we want to test upgrade to unstable main branch and uses --allow-unstable flag with upgrade command.
func (CPv1) VolStateDegraded ¶
func (CPv1) VolStateFaulted ¶
func (CPv1) VolStateHealthy ¶
func (CPv1) VolStateUnknown ¶
type CordonDrainState ¶
type CordonDrainState struct { CordonedState *CordonedState `json:"cordonedstate,omitempty"` DrainingState *DrainingState `json:"drainingstate,omitempty"` DrainedState *DrainedState `json:"drainedstate,omitempty"` }
type CordonedState ¶
type CordonedState struct {
CordonLabels []string `json:"cordonlabels"`
}
type DrainedState ¶
type DrainingState ¶
type MayastorCpNode ¶
type MayastorCpNode struct { Spec msnSpec `json:"spec"` State msnState `json:"state"` }
func GetMayastorCpNode ¶
func GetMayastorCpNode(nodeName string) (*MayastorCpNode, error)
func ListMayastorCpNodes ¶
func ListMayastorCpNodes() ([]MayastorCpNode, error)
type MayastorCpPool ¶
type MayastorCpPool struct { Id string `json:"id"` Spec mspSpec `json:"spec"` State mspState `json:"state"` }
func GetMayastorCpPool ¶
func GetMayastorCpPool(name string) (*MayastorCpPool, error)
func ListMayastorCpPools ¶
func ListMayastorCpPools() ([]MayastorCpPool, error)
type NodeCordonLabelsInfo ¶
type NodeCordonLabelsInfo struct { Id string `json:"id"` Spec NodeCordonSpec `json:"spec"` State NodeCordonState `json:"state"` }
type NodeCordonSpec ¶
type NodeCordonSpec struct { GrpcEndpoint string `json:"grpcEndpoint"` Id string `json:"id"` CordonDrainState *CordonDrainState `json:"cordondrainstate,omitempty"` }