Bug 1954498 - The example in virtctl removevolume help information is not accurate
Summary: The example in virtctl removevolume help information is not accurate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Alexander Wels
QA Contact: Yan Du
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-28 09:34 UTC by Yan Du
Modified: 2021-07-27 14:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 14:31:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 5624 0 None closed Update removevolume virtctl example. 2021-05-12 18:32:48 UTC
Red Hat Product Errata RHSA-2021:2920 0 None None None 2021-07-27 14:32:08 UTC

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


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