RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1223469 - Add minimum version check to rhev spice-client
Summary: Add minimum version check to rhev spice-client
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.2
Assignee: Virt Viewer Maint
QA Contact: Virtualization Bugs
URL:
Whiteboard: spice
Depends On: 1200103
Blocks: 950248 1228275 1264767 1295944
TreeView+ depends on / blocked
 
Reported: 2015-05-20 15:08 UTC by Christophe Fergeau
Modified: 2016-01-05 20:50 UTC (History)
17 users (show)

Fixed In Version: virt-viewer-2.0-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1200103
: 1295944 (view as bug list)
Environment:
Last Closed: 2015-11-19 07:36:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2211 0 normal SHIPPED_LIVE virt-viewer, spice-gtk, and libgovirt bug fix and enhancement update 2015-11-19 08:27:40 UTC

Description Christophe Fergeau 2015-05-20 15:08:14 UTC
+++ This bug was initially created as a clone of Bug #1200103 +++

We need a way for RHEV to let users connecting to it through a client that they need to upgrade it.
Currently, a 'version' field can be passed through the .vv file, and if the version of the client is lower than the version from that field, then the connection will fail and remote-viewer will exit.
In addition to that, RHEV wants to be able to add an URL to display in a dialog when this situation occurs, this would go in an additional field in the .vv file.

RHEV people want to be able to pass a list of versions as the Windows/Linux/... clients don't necessarily use the same versioning. Not sure this is going to be practical to do that on the client-side, need some thoughts.

At the moment, remote-viewer exits if its version is too low, hopefully this will be ok for everyone, and we won't need a 'soft' version of it where the version check is only informative.

--- Additional comment from Marc-Andre Lureau on 2015-03-09 13:38:50 EDT ---

(In reply to Christophe Fergeau from comment #0)
> RHEV people want to be able to pass a list of versions as the
> Windows/Linux/... clients don't necessarily use the same versioning. Not
> sure this is going to be practical to do that on the client-side, need some
> thoughts.

There are different distributions channels, it's hard to generalize with a link to an installer.

Couldn't this link be a page with the list of installers or instructions for each OS? I think this gives the most flexibility, even that page could guess the client OS  if really necessary.

--- Additional comment from Bill Sanford on 2015-03-09 15:09:44 EDT ---

Couldn't there be something in the virt-viewer menu to "Check for upgrade" and upgrade if needed?

--- Additional comment from David Blechter on 2015-03-09 16:06:10 EDT ---

(In reply to Marc-Andre Lureau from comment #1)
> (In reply to Christophe Fergeau from comment #0)
> > RHEV people want to be able to pass a list of versions as the
> > Windows/Linux/... clients don't necessarily use the same versioning. Not
> > sure this is going to be practical to do that on the client-side, need some
> > thoughts.
> 
> There are different distributions channels, it's hard to generalize with a
> link to an installer.
> 
> Couldn't this link be a page with the list of installers or instructions for
> each OS? I think this gives the most flexibility, even that page could guess
> the client OS  if really necessary.

Interesting idea! we should share with rhevm team, as they need to decide on the content the link points to

--- Additional comment from Christophe Fergeau on 2015-05-20 11:04:34 EDT ---

I've got some work in progress towards that in http://cgit.freedesktop.org/~teuf/virt-viewer/log/?h=version
This code introduces 2 new entries to .vv files, 'versions' and 'newer-version-url', as well as a --with-osid build parameter to virt-viewer.

--with-osid is used to specify an arbitrary string identifying the os the virt-viewer build is meant for (fedora22, win32, debian-sarge, ...)

The 'newer-version-url' vv file entry will be shown to the user when the client fails to start because a version check failed (the .vv file is asking for a version which is newer than the current binary).

The 'versions' vv file entry expands on the existing 'version' entry. 'versions' contains a list of osid:version couples, specifying that a remote-viewer build build with --with-osid=$osid will require $version as a minimum. This allows to specify things like:

versions=fedora20:2.0-14;fedora22:3.0-1;win32:2.0-1234

Comments welcome :)

Comment 2 Jonathon Jongsma 2015-06-09 19:15:54 UTC
Also moving this one to POST since patches have been pushed upstream.

Comment 3 Jonathon Jongsma 2015-06-17 14:14:54 UTC
For reference these patches are needed:

0401199b^..88846081

Comment 5 zhoujunqin 2015-06-24 10:29:28 UTC
Try to verify this issue with new build:
virt-viewer-2.0-3.el7.x86_64
spice-gtk3-0.26-3.el7.x86_64
libvirt-1.2.16-1.el7.x86_64

Steps:
1. Check remote-viewer manual page:
# man remote-viewer
...
CONNECTION FILE
...
       "versions" (osid:version list)
           This is a list of osid:version couples separated by ';'. osid is an arbitrary string, version is a version number in the same
           format as in the 'version' field. A given couple indicates that remote-viewer builds matching the given 'osid' (fedora22,
           debian7, ...) must be at least version 'version'. For consistency, it's recommended to use libosinfo OS shortids as the osid.

       "newer-version-url" (string)
           If specified, this field is an URL which will be displayed to the user when a version check fails.
...

Result: 
'versions' and 'newer-version-url' 2 options already added.

2. Check "--with-osid" outputs:
# remote-viewer -V
remote-viewer version 2.0-3.el7 (OS ID: rhel7)

3. Check function for option 'versions' and 'newer-version-url'.

Scenario 1: $versions is equals to virt-viewer version
1.1 Prepare a running guest and configure console.vv file.

# cat console.vv
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
fullscreen=0
versions=rhel7:2.0-3

1.2 Use remote-viewer to connect vm.
# remote-viewer console.vv

Result: Can connect to guest successfully.

Scenario 2: $versions is less than virt-viewer version

2.1 Prepare a running guest and configure console.vv file.

# cat console.vv
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
fullscreen=0
versions=rhel7:1.0-3

2.2 Use remote-viewer to connect vm.
# remote-viewer console.vv

Result: Can connect to guest successfully.

Scenario 3: $versions is larger than virt-viewer version

3.1 Prepare a running guest and configure console.vv file.

# cat console.vv
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
fullscreen=0
versions=rhel7:3.0-3

3.2 Use remote-viewer to connect vm.
# remote-viewer console.vv

Result: Failed to connect to guest, a error window pop up with 
"At least Remote Viewer version 3.0-3 is required to setup this connection"
After click "OK" button, window closed with no error.

3.3 Add 'newer-version-url' option to connection file:

# cat console.vv
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
fullscreen=0
versions=rhel7:3.0-3
newer-version-url=http://download.devel.redhat.com/brewroot/packages/virt-manager/1.1.0/10.el7/noarch/virt-install-1.1.0-10.el7.noarch.rpm

3.4 Rerun Step3.2 again.
# remote-viewer console.vv

Result: Failed to connect to guest, a error window pop up with
"At least Remote Viewer version 3.0-3 is required to setup this connection, see http://download.devel.redhat.com/brewroot/packages/virt-manager/1.1.0/10.el7/noarch/virt-install-1.1.0-10.el7.noarch.rpm for details", after click "OK" button, window closed with no error.

Summary:
Hi teuf, can you help me check whether above steps is enough to verify this bug, thanks.

And i have another 2 question:
Q1: whether it check $osid is existing or not? 
for example: 
# cat console.vv
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
fullscreen=0
versions=rhel7777:2.0-3---->use rhel7777

# remote-viewer console.vv

Result: Can connect to guest successfully.

Q2: Shall we add a period '.' after error "for details" in Step3.4.

Q3: In fact, we just have virt-viewer pkg, so in "At least Remote Viewer version 3.0-3", please take into consider, use "Virt Viewer" instead of "Remote Viewer", i'm not sure about this one.

waiting for your reply, thanks.

Comment 6 Christophe Fergeau 2015-06-24 10:44:47 UTC
(In reply to zhoujunqin from comment #5)
> Try to verify this issue with new build:
> virt-viewer-2.0-3.el7.x86_64
> spice-gtk3-0.26-3.el7.x86_64
> libvirt-1.2.16-1.el7.x86_64
> 
> Steps:
> 1. Check remote-viewer manual page:
> # man remote-viewer
> ...
> CONNECTION FILE
> ...
>        "versions" (osid:version list)
>            This is a list of osid:version couples separated by ';'. osid is
> an arbitrary string, version is a version number in the same
>            format as in the 'version' field. A given couple indicates that
> remote-viewer builds matching the given 'osid' (fedora22,
>            debian7, ...) must be at least version 'version'. For
> consistency, it's recommended to use libosinfo OS shortids as the osid.
> 
>        "newer-version-url" (string)
>            If specified, this field is an URL which will be displayed to the
> user when a version check fails.
> ...
> 
> Result: 
> 'versions' and 'newer-version-url' 2 options already added.
> 
> 2. Check "--with-osid" outputs:
> # remote-viewer -V
> remote-viewer version 2.0-3.el7 (OS ID: rhel7)
> 
> 3. Check function for option 'versions' and 'newer-version-url'.
> 
> Scenario 1: $versions is equals to virt-viewer version
> 1.1 Prepare a running guest and configure console.vv file.
> 
> # cat console.vv
> [virt-viewer]
> type=spice
> host=127.0.0.1
> port=5900
> fullscreen=0
> versions=rhel7:2.0-3
> 
> 1.2 Use remote-viewer to connect vm.
> # remote-viewer console.vv
> 
> Result: Can connect to guest successfully.
> 
> Scenario 2: $versions is less than virt-viewer version
> 
> 2.1 Prepare a running guest and configure console.vv file.
> 
> # cat console.vv
> [virt-viewer]
> type=spice
> host=127.0.0.1
> port=5900
> fullscreen=0
> versions=rhel7:1.0-3
> 
> 2.2 Use remote-viewer to connect vm.
> # remote-viewer console.vv
> 
> Result: Can connect to guest successfully.
> 
> Scenario 3: $versions is larger than virt-viewer version
> 
> 3.1 Prepare a running guest and configure console.vv file.
> 
> # cat console.vv
> [virt-viewer]
> type=spice
> host=127.0.0.1
> port=5900
> fullscreen=0
> versions=rhel7:3.0-3
> 
> 3.2 Use remote-viewer to connect vm.
> # remote-viewer console.vv
> 
> Result: Failed to connect to guest, a error window pop up with 
> "At least Remote Viewer version 3.0-3 is required to setup this connection"
> After click "OK" button, window closed with no error.
> 
> 3.3 Add 'newer-version-url' option to connection file:
> 
> # cat console.vv
> [virt-viewer]
> type=spice
> host=127.0.0.1
> port=5900
> fullscreen=0
> versions=rhel7:3.0-3
> newer-version-url=http://download.devel.redhat.com/brewroot/packages/virt-
> manager/1.1.0/10.el7/noarch/virt-install-1.1.0-10.el7.noarch.rpm
> 
> 3.4 Rerun Step3.2 again.
> # remote-viewer console.vv
> 
> Result: Failed to connect to guest, a error window pop up with
> "At least Remote Viewer version 3.0-3 is required to setup this connection,
> see
> http://download.devel.redhat.com/brewroot/packages/virt-manager/1.1.0/10.el7/
> noarch/virt-install-1.1.0-10.el7.noarch.rpm for details", after click "OK"
> button, window closed with no error.
> 
> Summary:
> Hi teuf, can you help me check whether above steps is enough to verify this
> bug, thanks.
> 
> And i have another 2 question:
> Q1: whether it check $osid is existing or not? 
> for example: 
> # cat console.vv
> [virt-viewer]
> type=spice
> host=127.0.0.1
> port=5900
> fullscreen=0
> versions=rhel7777:2.0-3---->use rhel7777
> 
> # remote-viewer console.vv
> 
> Result: Can connect to guest successfully.

This is expected behaviour, if the osid of the binary (rhel7) is not found in the .vv file, and if there is no 'version' field, then the version checking is disabled, which is what is happening here.


> 
> Q2: Shall we add a period '.' after error "for details" in Step3.4.

I'm not sure other error messages have a '.' after the error, so we can probably keep this one this way too ?

> 
> Q3: In fact, we just have virt-viewer pkg, so in "At least Remote Viewer
> version 3.0-3", please take into consider, use "Virt Viewer" instead of
> "Remote Viewer", i'm not sure about this one.

Since the remote-viewer binary was started, and I think it's better to keep 'remote-viewer' here.

Comment 7 zhoujunqin 2015-06-26 02:43:54 UTC
Hi teuf,
Thanks for your kind reply.
And for Q2, i think we can keep in this way since i always checked other error message.

So according to above comments, move this bug from ON_QA to VERIFIED.

Comment 9 errata-xmlrpc 2015-11-19 07:36:45 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/RHBA-2015-2211.html


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