Bug 211208 - Python error when specifying vnc port
Python error when specifying vnc port
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Berrange
: OtherQA
: 217074 243863 (view as bug list)
Depends On: 211193
Blocks: 222399
  Show dependency treegraph
 
Reported: 2006-10-17 16:52 EDT by Daniel Berrange
Modified: 2010-10-22 02:33 EDT (History)
5 users (show)

See Also:
Fixed In Version: RHEA-2007-0635
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 12:07:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for the problem but with HVM (923 bytes, patch)
2007-07-09 10:22 EDT, Daniel Veillard
no flags Details | Diff

  None (edit)
Description Daniel Berrange 2006-10-17 16:52:36 EDT
+++ This bug was initially created as a clone of Bug #211193 +++

Description of problem:
When using virt-install and using a non-standard vnc port (2 == 5902 in my case)
the installation fails with an error in xend because of a type mismatch:

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
195, in creat
e
    vm.initDomain()
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
1355, in init
Domain
    self.createDevices()
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
1518, in crea
teDevices
    self.image.createDeviceModel()
  File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 249, in
createDeviceMo
del
    args += [ "--vncport", "%d" %(5900 + self.vncdisplay,) ]


self.vncdisply is a string.



Version-Release number of selected component (if applicable):
xen-3.0.2-44.x86_64

How reproducible:
always

Steps to Reproduce:
1.virt-install -d --p -n name -r 512 -f /dev/sda8 --vnc --vncport 5902 -l
nfs:host:/some/path
2.
3.
  
Actual results:

libvir: Xen Daemon error : POST operation failed: (xend.err "Error creating
domain: unsupported operand type(s) for +: 'int' and 'str'")

and the message above in /var/log/xend.log


Expected results:

no message

Additional info:

-- Additional comment from berrange@redhat.com on 2006-10-17 16:46 EST --
The string -> int conversion in image.py is only casting the default value to an
int, not a user supplied value.

-- Additional comment from berrange@redhat.com on 2006-10-17 16:47 EST --
Created an attachment (id=138725)
Fix the cast to int
Comment 1 RHEL Product and Program Management 2006-10-24 15:41:21 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 Chris Lalancette 2007-01-23 15:32:24 EST
Dan,
     I *believe* this is fixed by the following upstream changeset:

http://xenbits2.xensource.com/xen-unstable.hg?rev/60e50c65f862

But I could be mis-understanding the issue.  When you get a chance can you
verify if that changeset will indeed fix this?

Thanks,
Chris Lalancette
Comment 5 Daniel Berrange 2007-01-23 15:36:37 EST
Yes, that upstream fix is same as the attachment I made in bug #211193 
Comment 7 Markus Armbruster 2007-06-12 10:27:12 EDT
*** Bug 243863 has been marked as a duplicate of this bug. ***
Comment 8 Markus Armbruster 2007-06-12 10:56:06 EDT
*** Bug 217074 has been marked as a duplicate of this bug. ***
Comment 9 Daniel Berrange 2007-06-14 10:59:48 EDT
Built into dist-5E-qu-candidate as xen-3.0.3-27.el5

* Thu Jun 14 2007 Daniel P. Berrange <berrange@redhat.com> - 3.0.3-27.el5
- Fix allocation of fixed VNC ports (rhbz#211208)
Comment 11 Daniel Veillard 2007-07-09 10:21:20 EDT
I have seen the exact same thing on HVM with xen-3.0.3-29.el5, when rebooting
a Windows XP guest after installation. The xend.log exception was

  File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 369, in     
configVNC                                                                       
    ret += ['-vnc', '%d' % vncdisplay]

i.e. at a different place for HVM. Fix was as trivial as casting to int too there
I will enclose it,

Daniel
Comment 12 Daniel Veillard 2007-07-09 10:22:59 EDT
Created attachment 158774 [details]
patch for the problem but with HVM

Trivial fix
Comment 13 Daniel Berrange 2007-07-09 12:22:33 EDT
The additional required fix from comment #12 is in  xen-3.0.3-32.el5 built into
dist-5E-qu-candidate
Comment 14 Issue Tracker 2007-08-15 09:07:58 EDT
Fujitsu confirmed that this issue is fixed on 5.1 beta.

-----------
Hi Matsuya-san,

We test this problem with the RHEL5.1 beta and it is fine.

Thank you.                        Nishi


This event sent from IssueTracker by mmatsuya 
 issue 111778
Comment 16 errata-xmlrpc 2007-11-07 12:07:05 EST
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-0635.html

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