Bug 1211532 - [RFE] Auto-detect available appliance images and suggest them to be used
Summary: [RFE] Auto-detect available appliance images and suggest them to be used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Simone Tiraboschi
QA Contact: Artyom
URL:
Whiteboard:
: 1228147 (view as bug list)
Depends On: 1211933
Blocks: 1217106 1234915
TreeView+ depends on / blocked
 
Reported: 2015-04-14 09:10 UTC by Fabian Deutsch
Modified: 2016-03-09 19:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
With this release, hosted engine setup auto-detects available Appliance images and suggests them for use during installation.
Clone Of:
Environment:
Last Closed: 2016-03-09 19:11:45 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1211933 0 high CLOSED Add rpm wrapper for RHEV-M appliance 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2016:0375 0 normal SHIPPED_LIVE ovirt-hosted-engine-setup bug fix and enhancement update 2016-03-09 23:48:34 UTC
oVirt gerrit 40805 0 'None' 'MERGED' 'engine: Expose the image to he-setup' 2019-11-26 01:47:29 UTC
oVirt gerrit 41987 0 'None' 'MERGED' 'packaging: setup: auto-detect available appliance images and suggest them' 2019-11-26 01:47:29 UTC

Internal Links: 1211933

Description Fabian Deutsch 2015-04-14 09:10:54 UTC
Description of problem:
It would be nice (and is related to bug ) that he-setup will detect pre-installed appliance images (i.e. in some predefined path, or using some config file) and will suggest to use one of them during installation.

Comment 1 Fabian Deutsch 2015-04-14 09:11:33 UTC
This is basically an improvement for bug 1077850.

Comment 2 Fabian Deutsch 2015-04-14 09:13:28 UTC
The pre installed appliance image could be installed on the system using yum or some other delivery mechanism

Comment 4 Fabian Deutsch 2015-05-11 14:58:38 UTC
How should the detection work?

Currently the names of the u/s and d/s rpms are ovirt-engine-appliance and rhevm-appliance respectively.

The path in which the final ova will reside contains the name of the rpm:

/usr/share/%{name}/….ova

The question is: How does he-setup detect the available image(s)?

- Does he-setup look in both directories?
  - Is more than one image allowed per directory?

- Should both rpms should lay down the image in the same path (i.e. /usr/share/engine-appliance)
  Then only one path is used for d/s and u/s

- Should the rpms but a small snippet/file somewhere in /etc/ to register the installed images with he-setup

?

Comment 5 Simone Tiraboschi 2015-05-11 15:13:13 UTC
It's not an issue to use different directory name from upstream to downstream.
On my opinion /usr/share/%{name}/ looks good.

If we are going to provide the OVA images via rpm, when you upgrade the rpm you should upgrade the correspondent ova removing the previous one. On my opinion no need to keep the old OVA in place since you can simply downgrade the rpm to choose it.

A file entry in /etc/ with the filename and an sha1 sum could be a good idea for validating it.

Comment 6 Fabian Deutsch 2015-05-12 07:33:15 UTC
(In reply to Simone Tiraboschi from comment #5)
> It's not an issue to use different directory name from upstream to
> downstream.
> On my opinion /usr/share/%{name}/ looks good.

Mh. I'm not convinced yet :)
I see that it is initially easier to have separate dirs for the different images, because they align with the naming of the rpm that provides them.

My main concern really is about he-setup to need to know more than one directory.

> If we are going to provide the OVA images via rpm, when you upgrade the rpm
> you should upgrade the correspondent ova removing the previous one. On my
> opinion no need to keep the old OVA in place since you can simply downgrade
> the rpm to choose it.

Yes, we'll hadnle it like normal rpms. So only the last is kept.

> A file entry in /etc/ with the filename and an sha1 sum could be a good idea
> for validating it.

If we have this file, then we could include the absolute path to the image in that checksum file.

I.e.:
Path for checksum files:
/etc/hosted-engine-setup/engine-appliances.d/

Contents of a checksum file:
$ cat ovirt-engine-appliances
1b856d2a14b3bf366e970170574e2960 /usr/share/ovirt-engine-appliance/….ova

$ cat rhevm-appliances
289332a14bae3bf566e97670592e2957 /usr/share/rhevm-appliance/….ova

Comment 7 Fabian Deutsch 2015-05-12 10:36:43 UTC
After the discussion on irc we agreed on the following:

Both appliances (u/s and d/s) are expected to not be installed at the same time.

Both appliances own the file /etc/ovirt-hosted-engine/10-appliance.conf

This file has the following (example) contents:
$ cat /etc/ovirt-hosted-engine/10-appliance.conf
description=The oVirt Engine Appliance image (OVA)
version=20150512.0-1
path=/usr/share/ovirt-engine-appliance/ovirt-engine-appliance-20150512.0-1.ova
sha1sum=da39a3ee5e6b4b0d3255bfef95601890afd80709

The description is used during the he-setup, to let the user know what appliance is used. the path is pointing to the actual OVA.

Both appliance OVAs will reside in /usr/share/ovirt-engine-appliance/ but have different names (derived from the package name [ovirt-engine-appliance vs rhevm-appliance]).
The sha1sum can be used to verify the integrity of the image.
The version can be used for informative purposes.

Comment 8 Fabian Deutsch 2015-05-12 18:24:49 UTC
The first wrapper builds following the scheme in comment 7 are available now, please see the details in bug 1211933 comment 4.

Comment 9 Sandro Bonazzola 2015-06-04 10:09:57 UTC
*** Bug 1228147 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2016-03-09 19:11: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/RHEA-2016-0375.html


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