Bug 1234382 - rhevm-shell opening spice-console does not work
Summary: rhevm-shell opening spice-console does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.5.1
Hardware: All
OS: Linux
high
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Juan Hernández
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks: 1236361
TreeView+ depends on / blocked
 
Reported: 2015-06-22 12:55 UTC by Martin Tessun
Modified: 2019-08-15 04:48 UTC (History)
10 users (show)

Fixed In Version: ovirt-engine-cli-3.6.0.0-0.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1236361 (view as bug list)
Environment:
Last Closed: 2016-03-09 19:55:12 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch to fix the bug (2.05 KB, patch)
2015-06-23 10:43 UTC, Juan Hernández
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0406 0 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2016-03-10 00:04:32 UTC
oVirt gerrit 42678 0 master MERGED cli: Check if Spice port is available Never
oVirt gerrit 42680 0 cli_3.5 MERGED cli: Check if Spice port is available Never

Description Martin Tessun 2015-06-22 12:55:57 UTC
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] #

Comment 2 Juan Hernández 2015-06-22 14:39:43 UTC
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.

Comment 3 Juan Hernández 2015-06-23 10:43:11 UTC
Created attachment 1042232 [details]
Proposed patch to fix the bug

Comment 5 Lukas Svaty 2015-07-02 12:06:34 UTC
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?

Comment 6 Juan Hernández 2015-07-02 12:38:32 UTC
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

Comment 7 Lukas Svaty 2015-07-02 13:30:07 UTC
thank you,

verified in ovirt-engine-cli-3.6.0.0-0.3

Comment 9 errata-xmlrpc 2016-03-09 19:55:12 UTC
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


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