EPEL public repository to sync?

Problem:
I’ve inherited a very poorly/badly/non documented installation of foreman from an admin that has left.
Many of the configured products with external defined repositories do not sync. I’ve sorted most of them but I am stuck on epel for RHEL8.

I am learning on the hoof - I have no previous foreman experience. It is what it is…

The configured product "epel_x86-64 has two repositories defined within it
epel 7
epel8_x86-64 (no, I dont know why some commonality in naming wasn’t used either.)

epel 7 uses external repo Index of /pub/epel/7/x86_64
epel8_x86-64 uses external repo Index of /pub/epel/8/Everything/x86_64

epel7 syncs perfectly.
epel8_x86-64 sync thinks about it for some while then errors with “A sub task failed”.

Both setups are configured the same wrt type=yum, no restrictions on architecture, verify SSL is yes, defaults for yum metadata and http proxy (none!) etc etc.

there is a difference in GPG key : epel 7 has NO gpg key connected to it, while epel8 has a key … I have no knowledge of why it has one when 7 doesn’t or where the key it does have came from. If i try the sync with NO epel 8 gpg key configured it errors as above “A sub task failed”.

Expected outcome:
a correct setup so that this rhel8 epel product/repo syncs as expected and is safe to use

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

System Information

Version 3.2.0 © 2009-2024 Paul Kelly and Ohad Levy

no idea where to find proxy version

Distribution and version:
no idea where to find that info

Other relevant data:
by all means provide pointers to any info that may help

Not sure if I can solve your problem, but at least I can give you some explanation and show you some errors.

So the URL for EPEL 8 seems to be correct, you can see this by the directory repodata on this level and it containing the metadata. You could try a mirror instead if problem persists.

But having only this repository is not enough as with EL8 onwards there is a split of non-modular and modular repositories. So next to Everything is Modular which will also be needed!

The GPG key does not matter for the sync, so it explains that you get the same error independent of it being set or not. Having the GPG key set will change the repository on the Hosts by enabling gpg checking and providing the key. So best practice would be to have it always set! You can also have one set for the product which will then be the default for all repositories if it is version independent (not the case for EPEL, but could reduce overhead for others).

1 Like

Some general hints on debugging repo sync issues.
Pulp (the component that actually handles all the repository stuff in the background) logs everything to journald, so you might find some pointers in there with journalctl -u '*pulp*'.
Sometimes it can also be helpful to take a look at the tasks in the task engine. In the Foreman UI, you can navigate to “Monitor” → “Tasks” and search for e.g. “Sync epel8” in there and take a look at the task details page or continue to “Dynflow Console” and see if you can find any more helpful error messages in there.

For your current problem, I have very vague memories of EPEL changing something in their repository metadata that older versions of Pulp/Katello (like 3.2) do not like. Though this is more of a gut feeling than something I can undermine with facts, it might be worth a try to adjust the mirroring policy of the repo. You can try this from the Foreman UI by navigating to Content → Products → select your EPEL product → select the EPEL8 repo → in the “Sync Settings” section, if “Mirroring Policy” is set to “Complete Mirroring” try changing this to “Additive” or “Content Only”.
What this will do is tell Pulp to not use the upstream metadata (which it might not be able to use), but instead only download the packages and build the repo metadata itself. The difference between “Additive” and “Content Only” is, that “Content Only” will remove packages that are deleted upstream, while “Additive” will only download new packages but not remove the ones that were deleted upstream.
After this, try to sync the repo and see if the error is gone.

2 Likes

“with EL8 onwards there is a split of non-modular and modular repositories. So next to Everything is Modular which will also be needed!”

OK… so how do I configure that in the foreman product/repository? If Everything needs Modular also, how do I tie the two together such that Everything is happy when it syncs?

Sync Settings
Upstream URL
Index of /pub/epel/8/Everything/x86_64
Verify SSL
Yes
Upstream Authorization

Apologies for my total ignorance but Ive been somewhat lumbered TBH and Im trying to learn this on the fly

cheers

further to the above…

within the product epel_x86-64 Ive added a repository
epel_rhel8_modular
using Index of /pub/epel/8/Modular/x86_64

and that syncs perfectly using complete mirroring

No problem, just feel free to ask any questions we had all to start somewhere and getting thrown into the cold water is perhaps not the best start you could get.

No need for those repositories to be tied in a way, they just have to be both synced and then available to the systems to function properly. If missing one or the other you will just miss packages. The other way round it would be more likely to cause problems because modular packages can depend on non-modular ones but not the other way round!

1 Like

thanks both.

So now Ive tried the above …

modular syncing fine
“everything” syncing continues to error with “Fatal parser error”.

Ive also tried uni of kent mirror and Index of /fedora-epel/8/Everything/x86_64/ as testers - same result. Ive created a new repository in my foreman set up - same result.

Tried journalctl -fu ‘pulp’| grep “16/Jul” | grep epel | grep -v “200 253”
but that returns very little and nothing of anything obvious ie every thing is a 200 return code.
without that final filter I see plenty of logging eg

Jul 16 14:29:00 sul-d4t-lcsm.d4t4solutions.com pulpcore-content[1271]: [16/Jul/2024:13:29:00 +0000] “GET /pulp/content/Default_Organization/prod/CV_RHEL8_Basev1/custom/epel_x86-64/epel8_x86-64/repodata/repomd.xml HTTP/1.1” 200 253 “-” “libdnf (Red Hat Enterprise Linux 8.9; generic; Linux.x86_64)”
Jul 16 14:29:07 sul-d4t-lcsm.d4t4solutions.com pulpcore-content[1271]: [16/Jul/2024:13:29:07 +0000] “GET /pulp/content/Default_Organization/non-prod/CV_RHEL8_Basev1/custom/epel_x86-64/epel8_x86-64/repodata/repomd.xml HTTP/1.1” 200 253 “-” “libdnf (Red Hat Enterprise Linux 8.9; generic; Linux.x86_64)”
Jul 16 14:29:18 sul-d4t-lcsm.d4t4solutions.com pulpcore-content[1271]: [16/Jul/2024:13:29:18 +0000] “GET /pulp/content/Default_Organization/non-prod/CV_RHEL8_Basev1/custom/epel_x86-64/epel8_x86-64/repodata/repomd.xml HTTP/1.1” 200 253 “-” “libdnf (Red Hat Enterprise Linux 8.9; generic; Linux.x86_64)”
Jul 16 14:30:46 sul-d4t-lcsm.d4t4solutions.com pulpcore-api[1265]: pulp [5226512e-3fde-4743-a669-9094b8712d33]: - - [16/Jul/2024:13:30:46 +0000] “GET /pulp/api/v3/distributions/rpm/rpm/?base_path=Default_Organization%2FLibrary%2Fcustom%2Fepel_x86-64%2Fepel8_x86-64 HTTP/1.1” 200 561 “-” “OpenAPI-Generator/3.17.4/ruby”

none of which seems to point to any issues with syncing that repo specifically.

Ive checked out dynflow - here’s what I see, in case those with experienced eyes notice anything “obvious”

4: Actions::Pulp3::Repository::RefreshRemote (success) [ 1.57s / 0.24s ]
6: Actions::Pulp3::Repository::Sync (skipped) [ 401.70s / 3.33s ]
9: Actions::Pulp3::Repository::SaveVersion (skipped) [ 0.00s / 0.00s ]
12: Actions::Pulp3::Repository::CreatePublication (skipped) [ 0.00s / 0.00s ]
14: Actions::Pulp3::Repository::SavePublication (skipped) [ 0.00s / 0.00s ]
16: Actions::Pulp3::Repository::RefreshDistribution (success) [ 1.53s / 0.30s ]
18: Actions::Pulp3::Repository::SaveDistributionReferences (skipped) [ 0.00s / 0.00s ]
19: Actions::Pulp3::Orchestration::Repository::Sync (skipped) [ 0.00s / 0.00s ]
21: Actions::Katello::Repository::IndexContent (success) [ 0.04s / 0.04s ]
25: Actions::Katello::Repository::FetchPxeFiles (success) [ 0.01s / 0.01s ]
29: Actions::Katello::Repository::ErrataMail (skipped) [ 0.00s / 0.00s ]
32: Actions::Katello::Applicability::Repository::Regenerate (success) [ 0.01s / 0.01s ]
33: Actions::Katello::Repository::Sync (skipped) [ 0.00s / 0.00s ]

ah… this looks like it…

Root Cause

  • For EPEL 8 and 9, The data type of comps metadata has changed to group i.e.

Raw

 <data type="group">
   <checksum type="sha256">38c120578e1f49b9074c3469a7eb9e366e4d2daf3e1d978d10d51a8a369287b3</checksum>
   <open-checksum type="sha256">0e32b3c58c14790acdb973f20a4b2207e24720222513b0bc63297a649a9884a8</open-checksum>
   <location href="repodata/38c120578e1f49b9074c3469a7eb9e366e4d2daf3e1d978d10d51a8a369287b3-comps-Everything.x86_64.xml.xz"/>
   <timestamp>1715912431</timestamp>
   <size>25664</size>

But the version of pulp_rpm shipped with Red Hat Satellite 6.11 or below is simply unaware of how to handle that type of metadata, hence the fatal error while parsing the comps metadata file.

So Ive got to work out how to update pulp_rpm ona system that gets its own packages from itself… ie doesnt have any updates to install

Great you are a step further!

So a Katello/Foreman system connected to it self is not supported because of exactly this reason!

But there will be no update for just the pulp_rpm like it is for the Satellite, so you will very likely need to update Katello/Foreman. I would advice to do so anyway as 3.2 is quite old, current supported versions are 3.11 and 3.10.

1 Like

“But there will be no update for just the pulp_rpm like it is for the Satellite, so you will very likely need to update Katello/Foreman. I would advice to do so anyway as 3.2 is quite old, current supported versions are 3.11 and 3.10.”

Aye. That’s the conclusion I have come too also.

Just got to find an idiots guide to a painless in-place upgrade now…

Confidentiality notice: This email (and any attachment) is intended for the addressee(s) named above. It may contain information of a confidential or legally privileged nature. Unauthorised disclosure or use of this email (or any attachment) is prohibited and may be unlawful. If you are not the intended recipient, please delete the email from your systems, destroy any copies and inform the sender immediately. Privacy notice: To find information on how we collect, process and store data, please see our privacy statement on our website Privacy Statement Disclaimer: All attachments have been scanned for viruses. However, Celebrus Technologies Plc cannot accept liability for any loss or damage you may incur as a result of virus infection.

You can just follow the steps from the documentation, it includes all you have possibly to do. But you have to do it one version after the other so start with Upgrading and Updating Foreman, do a quick verification after that then process with the next version and really use the next versions guide as there may be some specific tasks.

It is more or less painless I promise, but I do not promise it is complete free of pain! :wink: But if you run into problems just open another issue here.

1 Like

So…

3.2->3.3
3.3->3.4
3.4->3.5
3.5->3.6
3.6->3.7
3.7->3.8
3.8->3.9
3.9->3.10
3.10->3.11

?

Ouch and oof! :wink:

FWIW I have follow up questions in tjhis thread

[Update foreman from 3.2 to 3.11 - Support - TheForeman]
(Update foreman from 3.2 to 3.11)