#1521 [RFE] Set module_hotfixes=1 in brew repo definitions
Closed: Fixed 4 years ago by mikem. Opened 4 years ago by dgregor.

Koji build repos do not contain module metadata. With dnf fail-safe enabled (https://dnf.readthedocs.io/en/latest/modularity.html#fail-safe-mechanisms) it will be necessary for the Koji repos to have module_hotfixes=1 set in the yum repo (https://dnf.readthedocs.io/en/latest/conf_ref.html). This should be configurable on a per-tag basis.

@sgallagh @psabata - please fill in more details


Metadata Update from @tkopecek:
- Custom field Size adjusted to None

4 years ago

Metadata Update from @tkopecek:
- Custom field Size adjusted to small (was: None)
- Issue set to the milestone: 1.18
- Issue tagged with: feature

4 years ago

I'd love to hear more concrete details on where / when this is needed...

Sorry, missed this in my email.

So, to be clear, this is a workaround for the real problem, which is that our pipeline generates buildroots that contain RPMs built as modules but do not bring along the associated module metadata. DNF recently gained a feature we're calling "fail-safe" which is meant to protect against repositories that are incompletely synced (meaning they have lost the module metadata, but the RPMs remain).

The reason for this is to avoid cases where a user performs an update and (due to an improperly-mirrored or generated repo) ends up updating a modular RPM to a non-modular one that may be incompatible. (For example, they installed nodejs:6 to support their application, but the non-modular repos have nodejs-8.10.1 in them. If the module metadata is missing, DNF would otherwise happily update them to the incompatible 8.x version because it is simply a higher NVR.

The fail-safe function takes advantage of the fact that RPMs built as part of a module have a special RPM header that identifies that fact. DNF will see that header and refuse to update it to an RPM that does not have that header. We have a special workaround for this in the case of shipping hotfixes (defined as: individual RPMs intended to upgrade the modular ones for a short time to get someone up and running until an official errata is released). That's to create a repo for these hotfixes and set the repo configuration option module_hotfixes = 1. This tells DNF to ignore the module header for RPMs in this repo and just use the NVR-based upgrade logic.

As a short-term workaround for the koji repo generation missing the module metadata, since we know that the content is carefully selected and won't hit the risky upgrade cases this protects against, we can have koji just set this configuration option. As a longer-term solution, Koji really should be keeping the module metadata alongside the module RPMs.

I hope that helps.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1524 Merged 4 years ago