Description of problem: Opening a Spice console in rhevm-shell might fail due to wrong display.port parsing Version-Release number of selected component (if applicable): 3.5 How reproducible: always Steps to Reproduce: 1. Start rhevm-shell and connect to rhevm with "-d" switch 2. run "console <VM>" command on a VM with Spice Console Actual results: The console does not open. Debug output shows: "spicec: invalid port value None" Without the "-d" switch simply nothing is displayed. Expected results: The spicec should start and display the console Additional info: A typical display portion of spice-display looks as follows: <display> <type>spice</type> <address>10.32.96.26</address> <secure_port>5950</secure_port> <monitors>1</monitors> <single_qxl_pci>true</single_qxl_pci> <allow_override>true</allow_override> <smartcard_enabled>false</smartcard_enabled> <file_transfer_enabled>true</file_transfer_enabled> <copy_paste_enabled>true</copy_paste_enabled> </display> As there is no port given, the port is then saved as "None" in the vm.display.port field. As an easy workaround the console.py can be changed as follows: [root@rhevm] # diff -u /usr/lib/python2.6/site-packages/ovirtcli/command/console.py.orig /usr/lib/python2.6/site-packages/ovirtcli/command/console.py --- /usr/lib/python2.6/site-packages/ovirtcli/command/console.py.orig 2015-06-22 14:14:06.004046337 +0200 +++ /usr/lib/python2.6/site-packages/ovirtcli/command/console.py 2015-06-22 14:12:22.517038505 +0200 @@ -91,6 +91,8 @@ self.warning( Messages.Warning.HOST_IDENTITY_WILL_NOT_BE_VALIDATED ) + if str(port) == 'None': + port = 0 spice.launch_spice_client( host_addr, host_subject, [root@rhevm] #
The fix for this bug is now merged to the master and 3.5 branches of the upstream ovirt-engine-cli project. To complete the fix the downstream rhevm-cli project needs to be rebased.
Created attachment 1042232 [details] Proposed patch to fix the bug
Can you provide verification steps on this please? ATM the moment message "spice viewer was not found, please install spice first" appears after $ console VM_NAME This is an old issue because of moving from spicec to virt-viewer support. Is there any workaround for this or would be verification through python-sdk sufficient?
To verify this you need a platform where the "spicec" command is still available. That means RHEL 6. Then you need to make sure that you have the "spice-client" package installed: # yum install spice-client
thank you, verified in ovirt-engine-cli-3.6.0.0-0.3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-0406.html