Katello Error Syncing deb based repo packages

Problem:
After upgrading to latest release, Katello is throwing an error syncing all Debian based repositories.

Error message: the server returns an error
HTTP status code: 400
Response headers: {“date”=>“Wed, 05 Jan 2022 01:01:01 GMT”, “server”=>“gunicorn”, “content-type”=>“application/json”, “vary”=>“Accept,Cookie”, “allow”=>“GET, PUT, PATCH, DELETE, HEAD, OPTIONS”, “x-frame-options”=>“DENY”, “content-length”=>“42”, “x-content-type-options”=>“nosniff”, “referrer-policy”=>“same-origin”, “correlation-id”=>“803d54cc-2f1e-4cf8-8c17-2a32164d19df”, “access-control-expose-headers”=>“Correlation-ID”, “via”=>“1.1 hq-1pforeman.internal.ieeeglobalspec.com”, “connection”=>“close”}
Response body: {“policy”:[""" is not a valid choice."]}

Expected outcome:
No errors, repos will sync.

Foreman and Proxy versions:

Foreman Version 3.1.0
katello-4.3.0-0.6.rc4.el7.noarch

Distribution and version:
CentOS 7

For anyone else having this issue, it appears that all my deb based repositories had their download policy set to an empty option. I had to manually go through them all and change them to Immediate or On Demand, then syncing was successful.

2 Likes

I have the same issue. It seems to be a problem with the upgrade from 4.2 to 4.3, not setting a download policy, only the mirroring policy. There was no download policy for deb repos in 4.2.

This more looks like a missing migration to me. Setting it manually is a workaround but not really a solution…

Opened Bug #34591: Sync error for deb repos after upgrade to 4.3 - Katello - Foreman