Skip to content

Conversation

@yaacov
Copy link
Member

@yaacov yaacov commented Sep 9, 2020

When a running VM is deleted, it may take up to terminationGracePeriod for the VMI to be deleted. In that period of time the VM is removed from the UI and there's no indication for the user that the VMI is still running.

This PR adds a "Deleting" status for VMIs with deleting timestamp.

Screen shot:
Peek 2020-09-09 09-32

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Sep 9, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: This pull request references Bugzilla bug 1873402, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1873402: Add deleting status

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the component/kubevirt Related to kubevirt-plugin label Sep 9, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2020
@yaacov
Copy link
Member Author

yaacov commented Sep 9, 2020

@rawagner @suomiy @irosenzw @glekner please review

@yaacov yaacov force-pushed the add-vm-deleting-status branch from a0f0b2e to 65ae9b4 Compare September 9, 2020 06:45
@yaacov yaacov force-pushed the add-vm-deleting-status branch from 65ae9b4 to c42c449 Compare September 9, 2020 06:50
isVMIPaused(vmi) ? { status: VMStatus.PAUSED, message: PAUSED_VM_MODAL_MESSAGE } : null;

const isDeleting = (vm: VMKind, vmi: VMIKind): VMStatusBundle =>
(vm && !!getDeletetionTimestamp(vm)) || (!vm && vmi && !!getDeletetionTimestamp(vmi))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a situation when you have a VMI object without a VM ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static readonly STOPPING = new VMStatus('VMStatus_STOPPING', VMStatusSimpleLabel.Stopping, {
isInProgress: true,
});
static readonly DELETING = new VMStatus('VMStatus_DELETING', VMStatusSimpleLabel.Deleting, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has to be also mentioned in topology/components/nodes/VmNode.tsx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Stopping = 'Stopping',
Running = 'Running',
Off = 'Off',
Deleting = 'Deleting',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has to be mentioned in getVMStatusGroups

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const isPaused = (vmi: VMIKind): VMStatusBundle =>
isVMIPaused(vmi) ? { status: VMStatus.PAUSED, message: PAUSED_VM_MODAL_MESSAGE } : null;

const isDeleting = (vm: VMKind, vmi: VMIKind): VMStatusBundle =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 much better resolution than what we had before in vm.tsx

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move the function to be in order they are called in the status

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done +1

isBeingMigrated(vm, vmi, migrations) ||
isBeingImported(vm, pods, pvcs, dataVolumes) ||
isDeleting(vm, vmi) ||
isVMError(vm) ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should move it behind isVMError

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the bug, users see "vmi-error" while they need to see "deleting"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a vmi error but possible vm error - which should have a prefference IMO, as it could say a reason why something cannot be deleted even though it has deleteionTimestamp

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, moved

@atiratree
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suomiy, yaacov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit e860b29 into openshift:master Sep 9, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: All pull requests linked via external trackers have merged:

Bugzilla bug 1873402 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1873402: Add deleting status

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.6 milestone Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants