Bug 2024157 - engine-setup should prevent upgrade to an engine that does not match its own version
Summary: engine-setup should prevent upgrade to an engine that does not match its own ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Yedidyah Bar David
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-17 12:50 UTC by Yedidyah Bar David
Modified: 2022-04-28 09:26 UTC (History)
1 user (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: Enhancement
Doc Text:
engine-setup now requires the version of the setup package to be the same as the version of the engine package.
Clone Of:
Environment:
Last Closed: 2022-04-28 09:26:34 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.5?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-44044 0 None None None 2021-11-17 12:51:42 UTC
oVirt gerrit 118228 0 master MERGED packaging: setup: Require engine and setup to match 2022-01-12 09:39:30 UTC

Description Yedidyah Bar David 2021-11-17 12:50:55 UTC
Description of problem:

This is essentially a duplicate of bug 1057138.

A more up-to-date, currently theoretical, flow:

Suppose that 4.5.0 is released, and is available through separate repos from 4.4.

- Setup 4.4.8 engine

- Add 4.5 repos

- Update setup packages

- Remove 4.5 repos

- engine-setup

engine-setup (version 4.5.0) will then try to update a 4.4.8 engine to 4.4.9 (currently, as that's the latest 4.4 engine right now). This should be prevented.

The "fix" for original bug 1057138 was to add a plugin to rhvm-setup-plugins (RHV-only) that requires the setup package to be available in configured repos. This was not a very good solution, and now hit us (see bug 2024142), and I am going to remove it.

We should come up with something better, at least before 4.5 is released. One idea I considered is the current $subject: engine-setup knows its version, and when it's doing an upgrade, it already knows the version of the engine we are going to upgrade to. I think it should require these versions to be the same. In above example, its own version is 4.5.0, the engine we upgrade to is 4.4.9, they are different, so it should abort, telling to use 4.4.9 setup for upgrading to 4.4.9 engine.

Comment 1 Yedidyah Bar David 2022-01-12 08:56:39 UTC
QE:

With all pending patches, engine-setup requires the version of the setup package to be the same as the version of the engine package. If the engine package is going to be updated, it checks the updated version.

Comment 0 is the most relevant flow. Another one, relevant if/when we'll have more than one version (internal or released) of the engine that includes these changes:

1. Install and set up an engine with this bug fixed (e.g. 4.5.0, when it's available)

2. Add a repo with a later version (e.g. 4.5.1, when it's available)

3. Update setup packages

4. Remove the repo you added in (2.)

5. engine-setup

Another one (which is slightly different) is the same, but with '--offline' in step 5.

Another flow, identical to above until step 3:

4. Add yet another repo with another later version (say, 4.5.2, when it's available), but filter out from it (with excludepkgs) the ovirt-engine-setup package(s) (you might need/want to add nobest). If you do not filter out, engine-setup will also fail, but earlier, in a code location unrelated to current bug.

5. engine-setup

In all of these, engine-setup should fail, with something like:

          Setup version: 4.5.0-0.2.master.20220110125022.git53f58a659a.el8
          Engine version: 4.5.0-0.2.master.20211220192954.git3326bfea06.el8
[ ERROR ] Failed to execute stage 'Setup validation': Setup and (updated) Engine versions must match

Comment 3 Sandro Bonazzola 2022-04-28 09:26:34 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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