Bug 807696 - [RFE] OVIRT-CLI: use remote-viewer instead of spicec for spice based console
Summary: [RFE] OVIRT-CLI: use remote-viewer instead of spicec for spice based console
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-cli
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-3.6.3
: 3.6.2.0
Assignee: Juan Hernández
QA Contact: Jiri Belka
URL:
Whiteboard:
: 1303675 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-28 14:19 UTC by Michael Pasternak
Modified: 2016-02-18 11:08 UTC (History)
9 users (show)

Fixed In Version: ovirt-engine-cli-3.6.2.0
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:08:35 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: exception+
ylavi: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 29964 0 master MERGED cli: Add support for virt-viewer Never
oVirt gerrit 51404 0 master MERGED cli: Generate remote viewer config using UTF-8 2016-01-07 10:53:32 UTC
oVirt gerrit 51405 0 None None None 2016-01-05 21:35:25 UTC
oVirt gerrit 51642 0 cli_3.6 MERGED cli: Generate remote viewer config using UTF-8 2016-01-11 14:42:14 UTC

Description Michael Pasternak 2012-03-28 14:19:12 UTC
Description of problem:

use spice-gtk instead of spicec for spice based console

Comment 1 Itamar Heim 2013-05-19 13:45:57 UTC
still relevant?

Comment 2 Michael Pasternak 2013-05-19 13:58:43 UTC
(In reply to comment #1)
> still relevant?

iiuc spicec is deprecated.

Comment 3 Itamar Heim 2013-05-21 19:59:58 UTC
yes, hence the request to change to use spice-gtk instead (although shouldn't this be virt-viewer?)

Comment 4 Michael Pasternak 2013-05-22 07:48:33 UTC
(In reply to Itamar Heim from comment #3)
> yes, hence the request to change to use spice-gtk instead (although
> shouldn't this be virt-viewer?)

good question, i'm all for using latest client.

Comment 5 Itamar Heim 2013-12-01 09:09:32 UTC
michael - not fixed yet?

Comment 8 Juan Hernández 2014-02-27 14:20:37 UTC
The solution to this bug should be similar to the example described in the following thread in the users list:

http://lists.ovirt.org/pipermail/users/2014-February/021638.html

Comment 9 Red Hat Bugzilla Rules Engine 2015-10-18 08:34:28 UTC
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.

Comment 10 Jiri Belka 2016-01-05 11:03:14 UTC
code issue.

[root@jb-rhevm36 ~]# rpm -qa python rhevm-cli virt-viewer
virt-viewer-2.0-7.el6.x86_64
rhevm-cli-3.6.0.0-1.el6ev.noarch
python-2.6.6-64.el6.x86_64

~~~
[RHEVM shell (connected)]# console jb-test
  ================================================================================ UNKNOWN ERROR =============================================================================
                                                             spice viewer was not found, please install spice first.
  ============================================================================================================================================================================

[RHEVM shell (connected)]# console jb-test
  ================================================================================ UNKNOWN ERROR =============================================================================
                                             'ascii' codec can't encode character u'\xed' in position 10: ordinal not in range(128)
  ============================================================================================================================================================================
~~~

traceback when rhevm-shell run in debug:

~~~
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cli/context.py", line 204, in execute_string
    self._execute_command(command)
  File "/usr/lib/python2.6/site-packages/cli/context.py", line 424, in _execute_command
    command.run(self)
  File "/usr/lib/python2.6/site-packages/cli/command/command.py", line 101, in run
    self.execute()
  File "/usr/lib/python2.6/site-packages/ovirtcli/command/console.py", line 99, in execute
    debug
  File "/usr/lib/python2.6/site-packages/ovirtcli/platform/posix/spice.py", line 80, in launch_spice_client
    title, ca_file, debug)
  File "/usr/lib/python2.6/site-packages/ovirtcli/platform/posix/spice.py", line 145, in launch_remote_viewer
    ca_text=ca_text.replace("\n", "\\n"),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 10: ordinal not in range(128)
~~~

Comment 11 Red Hat Bugzilla Rules Engine 2016-01-05 11:03:15 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 13 Jiri Belka 2016-01-05 11:14:26 UTC
please consider also improvement of:

    # No luck, no known command is available:
    raise Error, Messages.Error.NO_CONSOLE_FOUND % ('spice', 'spice')

we have two spice console viewers and the number could vary in the future. there's nothing like 'install spice'. imo it could be:

_a_ spice viewer was not found, please install _a_ spice _console viewer (eg. remote-viewer)_ first.

Comment 14 Jiri Belka 2016-01-05 11:17:48 UTC
(would be doable to open console also in browser via spice-html? would be nice to have. eg. via `xdg-open default-web-browser $url'... you get the idea.)

Comment 15 Juan Hernández 2016-01-05 14:40:05 UTC
The problem is probably the non ASCII characters in the subject of the certificate, as previously suggested. I wonder how that installation could be completed, as when I tried to reproduce it the setup application failed because of the same reason:

# engine-setup
...
[ ERROR ] Failed to execute stage 'Misc configuration': 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128)

Comment 16 Juan Hernández 2016-01-05 21:40:53 UTC
The main issue is caused by the non ASCII characters in the subject of the certificate of the host, and is addressed by the following patch:

  https://gerrit.ovirt.org/51404
  cli: Generate remote viewer config using UTF-8

The suggestion about the error messages is addressed by this other patch:

  cli: Improve the "no console found" messages
  https://gerrit.ovirt.org/51405

Opening using a browser is doable, but I guess it won't be easy. At the moment we are trying to avoid adding new functionality to the CLI. If you think it is important please open a separate RFE.

Comment 17 Jiri Belka 2016-02-01 17:53:05 UTC
*** Bug 1303675 has been marked as a duplicate of this bug. ***

Comment 18 Jiri Belka 2016-02-11 15:28:23 UTC
ok

works ok, if remote-viewer is not available, following msg informs the user.

[oVirt shell (connected)]# console jb-w7-x86
  ================================================================================ UNKNOWN ERROR =============================================================================
                                             a SPICE viewer was not found, please install a SPICE viewer (e.g. remote-viewer) first.
  ============================================================================================================================================================================


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