Foreman fail to sync due to error in repodata files

For at least BaseOS file repomd.xml has no value for field

 <data type="group">
    <checksum type="sha256">5eedac6f334681aa51e154d77025db287c33ce1491b14368be9b477ff8208152</checksum>
    <location href="repodata/5eedac6f334681aa51e154d77025db287c33ce1491b14368be9b477ff8208152-comps-BaseOS.x86_64.xml"></location>
    <timestamp>1626893963</timestamp>
    <size>297208</size>
    <open-size></open-size>

With no numeric value Foreman will fail to sync.

There are also at least one file with incorrect size & checksum in file d84790843c77fc2bae170d90b42594a73ebf72109ff56a7d860bf2ad6ee351a0-primary.xml.gz:

This is the file I found so far:

grub2-tools-minimal-2.02-99.el8.x86_64.rpm

Confirmed. I’m seeing issues syncing BaseOS, PowerTools, and AppStream using Katello.

The Plus repo syncs successfully, and imported Errata details for an openldap bugfix. Perhaps the issue with syncing these other repos is related to the new errata system?

Folks –

This is a pretty major concern for many of us who are using / plan to use Rocky in the Enterprise, with central patch management functions and features.

Any word on when this may be resolved?

Thanks for your help and excellent work on this project!

i was in the same situation Solved it like that:
synced it to a mirror (i’ve used AT Mirrors - Mirror Manager )
next i’ve changed the upstream URL to Index of /pub/rocky/8/BaseOS/x86_64/os/
and synced it via Advanced Sync - Complete Sync
Synced correctly

I did similar as a work around but that should not be the solution.
There are no issues to sync Alma Linux directly with katello (Foreman) and Rocky should work the same way.

1 Like

I’ve been attempting @almor 's solution above, but continue to receive the following exception for BaseOS, AppStream, and PowerTools:

Katello::Errors::PulpError: PLP0000: int() argument must be a string or a number, not 'NoneType'

Was this the error y’all were receiving prior to the corrective action recommended?

yes, that is the error I got. You get this because

<open-size></open-size>

is missing a numeric value

@jlhm – So, to confirm, you’re able to:

  1. Change the upstream URL to AT:
    https://mirror.alwyzon.net/rockylinux/8/AppStream/x86_64/os/
  2. Run a sync (Select Action → Sync Now)
  3. Change the upstream URL back to the Rocky baseurl:
    https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
  4. Run a Complete Sync (Select Action → Advanced Sync → Complete Sync)

…and eliminate the error??

In my experience, this doesn’t work. I’ve even attempted completely deleting one of the three problematic repos, deleting orphaned content, and recreating it, and I still get the error, even when the new repo is created to source from dl.rockylinux.org from the get-go.

What am I missing?

Not sure how jlhm got it working, but in my case I sync Katello against an internal mirror. I deleted the line <open-size></open-size> from the repomd.xml file and now the sync is working. I’ve tested it with BaseOS, AppStream, and HighAvailability.

I checked against a random CentOS repomd.xml file and it doesn’t have a <open-size></open-size> within this one specific block of code.

So to me the issue is with the Rocky repomd.xml files online that will need to be regenerated

2 Likes

My solution was to use reposync on a host that downlooad all rpm files. Then I used createrepo to create the repodata files and then modifyrepo command to add modules and update info to the repo. After that I use Foreman (katello) to get the repo from that repo I just created.
Example:

reposync -c yum.conf --repoid=AppStream --downloadcomps --download-metadata

(yum.conf contains the URL to the Rocky repo you want to download)

createrepo -g comps.xml .

gunzip -c repodata/6fa831ea588dd6c188672b3ae8a01f49e44d54e10f6bf5b935b91c3466207a0f-modules.yaml.gz > modules.yaml

gunzip -c repodata/3200fa34dbd6e07a076034a24dc21acf037fd8bc8a1c4eb93d05f06a52aaecd8-updateinfo.xml.gz > updateinfo.yaml

modifyrepo modules.yaml repodata/
modifyrepo updateinfo.xml repodata/

1 Like

@brian.earl and @jlhm – Yeah, that’s really running around Robin Hood’s barn. Okay, I’ve just reached out to https://chat.rockylinux.org with this insight to see if we can get some visibility on this. I didn’t see it already in discussion, based on search terms I used.

1 Like

Infrastructure guys are on it!

Screen Shot 2021-07-27 at 2.40.56 PM

1 Like

BZ for tracking: 131 – repomd.xml Files for Several Repositories Include a null `open-size` Element, which Breaks Compatibility with Katello/Foreman(/Satellite)

Edit: @jlhm , @almor , and @brian.earl – There has (already!) been follow-up to the BZ submitted earlier this afternoon. The outstanding issue with the repomd.xml appears to have been resolved.

@jacraig Thanks for running with opening the BZ. I can confirm it’s working again from my side as well. Cheers.

1 Like

I just tested to sync BaseOS with Foreman (katello) and it works now.

1 Like

I just found one rpm file in PowerTools with wrong size in the xml file:

{"expected_size"=>458056, "error_code"=>"size_mismatch", "name"=>"shim-unsigned-x64", "unit_key"=>{"epoch"=>"0", "version"=>"15.4", "name"=>"shim-unsigned-x64", "release"=>"4.el8.1", "checksum"=>"2f7bc6e617952d0a01ab2410b33b467d481e482a45f5c92ca02cb22667cb4cb9", "arch"=>"x86_64", "checksumtype"=>"sha256"}, "actual_size"=>457996}