oVirt Node Next update delivery

Standing on th eshoulders of giants, I believe is sentence is so true in the world of open source.

However, for Node Next we looked for a simple update distribution mechanism. RPM seemed to be a suitable once again (we are already using it for the ovirt-appliance). We already used rpm to distribute oVirt Node (vintage) using rpms. But in that case the rpm was installed on the Engine side. The issue is that Engine needs to be aware of this old flow:

Repository -> (yum update) -> Engine -> (host update) -> Node

compared to the usual flow for othe rhosts:

Repository -> (yum update) -> Host

The problem is that Engine had a dedicated flow for Node. If you maintain a lot of code, exceptions like the become somewhat annoying to maintain, thus we started to look for a distribution mechanism similar to the one for hosts.

The idea was quickly to directly ship the rpm with the update image to the host when yum update is called.

The question was now how this can be achieved.

The problem might be not directly obvious, but imagine the following: What is reqiured for yum update to correctly work? An rpm must be installed and there must be an update for this rpm. And there is the issue - Inside the image we don’t have the image-rpm installed. The image-rpm is only available in the repository.

We needed to find a way to get the update delivered even if the image-rpm was not installed inside the image.

For now we settled with an approach based on a placeholder and nifty use of requirements.

The raw idea is:

in-image:
PACKAGE ovirt-release
subpackage ovirt-release-host-node N
subpackage ovirt-node-ng-image-placeholder N

wrapper:
PACKAGE ovirt-node-ng-image N
Obsoletes: ovirt-node-ng-image-placeholder < N


-----------------


Build process:
N = 3.6.0-20160101.0
build ovirt-release N
build image N
build wrapper N


M = 3.6.1-0
build ovirt-release M
build image M
build wrapper M


-----------------


Findings:
N < M
wrapper N will NOT obsolete ovirt-node-ng-image-placeholder N
wrapper M will NOT obsolete ovirt-node-ng-image-placeholder M
wrapper N will NOT obsolete ovirt-node-ng-image-placeholder M

wrapper M will obsolete ovirt-node-ng-image-placeholder N


-----------------


Brain check:

    In the image N

    Setup repo with wrapper M

    Run yum update

    Yum will see that wrapper M obsoletes image-placeholder N, because N < M

::: {#footer} [ January 13th, 2016 1:06pm ]{#timestamp} [ovirt]{.tag} [node]{.tag} [next]{.tag} [update]{.tag} [rpm]{.tag} :::