Pulp rpm repository sync fails

Problem:
Pulp rpm repository sync fails after pulp upgrade with the following error: Cannot use ‘autopublish’ in combination with a ‘mirror_complete’ sync policy.

Expected outcome:
Make sync working again

Pulpcore version:
“3.20.0”

Pulp plugins installed and their versions:
{
“component”: “rpm”,
“version”: “3.17.12”,
“package”: “pulp-rpm”
},
{
“component”: “file”,
“version”: “1.11.1”,
“package”: “pulp-file”
}

Operating system - distribution and version:
Red Hat Enterprise Linux Server release 7.9 (Maipo)

Other relevant data:

Command used:

pulp rpm repository sync --mirror --name “my_repo”

get http://localhost:24817/pulp/api/v3/repositories/rpm/rpm/?name=my_repo&offset=0&limit=1
Response: 200
post http://localhost:24817/pulp/api/v3/repositories/rpm/rpm/cef76eb6-0dae-4dad-a9a9-4404bc70f238/sync/
Response: 400
Error: [“Cannot use ‘autopublish’ in combination with a ‘mirror_complete’ sync policy.”]

Fails after I’ve upgraded from:
“versions”: [
{
“component”: “core”,
“version”: “3.18.3”
},
{
“component”: “rpm”,
“version”: “3.17.4”
},
{
“component”: “file”,
“version”: “1.10.2”
}

According to the docs, using “mirror” is deprecated for rpm. You probably want to use the “mirror_content” sync policy or deactivate autopublish.

[0] Create, Sync and Publish a Repository — Pulp RPM Support 3.17.12 documentation

2 Likes

If you’re using mirror or mirror_complete (the former being a compatibility alias for the latter) you don’t need autopublish to begin with because it will pull down a copy of the original repository metadata and use that. It’s essentially built-in autopublish.

If you want to have the repository published automatically when you add things, then by definition you’re no longer mirroring some external repository, so that’s why it warns about the options being in conflict.

2 Likes

I’ve disabled autopublish and all works fine now. Thanks a lot