Bug 243863 - Bug in vfbif.py when using vncdisplay=
Summary: Bug in vfbif.py when using vncdisplay=
Status: CLOSED DUPLICATE of bug 211208
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
(Show other bugs)
Version: 5.0
Hardware: All Linux
low
medium
Target Milestone: ---
: ---
Assignee: Xen Maintainance List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-12 13:49 UTC by Felipe Alfaro Solana
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-12 14:27:05 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Felipe Alfaro Solana 2007-06-12 13:49:12 UTC
Description of problem:
------------------

There is a subtle bug in xen/xend/server/vfbif.py where the Python code tries
to sum up 5900 with the value of the "vncdisplay" configuration option, but the
value of "vncdisplay" is a string, and not an integer.

Here is the fix:

--- /usr/lib64/python2.4/site-packages/xen/xend/server/vfbif.py.OLD
2007-06-11 10:39:38.000000000 +0200
+++ /usr/lib64/python2.4/site-packages/xen/xend/server/vfbif.py 2007-06-11
10:39:19.000000000 +0200
@@ -96,7 +96,7 @@
            if sxp.child_value(config, "vncunused") is not None:
                args += ["--unused"]
            elif sxp.child_value(config, "vncdisplay") is not None:
-                args += ["--vncport", "%d" % (5900 + sxp.child_value(config, "vncdisplay"))]
+                args += ["--vncport", "%d" % (5900 + int(sxp.child_value(config, "vncdisplay")))]
            vnclisten = sxp.child_value(config, 'vnclisten',

xen.xend.XendRoot.instance().get_vnclisten_address())
            args += [ "--listen", vnclisten ]

You can reproduce by running xm create on the following Xen config file:

# Automatically generated xen config file
name = "centos_devel"
memory = "500"
disk = [ 'tap:aio:/vm/centos_devel,xvda,w', ]
vif = [ 'mac=00:16:3e:20:33:85, bridge=xenbr0', ]
vfb = ["type=vnc,vncdisplay=3,vncpasswd=foo"]
uuid = "36110fc7-e51a-2817-dd49-328af6489a2d"
bootloader="/usr/bin/pygrub"
vcpus = 1
vnc = 1
on_reboot = 'restart'
on_crash = 'restart'

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


How reproducible:
--------------

Always

Steps to Reproduce:
---------------
Try starting up a new virtual machine using the configuration file described above. The Python script 
will crash when trying to add up an integer (5900) with a string (the value of "vncdisplay" config option).
  
Actual results:
-----------

"xm create" crashes when trying to instantiate a virtual machine using "vncdisplay=" in the vfb section.

Expected results:
-------------

"xm create" should create a new virtual machine and attach a xen-xvnc process to the corresponding 
VNC display number.

Additional info:
------------

I've also attached a diff patch file with the fix.

Comment 1 Felipe Alfaro Solana 2007-06-12 13:50:22 UTC
I also filed a bug upstream against Xen at http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=996

Comment 2 Ralph Angenendt 2007-06-12 13:55:51 UTC
This has been found in CentOS. Bug report is at
http://bugs.centos.org/view.php?id=2134 in case something new comes up there.

Comment 3 Markus Armbruster 2007-06-12 14:27:05 UTC

*** This bug has been marked as a duplicate of 211208 ***


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