Bug 989848 - qemu should give friendly prompt when specify invalid vnc port value
qemu should give friendly prompt when specify invalid vnc port value
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-30 00:24 EDT by Sibiao Luo
Modified: 2013-08-01 19:36 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 19:36:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-07-30 00:24:30 EDT
Description of problem:
If specify invalid vnc port value in qemu-kvm command line, the qemu should quit with friendly prompt. Also tried the spice that has no such issue.

Version-Release number of selected component (if applicable):
host info:
2.6.32-402.el6.x86_64
qemu-kvm-0.12.1.2-2.381.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
...-vnc host:display
If you do not specify host, connections will be accepted from any host, The TCP port on which the VNC session is then running is normally a 5900 + display number.  

1.# /usr/libexec/qemu-kvm -vnc :aaaa -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:5900
        auth: none
Client: none
(qemu) q

2.# /usr/libexec/qemu-kvm -vnc :99999999999 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:65291
        auth: none
Client: none
(qemu) q

3.# /usr/libexec/qemu-kvm -vnc :-10 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:5890
        auth: none
Client: none
(qemu) q

4.# /usr/libexec/qemu-kvm -vnc :-999 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:4901
        auth: none
Client: none
(qemu) 
5.# /usr/libexec/qemu-kvm -vnc :-9999 -monitor stdio
Failed to start VNC server on `:-9999': address resolution failed for :-4099: Servname not supported for ai_socktype

Actual results:


Expected results:
Qemu should quit with a friendly prompt, like:
for step 1, qemu quit with prompt: Parameter 'port' expects a number
for step 2, qemu quit with prompt: -vnc port value is out of range
...

Additional info:
Also tried the spice, testing as following.
# /usr/libexec/qemu-kvm -spice port=999999999,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=aaaa,disable-ticketing -monitor stdio
qemu-kvm: -spice port=aaaa,disable-ticketing: Parameter 'port' expects a number
parse error: port=aaaa,disable-ticketing
 
# /usr/libexec/qemu-kvm -spice port=-9999,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=-1,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=0,disable-ticketing -monitor stdio
neither port nor tls-port specified for spice.

# /usr/libexec/qemu-kvm -spice port=1,disable-ticketing -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info spice
Server:
     migrated: false
     address: 0.0.0.0:1
        auth: none
Channels: none
(qemu) q
Comment 2 Ademar Reis 2013-08-01 19:36:29 EDT
corner case, not a customer issue, so WONTFIX for RHEL6 (there's already a bug for RHEL7: bug 733600).

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