snapshot

package
v0.0.0-...-9913de7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefTimeoutSecs                           = 330 //exponential retry has max timeout of 300 seconds, so DefTimeoutSecs is set to 330 seconds
	DefSnapsErrorTimeout                     = 60  // in seconds
	IoEnginePodName                          = e2e_config.GetConfig().Product.IOEnginePodName
	FioRunTime                               = 1200 // in seconds
	VolSizeMb                                = 8192 // in  MiB
	BadRequestErrorSubstring                 = "400 Bad Request"
	PreConditionFailedErrorSubstring         = "412 Precondition Failed"
	PreConditionFailedFsfreezeErrorSubstring = "Preflight check for fsfreeze failed, nvmf subsystem not in desired state"
	DefCpTimeoutSecs                         = 60 // in seconds, timeout value used for snapshot verification via control plane
)

Functions

func CreateVolumeSnapshot

func CreateVolumeSnapshot(snapshotClassName string, snapshotName string, pvc string, namespace string) (*v1.VolumeSnapshot, string, error)

CreateVolumeSnapshot create snapshot class and snapshot it return snapshot object , snapshot content name and err

func DeleteFailedVolumeSnapshot

func DeleteFailedVolumeSnapshot(snapshotClassName string, snapshotName string, snapshotContentName string, namespace string) error

DeleteVolumeSnapshot delete snapshot class and snapshot and returns an err

func DeleteVolumeSnapshot

func DeleteVolumeSnapshot(snapshotClassName string, snapshotName string, namespace string) error

DeleteVolumeSnapshot delete snapshot class and snapshot and returns an err

func RemoveFailedSnapshot

func RemoveFailedSnapshot(snapshotName string, snapshotContentName string, namespace string) error

RemoveFailedSnapshot delete a snapshot and remove annotation from snapshot content and verify that

  1. The Volume Snapshot is deleted
  2. The associated Volume Snapshot ContentPV is deleted

func VerifySnapshotReplicas

func VerifySnapshotReplicas(snapUuid string, replicaCount int, volUuid string) (bool, error)

VerifySnapshotReplicas to check if number of SNAPSHOT_REPLICAS for a volume matches with the number of replicas for a volume

func VerifySuccessfulCpSnapshotCreation

func VerifySuccessfulCpSnapshotCreation(snapshotName string, volUuid string, namespace string) (bool, error)

VerifySuccessfulCpSnapshotCreation verify control plane using kubectl mayastor plugin : 1. snapshot and snapshot content ready status 2. snapshot restore size should not be zero 3. snapshot creation time should not be empty

func VerifySuccessfulSnapshotCreation

func VerifySuccessfulSnapshotCreation(snapshotName string, snapshotContentName string, namespace string, skipSnapError bool) (bool, error)

VerifySuccessfulSnapshotCreation verify: 1. snapshot and snapshot content ready status 2. snapshot restore size should not be zero 3. snapshot creation time should not be empty

func WaitForCpSnapshotReadyStatus

func WaitForCpSnapshotReadyStatus(snapshotUid string, volUuid string) (bool, error)

Wait for the Snapshot to be ready as per control plane.

func WaitForSnapshotContentReadyStatus

func WaitForSnapshotContentReadyStatus(snapshotContentName string, skipSnapError bool) (bool, error)

Wait for the Snapshot content to be ready.

func WaitForSnapshotError

func WaitForSnapshotError(snapshot string, namespace string, errorMessageSubstring string) (bool, error)

Wait for the Snapshot error to be updated.

func WaitForSnapshotReadyStatus

func WaitForSnapshotReadyStatus(snapshotName string, namespace string, skipSnapError bool) (bool, error)

Wait for the Snapshot to be ready.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL