Incorrect Nginx Package Source Selection from Pulp Repositories

Problem:
Hi, My system is configured with three pulp repositories: rhel-8-appstream-eus-rhui-rpms, rhel-8-baseos-eus-rhui-rpms, and nginx. When I try to download the nginx package, it downloads it from rhel-8-appstream-eus-rhui-rpms (an earlier version) rather than nginx repository, which has the most recent nginx version. If I disable the rhel-8-appstream-eus-rhui-rpms repository and then run yum install nginx, it downloads from the nginx repository.

Pulpcore version:
pulpcore==3.31.0

Pulp plugins installed and their versions:
pulp-rpm==3.22.3
pulp-certguard==1.6.5
pulp-certguard-client==1.6.5
pulp-cli==0.21.2

Operating system - distribution and version:
RHEL 8.8

Please let me know if you need any other information.
Thank You for your help!

1 Like

That doesn’t sound like Pulp, that’s a dnf choice. You can set priorities on your repositories in /etc/yum.repos.d/myrepo.repo. As noted in the config docs on priority, if the same package is in multiple repos it will pick the lowest priority repo’s version.

Modularity is also involved in this decision - dnf (I believe) chooses modular packages over non-modular. Not sure that’s your issue here, but its another factor.

In any event - Pulp just holds the repositories, and hands back what dnf asks of it. It doesn’t have a part in deciding which repo the client gets the package from.

3 Likes

Hi @ggainey,
I tried giving lowest priority to Nginx repository( priority=1 ). But its still fetching package from rhel-8-appstream-eus-rhui-rpms

Appstream has modules - if a package is included in a module, dnf gives preference to the modular version over non-modular.

If you’re installing onto a RHEL8 system, you’re safer sticking with the RHEL8 packages, as a general rule.

Thank you for your help @ggainey but we do have requirement where we want to get the latest nginx version. Found this document which explains if we want to make the system use packages from a repository regardless of their modularity we have to specify module_hotfixes=true in the .repo file. That worked for me.

Appreciate your help Thank you again!!

4 Likes