Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/dev_module_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,7 @@ jobs:
working-directory: ./tests/e2e/
run: |
echo "Install ginkgo"
GINKGO_VERSION=$(go list -f '{{.Version}}' -m github.com/onsi/ginkgo/v2)
go install "github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}"
go install tool

- uses: deckhouse/modules-actions/setup@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/dev_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ jobs:
virtualization-artifact)
cd ./images/virtualization-artifact
echo "Installing go dependencies..."
go install github.com/matryer/[email protected]
go install github.com/onsi/ginkgo/v2/[email protected]
go install tool
cd ..
task controller:dev:gogenerate
check_diffs ./images/virtualization-artifact
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly_e2e_tests_ceph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:
working-directory: ./tests/e2e/
run: |
echo "Install ginkgo"
GINKGO_VERSION=$(go list -f '{{.Version}}' -m github.com/onsi/ginkgo/v2)
go install "github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}"
go tool install

- name: Install Deckhouse-cli
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nightly_e2e_tests_replicated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: End-to-End tests + Replicated storage

env:
CSI: replicated.csi.storage.deckhouse.io
STORAGE_CLASS_NAME: linstor-thin-r1-immediate
STORAGE_CLASS_NAME: linstor-thin-r1
CI_COMMIT_REF_NAME: ${{ github.ref_name }}
GO_VERSION: "1.24.5"
TIMEOUT: "2h"
Expand Down Expand Up @@ -49,8 +49,7 @@ jobs:
working-directory: ./tests/e2e/
run: |
echo "Install ginkgo"
GINKGO_VERSION=$(go list -f '{{.Version}}' -m github.com/onsi/ginkgo/v2)
go install "github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}"
go install tool

- name: Install Deckhouse-cli
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_e2e_tests_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
markdown_table+="$separator"

LABEL_KEY="storageClass"
LABEL_VALUES=("ceph-pool-r2-csi-rbd-immediate" "linstor-thin-r1-immediate")
LABEL_VALUES=("ceph-pool-r2-csi-rbd-immediate" "linstor-thin-r1")

DATE=$(date +"%Y-%m-%d")
COMBINED_SUMMARY="## :dvp: **DVP | End-to-End tests | $DATE**\n"
Expand Down
1 change: 1 addition & 0 deletions api/core/v1alpha2/finalizers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
FinalizerVDSnapshotProtection = "virtualization.deckhouse.io/vdsnapshot-protection"
FinalizerVMSnapshotProtection = "virtualization.deckhouse.io/vmsnapshot-protection"
FinalizerVMOPProtectionByEvacuationController = "virtualization.deckhouse.io/vmop-protection-by-evacuation-controller"
FinalizerVMOPProtectionByVMController = "virtualization.deckhouse.io/vmop-protection-by-vm-controller"

FinalizerCVICleanup = "virtualization.deckhouse.io/cvi-cleanup"
FinalizerVDCleanup = "virtualization.deckhouse.io/vd-cleanup"
Expand Down
19 changes: 19 additions & 0 deletions api/core/v1alpha2/vdcondition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const (
StorageClassReadyType Type = "StorageClassReady"
// InUseType indicates whether the VirtualDisk is attached to a running VirtualMachine or is being used in a process of an image creation.
InUseType Type = "InUse"
// MigratingType indicates that the virtual disk is in the process of migrating data from one volume to another (during the migration of a local disk or migration to another storage class).
MigratingType Type = "Migrating"
)

type (
Expand All @@ -51,6 +53,8 @@ type (
StorageClassReadyReason string
// InUseReason represents the various reasons for the InUse condition type.
InUseReason string
// MigratingReason represents the various reasons for the Migration condition type.
MigratingReason string
)

func (s DatasourceReadyReason) String() string {
Expand All @@ -77,6 +81,10 @@ func (s InUseReason) String() string {
return string(s)
}

func (s MigratingReason) String() string {
return string(s)
}

const (
// DatasourceReady indicates that the datasource is ready for use, allowing the import process to start.
DatasourceReady DatasourceReadyReason = "DatasourceReady"
Expand Down Expand Up @@ -168,3 +176,14 @@ const (
// NotInUse indicates that VirtualDisk free for use.
NotInUse InUseReason = "NotInUse"
)

const (
// MigratingWaitForTargetReadyReason indicates that the target for migration is ready.
MigratingWaitForTargetReadyReason MigratingReason = "WaitForTargetReady"
// MigratingInProgressReason indicates that the VirtualDisk is migrating.
MigratingInProgressReason MigratingReason = "InProgress"

ResizingInProgressReason MigratingReason = "ResizingInProgress"
SnapshottingInProgressReason MigratingReason = "SnapshottingInProgress"
StorageClassNotFoundReason MigratingReason = "StorageClassNotFound"
)
27 changes: 26 additions & 1 deletion api/core/v1alpha2/virtual_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ type VirtualDiskStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Name of the StorageClass used by the PersistentVolumeClaim if `Kubernetes` storage type is used.
StorageClassName string `json:"storageClassName,omitempty"`

// Migration information.
MigrationState VirtualDiskMigrationState `json:"migrationState,omitempty"`
}

// VirtualDisk statistics.
Expand Down Expand Up @@ -198,7 +201,8 @@ type VirtualDiskList struct {
// * `PVCLost`: The child PVC of the resource is missing. The resource cannot be used.
// * `Exporting`: The child PV of the resource is in the process of exporting.
// * `Terminating`: The resource is being deleted.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,WaitForFirstConsumer,Ready,Resizing,Failed,PVCLost,Exporting,Terminating}
// * `Migrating`: The resource is being migrating.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,WaitForFirstConsumer,Ready,Resizing,Failed,PVCLost,Exporting,Terminating,Migrating}
type DiskPhase string

const (
Expand All @@ -212,4 +216,25 @@ const (
DiskLost DiskPhase = "PVCLost"
DiskExporting DiskPhase = "Exporting"
DiskTerminating DiskPhase = "Terminating"
DiskMigrating DiskPhase = "Migrating"
)

type VirtualDiskMigrationState struct {
// Source PersistentVolumeClaim name.
SourcePVC string `json:"sourcePVC,omitempty"`
// Target PersistentVolumeClaim name.
TargetPVC string `json:"targetPVC,omitempty"`
Result VirtualDiskMigrationResult `json:"result,omitempty"`
Message string `json:"message,omitempty"`
StartTimestamp metav1.Time `json:"startTimestamp,omitempty"`
EndTimestamp metav1.Time `json:"endTimestamp,omitempty"`
}

// VirtualDiskMigrationResult is the result of the VirtualDisk migration.
// +kubebuilder:validation:Enum=Succeeded;Failed
type VirtualDiskMigrationResult string

const (
VirtualDiskMigrationResultSucceeded VirtualDiskMigrationResult = "Succeeded"
VirtualDiskMigrationResultFailed VirtualDiskMigrationResult = "Failed"
)
Loading
Loading