Repo sync problem (Foreman 2.3.5 / Katello 3.18.3)

Getting sync errors since a couple of weeks - strange enough not for all repos,
e.g. for the Zabbix, Puppet, docker … things work fine but for the Centos (base,plus, extras, …) and Epel repos I’m getting an error.
What I see is that a slash gets inserted in the download URLS just before the question mark preceding the key/value pairs:
404, message=‘Not Found’, url=URL(‘’)
That won’t work, it should be
Looks like a bug to me but wondering why no one else seemw to be facing this issue. Any ideas?

You are not alone: CentOS repository sync frustrations

I’ve been chatting via IRC and… looks like these should be addressed in Katello 4.2 et al, but that’s a few weeks out.

What about Katello 3.x versions? I’m a bit reluctant to migrate to 4.x seen they no longer support puppet (migrating to ansible or a puppet manager outside Foreman/Katello is on the todo list, amongst many other things …)

I never had problems using the directory paths into the repositories, e.g.

the mirrorlist and the URLs with ? may not work at the moment. As Katello seems to extract information from the part after the question mark it may be necessary to add a new repository with the direct URL.

Regarding puppet, as of 4.1 it’s still all as it is. And as far as I understand, they won’t remove the puppet code and abandon puppet support, but migrate everything into a separate plugin. Puppet won’t be installed as integral part of foreman anymore but you can still continue as before with the puppet plugin.

Well, I tried that to, with those URLs, sync returns
An invalid remote URL was provided.

In a new repository?

Sorry for a bit off-topic, but it would be great if you let us know, what you ended up using. Note that it’s just puppet content that’s dropped, the rest of puppet functionality remains, just will live in a standalone plugin. If you’re interested in this part, I assume r10k is on your radar.

Well, there seems to be a bit more to this than I anticipated:
Updated to 2.4.1 / Katello 4.0.1 - still the same sync issues. I was working on a new repo set for Rocky Linux and set a mirror list for the base repo - sync problem. Changed the upstream URL to one of the URLs from the mirror list - still sync problem.
Next I blew away the repo and created it all over again, this time with just an mirror URL rather than a mirror list right from the start. Tadaaaa… syncing nicely. So just changing the upstream URL is not doing what one would expect - pretty odd imho. Secondly, mirror lists stopped working somewhere along the line of upgrades. I’ve been using them right from the start and they always worked fine - can’t remember till when but if my memory is OK I think things were OK upto version 2.1 …

Yes. Katello stores the parameters to the URI separately and you cannot get rid of it when you change the URL. That’s why you have to add a new repository. See Bug #32660: katello assumes GET params in repo url are SLES auth tokens, but may not be - Katello - Foreman

No way to get around that? E.g. changing things in the database?