Bug 1954017 - VM Rename causes loss of data when a VM defines dataVolumeTemplates
Summary: VM Rename causes loss of data when a VM defines dataVolumeTemplates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.8.0
Assignee: Omer Yahud
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-27 12:58 UTC by Omer Yahud
Modified: 2021-07-27 14:31 UTC (History)
7 users (show)

Fixed In Version: virt-operator-container-v4.8.0-60 hco-bundle-registry-container-v4.8.0-375
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 14:30:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 5564 0 None closed Removal of VM rename 2021-05-26 12:05:46 UTC
Red Hat Product Errata RHSA-2021:2920 0 None None None 2021-07-27 14:31:34 UTC

Description Omer Yahud 2021-04-27 12:58:10 UTC
Description of problem:
During a rename process of a VM, a VM is deleted and created with a new name, in the case of VMs with dataVolumeTemplate defined, the backing DV/PVC are also removed and the data of the VM is lost.

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


How reproducible:
100%

Steps to Reproduce:
1.Create a VM that defines a dataVolumeTemplate (clone from an existing PVC)
2.Make persistent changes to the VM (create a file)
3.Rename the VM and notice that the created file is gone (a new DV has cloned the existing PVC again)

Actual results:
VM data is lost

Expected results:
VM data should remain intact

Comment 2 sgott 2021-06-07 11:59:01 UTC
VM rename option has been removed entirely. To verify, ensure vm rename option doesn't exist.

Comment 4 sgott 2021-06-14 12:02:14 UTC
This BZ failed QE because the rename endpoint was removed fromt he api, but the option to rename appears to still be present in the client.

Comment 6 Igor Bezukh 2021-06-14 12:17:42 UTC
Hi,

According to the output of the virtctl you've used, it's code was based on a Git commit from 15th of April, while the VM rename removal was merged only on May the 7th.

This is why you still could invoke the rename command.

I've took the latest virtctl build from Brew, using think link: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1625638

The issue is being resolved there.

If you confirm, please move the bug to ON_QA

TIA
Igor

Comment 7 sgott 2021-07-07 12:11:56 UTC
Kedar, I think this is already fixed in 4.8.0, can you please verify the client change is present?

Comment 8 Kedar Bidarkar 2021-07-08 17:50:46 UTC
Tested With Package version: kubevirt-virtctl-4.8.0-226.el8.x86_64.rpm

]$ virtctl --help 
virtctl controls virtual machine related operations on your kubernetes cluster.

Available Commands:
  addvolume    add a volume to a running VM
  console      Connect to a console of a virtual machine instance.
  expose       Expose a virtual machine instance, virtual machine, or virtual machine instance replica set as a new service.
  fslist       Return full list of filesystems available on the guest machine.
  guestosinfo  Return guest agent info about operating system.
  help         Help about any command
  image-upload Upload a VM image to a DataVolume/PersistentVolumeClaim.
  migrate      Migrate a virtual machine.
  pause        Pause a virtual machine
  removevolume remove a volume from a running VM
  restart      Restart a virtual machine.
  start        Start a virtual machine.
  stop         Stop a virtual machine.
  unpause      Unpause a virtual machine
  userlist     Return full list of logged in users on the guest machine.
  version      Print the client and server version information.
  vnc          Open a vnc connection to a virtual machine instance.

---

Summary: We no longer have the "rename" option while we do "virtctl --help"

Tested this with 4.8.0 virtctl package.

Moving this bug to 4.8.0 and also marking this as VERIFIED.

Comment 11 errata-xmlrpc 2021-07-27 14:30:44 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 (Moderate: OpenShift Virtualization 4.8.0 Images), 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-2021:2920


Note You need to log in before you can comment on or make changes to this bug.