mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-21 20:51:45 +00:00
feat: ensure the state is pending when perform cloning the efi (#730)
* feat: ensure the state is pending when perform cloning the efi Signed-off-by: pohanhuang <pohan.huang@suse.com> * feat: define harvesterhci.io/clone-backend-storage-status in labels-annotations.js Signed-off-by: pohanhuang <pohan.huang@suse.com> --------- Signed-off-by: pohanhuang <pohan.huang@suse.com>
This commit is contained in:
parent
df3d249923
commit
a2486a7d38
@ -28,6 +28,7 @@ export const HCI = {
|
||||
NODE_ROLE_CONTROL_PLANE: 'node-role.kubernetes.io/control-plane',
|
||||
NODE_ROLE_ETCD: 'node-role.harvesterhci.io/witness',
|
||||
PROMOTE_STATUS: 'harvesterhci.io/promote-status',
|
||||
CLONE_BACKEND_STORAGE_STATUS: 'harvesterhci.io/clone-backend-storage-status',
|
||||
MIGRATION_STATE: 'harvesterhci.io/migrationState',
|
||||
VOLUME_CLAIM_TEMPLATE: 'harvesterhci.io/volumeClaimTemplates',
|
||||
IMAGE_NAME: 'harvesterhci.io/image-name',
|
||||
|
||||
@ -770,11 +770,11 @@ export default class VirtVm extends HarvesterResource {
|
||||
}
|
||||
|
||||
get isPending() {
|
||||
if (this &&
|
||||
if ((this &&
|
||||
!this.isVMExpectedRunning &&
|
||||
this.isVMCreated &&
|
||||
this.vmi?.status?.phase === VMIPhase.Pending
|
||||
) {
|
||||
) || (this.metadata?.annotations?.[HCI_ANNOTATIONS.CLONE_BACKEND_STORAGE_STATUS] === 'cloning')) {
|
||||
return { status: VMIPhase.Pending };
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user