Bug 1968514

Summary: [RFE] Add cancel migration action to virtctl
Product: Container Native Virtualization (CNV) Reporter: Israel Pinto <ipinto>
Component: VirtualizationAssignee: Uri Lublin <uril>
Status: CLOSED ERRATA QA Contact: Akriti Gupta <akrgupta>
Severity: high Docs Contact:
Priority: high    
Version: 4.8.0CC: acardace, akrgupta, cnv-qe-bugs, fdeutsch, kbidarka, sgott, uril
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v4.11.0-315 virt-operator-container-v4.11.0-55 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-14 19:28:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Israel Pinto 2021-06-07 13:28:52 UTC
Description of problem:
Like in the UI and other virtual products we should have in our virtctl the ability to cancel migration.


Version-Release number of selected component (if applicable):
CNV-4.8.0


Additional info:
It can help with situation were the migration is stuck also like the bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1945532

Comment 2 Uri Lublin 2022-01-30 18:50:07 UTC
Upstream patches available: https://github.com/kubevirt/kubevirt/pull/6735

Comment 5 Akriti Gupta 2022-05-06 13:43:51 UTC
Checked with: iib:219905
kubevirt-virtctl-4.11.0-525.el8.x86_64.rpm

[akrgupta@fedora Downloads]$ virtctl migrate vm-rhel84-ocs
VM vm-rhel84-ocs was scheduled to migrate
[akrgupta@fedora Downloads]$ oc describe vm rhel8-excited-crocodile

Status:
  Conditions:
    Last Probe Time:       <nil>
    Last Transition Time:  2022-05-06T13:20:53Z
    Status:                True
    Type:                  Ready
    Last Probe Time:       <nil>
    Last Transition Time:  <nil>
    Message:               cannot migrate VMI: PVC rhel8-excited-crocodile-rootdisk-x7x0e is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode)
    Reason:                DisksNotLiveMigratable
    Status:                False
    Type:                  LiveMigratable
    Last Probe Time:       2022-05-06T13:21:40Z
    Last Transition Time:  <nil>
    Status:                True
    Type:                  AgentConnected
  Created:                 true
  Printable Status:        Running
  Ready:                   true

kubevirt-virtctl-4.11.0-580.el9.x86_64.rpm
[akrgupta@fedora Downloads]$ virtctl migrate vm-rhel84-ocs
VM vm-rhel84-ocs was scheduled to migrate
[akrgupta@fedora Downloads]$ oc describe vm rhel8-excited-crocodile

Status:
  Conditions:
    Last Probe Time:       <nil>
    Last Transition Time:  2022-05-06T13:20:53Z
    Status:                True
    Type:                  Ready
    Last Probe Time:       <nil>
    Last Transition Time:  <nil>
    Message:               cannot migrate VMI: PVC rhel8-excited-crocodile-rootdisk-x7x0e is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode)
    Reason:                DisksNotLiveMigratable
    Status:                False
    Type:                  LiveMigratable
    Last Probe Time:       2022-05-06T13:21:40Z
    Last Transition Time:  <nil>
    Status:                True
    Type:                  AgentConnected
  Created:                 true
  Printable Status:        Running
  Ready:                   true

Comment 7 Akriti Gupta 2022-05-11 07:59:42 UTC
Verifird with iib:219905
virtctl has the ability to cancel migration.


[cnv-qe-jenkins@virt-akr-411-jpqfs-executor ~]$ virtctl migrate vm-rhel84-ocs ; sleep 5 ; virtctl migrate-cancel vm-rhel84-ocs
VM vm-rhel84-ocs was scheduled to migrate
VM vm-rhel84-ocs was scheduled to migrate-cancel

Comment 9 errata-xmlrpc 2022-09-14 19:28:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:6526