Bug 254188

Summary: virt-install writes vncdisplay=<vncport> in domain config
Product: Red Hat Enterprise Linux 5 Reporter: Flavio Leitner <fleitner>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 5.1CC: crobinso, xen-maint
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2007-0643 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 17:27:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix vncdisplay in domain config none

Description Flavio Leitner 2007-08-24 17:09:44 UTC
Description of problem:

virt-install writes vncdisplay=<vncport> in domain config when it should be
<vncport - 5900>.

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

libvirt 0.2.3-8.el5
xen-3.0.3-36.el5
xen-libs-3.0.3-36.el5
python-virtinst-0.103.0-3.el5

How reproducible:
Always

Steps to Reproduce:

Run
# virt-install --vnc --vncport=5920 --name=it128941 --vcpus=2 --ram=512
--file=/home/guests/it128941 --paravirt --location=http://172.32.0.1/rhel5/disc1

and check domain config:
vfb = [ "type=vnc,vncdisplay=5920" ]
  
Actual results:
vfb = [ "type=vnc,vncdisplay=5920" ]


Expected results:
vfb = [ "type=vnc,vncdisplay=20" ]


Code does:
src/xm_internal.c:1975
...
     } else {
           strcat(val, ",vncdisplay=");
           strcat(val, (const char*)vncport);
...

it should do vncport - 5900.
Patch attached.

Comment 1 Flavio Leitner 2007-08-24 17:09:47 UTC
Created attachment 172440 [details]
Patch to fix vncdisplay in domain config

Comment 2 Daniel Veillard 2007-08-24 20:19:08 UTC
Okay, assuming the problem is confirmed (I didn't checked yet) why is
this of priority 'high' and 'urgent' ? Xen in 5.1 usually keep the
definitions of domains in a separate database, and that's what is used
when actually starting the domain or working with it.
Please explain the kind of problem it raised in practice, 

Daniel

Comment 3 Flavio Leitner 2007-08-24 20:32:32 UTC
According with customer it works on RHEL5.0GA and fails on RHEL5.1 and they need
this fixed otherwise it's impossible to keep track of vncports/vncdisplay.


Comment 7 Issue Tracker 2007-08-27 16:38:38 UTC
Here is the reason why I escalated this issue as regression from EL5.0.
-----------------------------------------
> If this doesn't occur on EL5.0GA, I can push this issue for 5.1 as the
regression.

This issue does not occur on RHEL5.0GA because the configuration file is
made by the virt-install command.
At RH5.1, that is made by libvirt.

So could you push this issue ?

Internal Status set to 'Waiting on Customer'
Status set to: Waiting on Client

This event sent from IssueTracker by mmatsuya 
 issue 128941

Comment 9 Daniel Veillard 2007-08-28 13:33:58 UTC
Problem reproduced, path fixes it:

[root@paphio ~]# virsh dumpxml test254188 | grep vnc
    <graphics type='vnc' port='5920'/>
[root@paphio ~]# grep vnc /etc/xen/test254188 
vfb = [ "type=vnc,vncdisplay=20" ]
[root@paphio ~]# rpm -q libvirt python-virtinst xen
libvirt-0.2.3-9
python-virtinst-0.103.0-3.el5
xen-3.0.3-36.el5
[root@paphio ~]# 

Daniel

Comment 12 Daniel Veillard 2007-08-29 14:15:54 UTC
built libvirt-0.2.3-9.el5 in dist-5E-qu-candidate with the fix,

Daniel

Comment 17 errata-xmlrpc 2007-11-07 17:27:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2007-0643.html