Bug 1954498

Summary: The example in virtctl removevolume help information is not accurate
Product: Container Native Virtualization (CNV) Reporter: Yan Du <yadu>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8.0CC: alitke, awels, cnv-qe-bugs
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 14:31:30 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 Yan Du 2021-04-28 09:34:29 UTC
Description of problem:
The example in virtctl removevolume help information is not accurate

Version-Release number of selected component (if applicable):
CNV4.8
virtctl-4.8.0-200.el7.x86_64.rpm


How reproducible:
Always

Steps to Reproduce:
1. Check the virtctl removevolume help info
2.
3.

Actual results:
$ virtctl removevolume -h
remove a volume from a running VM

Usage:
  virtctl removevolume VMI [flags]

Examples:
  # Removevolume a virtual machine called 'myvm':
  virtctl removevolume myvm

Flags:
  -h, --help                 help for removevolume
      --persist              if set, the added volume will be persisted in the VM spec (if it exists)
      --volume-name string   name used in volumes section of spec

Use "virtctl options" for a list of global command-line options (applies to all commands).


Expected results:
The example should be 
Examples:
  # Removevolume a virtual machine called 'myvm':
  virtctl removevolume myvm --volume-name=example-dv

Because the --volume-name is a required flag

Additional info:
$ virtctl removevolume fedora-1619602311-900866 
required flag(s) "volume-name" not set

Comment 1 Adam Litke 2021-05-12 18:14:22 UTC
Any updates on this bug Alexander?

Comment 2 Alexander Wels 2021-05-12 18:32:52 UTC
Yes PR was merged. Does it need a backport?

Comment 3 Adam Litke 2021-05-12 20:04:52 UTC
Yes, it's targeted to 4.8.  Please attach a link to the backport PR once it's created.

Comment 4 Yan Du 2021-05-17 09:30:18 UTC
Test with kubevirt-virtctl-4.8.0-212.el7.x86_64, issue have been fixed.

$ virtctl removevolume  -h
remove a volume from a running VM

Usage:
  virtctl removevolume VMI [flags]

Examples:
  #Remove volume that was dynamically attached to a running VM.
  virtctl removevolume fedora-dv --volume-name=example-dv

  #Remove volume dynamically attached to a running VM and persisting it in the VM spec.
  virtctl removevolume fedora-dv --volume-name=example-dv --persist
  

Flags:
  -h, --help                 help for removevolume
      --persist              if set, the added volume will be persisted in the VM spec (if it exists)
      --volume-name string   name used in volumes section of spec

Use "virtctl options" for a list of global command-line options (applies to all commands).

Comment 7 errata-xmlrpc 2021-07-27 14:31:30 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