Smart proxy sync issue

Problem:
Our smart proxy’s don’t seem to be syncing correctly. I’ve tried running the sync using hammer…

hammer proxy content synchronize --id 2

And get a bunch of the following errors.

HTTP status code: 400
Response headers: {"date"=>"Tue, 06 Dec 2022 08:46:13 GMT", "server"=>"gunicorn", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"POST, OPTIONS", "x-frame-options"=>"DENY", "content-length"=>"80", "x-content-type-options"=>"nosniff", "referrer-policy"=>"same-origin", "correlation-id"=>"db6665cc-ac06-4170-bb9d-307854ced663", "access-control-expose-headers"=>"Correlation-ID", "via"=>"1.1 ukwdr-foremanp-01.iongroup.net", "connection"=>"close"}
Response body: ["Cannot use 'skip_types' in combination with a 'mirror_complete' sync policy."]

This seems to have started happening since the 3.4/4.6 update.
I’ve tried updating the Foreman server to the latest 3.4.1 with no luck.

Expected outcome:
Content should successfully sync to smart proxy servers.

Foreman and Proxy versions:
Server: 3.4.1/4.6
Smart proxy’s: 3.4/4.6

Foreman and Proxy plugin versions:

  • ansible-collection-theforeman-foreman-3.5.0-2.el8.noarch
  • candlepin-4.2.3-1.el8.noarch
  • candlepin-selinux-4.2.3-1.el8.noarch
  • foreman-3.4.1-1.el8.noarch
  • foreman-cli-3.4.1-1.el8.noarch
  • foreman-debug-3.4.1-1.el8.noarch
  • foreman-dynflow-sidekiq-3.4.1-1.el8.noarch
  • foreman-installer-3.4.1-1.el8.noarch
  • foreman-installer-katello-3.4.1-1.el8.noarch
  • foreman-ovirt-3.4.1-1.el8.noarch
  • foreman-postgresql-3.4.1-1.el8.noarch
  • foreman-proxy-3.4.1-1.el8.noarch
  • foreman-release-3.4.1-1.el8.noarch
  • foreman-selinux-3.4.1-1.el8.noarch
  • foreman-service-3.4.1-1.el8.noarch
  • foreman-vmware-3.4.1-1.el8.noarch
  • katello-4.6.0-1.el8.noarch
  • katello-certs-tools-2.9.0-1.el8.noarch
  • katello-client-bootstrap-1.7.9-1.el8.noarch
  • katello-common-4.6.0-1.el8.noarch
  • katello-debug-4.6.0-1.el8.noarch
  • katello-repos-4.6.0-1.el8.noarch
  • katello-selinux-4.0.2-2.el8.noarch
  • pulpcore-selinux-1.3.2-1.el8.x86_64
  • python39-pulp-ansible-0.13.2-2.el8.noarch
  • python39-pulp-certguard-1.5.2-3.el8.noarch
  • python39-pulp-cli-0.14.0-4.el8.noarch
  • python39-pulp-container-2.10.9-1.el8.noarch
  • python39-pulp-deb-2.18.0-3.el8.noarch
  • python39-pulp-file-1.10.2-2.el8.noarch
  • python39-pulp-python-3.7.1-1.el8.noarch
  • python39-pulp-rpm-3.18.9-1.el8.noarch
  • python39-pulpcore-3.18.10-1.el8.noarch
  • qpid-proton-c-0.37.0-1.el8.x86_64
  • rubygem-foreman-tasks-7.0.0-1.fm3_4.el8.noarch
  • rubygem-foreman_ansible-9.0.1-1.fm3_4.el8.noarch
  • rubygem-foreman_bootdisk-21.0.2-1.fm3_4.el8.noarch
  • rubygem-foreman_maintain-1.2.1-1.el8.noarch
  • rubygem-foreman_openscap-5.2.2-2.fm3_3.el8.noarch
  • rubygem-foreman_remote_execution-8.0.0-2.fm3_4.el8.noarch
  • rubygem-hammer_cli-3.4.0-1.el8.noarch
  • rubygem-hammer_cli_foreman-3.4.0-1.el8.noarch
  • rubygem-hammer_cli_foreman_ansible-0.4.0-1.fm3_4.el8.noarch
  • rubygem-hammer_cli_foreman_bootdisk-0.3.0-2.el8.noarch
  • rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.17-1.fm3_2.el8.noarch
  • rubygem-hammer_cli_katello-1.7.0-0.1.pre.master.20220802114853git2f16bef.el8.noarch
  • rubygem-katello-4.6.0-1.el8.noarch
  • rubygem-pulp_ansible_client-0.13.4-1.el8.noarch
  • rubygem-pulp_certguard_client-1.5.5-1.el8.noarch
  • rubygem-pulp_container_client-2.10.7-1.el8.noarch
  • rubygem-pulp_deb_client-2.18.1-1.el8.noarch
  • rubygem-pulp_file_client-1.10.5-1.el8.noarch
  • rubygem-pulp_ostree_client-2.0.0-0.1.a1.el8.noarch
  • rubygem-pulp_python_client-3.6.1-1.el8.noarch
  • rubygem-pulp_rpm_client-3.17.12-1.el8.noarch
  • rubygem-pulpcore_client-3.18.5-2.el8.noarch
  • rubygem-qpid_proton-0.37.0-1.el8.x86_64
  • rubygem-smart_proxy_pulp-3.2.0-3.fm3_3.el8.noarch

Distribution and version:
CentOS 8 Stream

Other relevant data:

From Pulp changelog:

The use of skip_types while performing a sync under the mirror_complete sync policy is now disallowed. Previously it would be silently ignored instead. #2293

Do you mean in the repository config? I have the mirroring policy set to ‘Content Only’.

Thanks

All repository mirrors are created with mirror_complete on proxies.

Does this mean that “Additive” mirroring policy and/or “Ignore SRPMs” cannot be used when you have proxies?

Sorry i’m not sure I understand…any ideas what I need to change to fix this please?
Is this Product repo config or some different proxy config…?

You can use additive on the master server.
The proxy itself uses mirror_complete and syncs whatever is on the master server with mirror_complete due to this line.

Could you try clear out all skip_types on mirrors because they get their content from master which would’ve ignored srpms anyway.

Do you mean set each product to not ignore SRPMs?
image

Right, please try it.

Will do, i’ll let you know how it goes…

Out of interest though - if we want to exclude SRPMs…how do we do this?

@robb : I have a pull request for this here: Fixes #35829 - Mirror complete sync policy no longer allowed with ignored content types by sjha4 · Pull Request #10379 · Katello/katello · GitHub which I am hoping to get into 4.6.2.

The mirroring policy of Complete mirroring overrides the Ignore SRPM flag and will mirror all the data per: The interaction of skip_types and mirror=True is unintuitive · Issue #2293 · pulp/pulp_rpm · GitHub.

To ignore SRPMS on master server, use a mirroring policy other than Complete mirroring. Smart Proxy repositories are exact mirrors of repos on the main server so if SRPMs are ignored on master server, the same will apply to complete mirrors of that on proxies.

OK great - for now I removed the option to ignore SRPMs and proxy syncs appear to be working.
Thanks all for the help.