Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1211573

Summary: [Doc] Usage for "--wait" in virt-viewer manual page should keep consistent with "virt-viewer --help"
Product: Red Hat Enterprise Linux 6 Reporter: zhoujunqin <juzhou>
Component: virt-viewerAssignee: Pavel Grunt <pgrunt>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: cfergeau, codong, dblechte, mzhan, pgrunt, rbalakri, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 17:18:19 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 zhoujunqin 2015-04-14 10:59:18 UTC
Description of problem:
Usage for "--wait" in virt-viewer manual page should keep consistent with "virt-viewer --help" 

Version-Release number of selected component (if applicable):
virt-viewer-2.0-5.el6.x86_64

How reproducible:
100%


Steps to Reproduce:
1. Check usage for "--wait" in virt-viewer manual page:
# man virt-viewer 
       -w, --wait
           Wait for the domain to start up before attempting to connect to the console

2. Check usage for "--wait" in virt-viewer in help information:
# virt-viewer --help
...
 -w, --wait=DOMAIN-NAME|ID|UUID                                    Wait for domain to start

3. Try to use "--wait" when connect to guest:
Part1 :
# virt-viewer  --wait --debug ---> virt-viewer deals with --debug as guest name and showing "Waiting for guest domain to be created" in a window.

# virt-viewer  --wait --debug test ---> virt-viewer deals guest name as test 
and ignore --debug

# virt-viewer --debug  --wait test ----> guest window launched successfully and debug information displayed.
 
Part2:
# virt-viewer  --wait=cdrom-rhel6u6-x64 ---> guest window launched successfully.

# virt-viewer cdrom-rhel6u7-x64  --wait
Missing argument for --wait
Run 'virt-viewer --help' to see a full list of available command line options

Actual results:
As above.

Expected results:
Modify "--wait" usage in manual and keep consistent with in help information. 

Additional info:

Comment 2 Pavel Grunt 2015-04-14 13:16:45 UTC
What was described in "Part 2" is the correct behaviour: 'virt-viewer VM --wait' is wrong usage.

Part 1 is fixed upstream by commits:
5fa7ef636e80dd6fdae28630e091a832045e86ea
9ba2d28a0f35b69befd26d7c122bbe4cd626422f
10264d0d1ecbd67d3e59e3a1a3032936b0635eda

Comment 3 Pavel Grunt 2015-04-14 17:18:19 UTC
It was decided to revert changes related to the '--wait' option to keep the command line api the same. The manpage and '--help' option will remain the same.

just to make it clear:
(In reply to zhoujunqin from comment #0)
> Part1 :
> # virt-viewer  --wait --debug 

it will be an error - '--wait' shouldn't be used without a domain name

> 
> # virt-viewer  --wait --debug test 

it will launch (or wait for) the guest named 'test', --debug option will work as expected

> 
> # virt-viewer --debug  --wait test 

it will launch (or wait for) the guest named 'test', --debug option will work as expected

>  
> Part2:
> # virt-viewer  --wait=cdrom-rhel6u6-x64 
> 

error, 'virt-viewer  --wait cdrom-rhel6u6-x64 ' is correct as it was before

> # virt-viewer cdrom-rhel6u7-x64  --wait

it will launch (or wait for) the guest named 'cdrom-rhel6u6-x64'

Comment 4 zhoujunqin 2015-04-15 03:20:37 UTC
Test it with new virt-viewer version:

virt-viewer-2.0-6.el6.x86_64

1.
# virt-viewer  --wait --debug

No DOMAIN-NAME|ID|UUID was specified for '--wait'

Result: Error message is expected, to tell user '--wait' shouldn't be used without a domain name.

2.
Running guest:
# virt-viewer  --wait --debug cdrom-rhel6u7-x64

Result: Guest launch with debug information displayed.

Shutdown guest:
virt-viewer window launched and showing "waiting for guest domain for start" and debug info displayed.

3.
Running guest:
# virt-viewer  --debug --wait  cdrom-rhel6u7-x64

Result: Guest launch with debug information displayed.

Shutdown guest: 
virt-viewer window launched and showing "waiting for guest domain for start" and debug info displayed.


4. --wait sequence testing:

Running guest:
# virt-viewer  --wait  cdrom-rhel6u7-x64 
# virt-viewer   cdrom-rhel6u7-x64  --wait

Result: Guest launched successfully.

Shutdown guest: virt-viewer window launched and showing "waiting for guest domain for start"

5. Negative testing
# virt-viewer  --wait=cdrom-rhel6u7-x64 

No DOMAIN-NAME|ID|UUID was specified for '--wait'

All above steps and results are as expected.