Rpm_publication gives: failed: ''File already exists''

Problem:

Running rpm_publication gives this error on one of the 33 repositories.

File already exists

The error is hard.

How can this be remedied please?
Thank you.

A repair and reclaim were done on the repository.

Expected outcome:

Please help to fix this.

Pulpcore version:

      "versions": {
        "deb": "3.4.0",
        "rpm": "3.27.2",
        "core": "3.68.1",
        "file": "3.68.1",
        "maven": "0.8.1",
        "ostree": "2.4.4",
        "python": "3.12.5",
        "ansible": "0.23.1",
        "certguard": "3.68.1",
        "container": "2.22.0"
      }
      
      pulp.squeezer 0.1.0

Pulp plugins installed and their versions:

Operating system - distribution and version:

SLES15 SP5

Other relevant data:

   failed: [localhost] (item={'name': 'upstream-SUSE-PackageHub-15-SP6-Backports-Pool', 'backend': 'http://smt.abcgroup.net/repo/SUSE/Backports/SLE-15-SP6_x86_64/standard/', 'base': 'SUSE/Backports/SLE-15-SP6_x86_64/standard'}) => changed=false 
  ansible_index_var: p_idx
  ansible_loop_var: item
  item:
    backend: http://smt.abcgroup.net/repo/SUSE/Backports/SLE-15-SP6_x86_64/standard/
    base: SUSE/Backports/SLE-15-SP6_x86_64/standard
    name: upstream-SUSE-PackageHub-15-SP6-Backports-Pool
  msg: 'Task /pulp/api/v3/tasks/01961eb6-5398-79d1-8251-74ad7d3818f5/ failed: ''File already exists'''
  p_idx: 32


itad237:/tmp # pulp task show --uuid 01961eb6-5398-79d1-8251-74ad7d3818f5
{
  "pulp_href": "/pulp/api/v3/tasks/01961eb6-5398-79d1-8251-74ad7d3818f5/",
  "prn": "prn:core.task:01961eb6-5398-79d1-8251-74ad7d3818f5",
  "pulp_created": "2025-04-10T07:59:47.609969Z",
  "pulp_last_updated": "2025-04-10T07:59:47.609986Z",
  "state": "failed",
  "name": "pulp_rpm.app.tasks.publishing.publish",
  "logging_cid": "069882cf24a343a0b0237cd3df016127",
  "created_by": "/pulp/api/v3/users/1/",
  "unblocked_at": "2025-04-10T07:59:47.652888Z",
  "started_at": "2025-04-10T07:59:47.785488Z",
  "finished_at": "2025-04-10T08:01:27.738477Z",
  "error": {
    "traceback": "  File \"/usr/local/lib/python3.9/site-packages/pulpcore/tasking/tasks.py\", line 68, in _execute_task\n    result = func(*args, **kwargs)\n  File \"/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/publishing.py\", line 385, in publish\n    generate_repo_metadata(\n  File \"/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/publishing.py\", line 584, in generate_repo_metadata\n    upd_xml = cr.UpdateInfoXmlFile(upd_xml_path, compressiontype=cr_compression_type)\n  File \"/usr/local/lib64/python3.9/site-packages/createrepo_c/__init__.py\", line 306, in __init__\n    XmlFile.__init__(self, path, XMLFILE_UPDATEINFO,\n",
    "description": "File already exists"
  },
  "worker": "/pulp/api/v3/workers/0195d174-e433-7dbc-ace1-d77302ded159/",
  "parent_task": null,
  "child_tasks": [],
  "task_group": null,
  "progress_reports": [
    {
      "message": "Generating repository metadata",
      "code": "publish.generating_metadata",
      "state": "failed",
      "total": 1,
      "done": 0,
      "suffix": null
    }
  ],
  "created_resources": [],
  "reserved_resources_record": [
    "shared:prn:rpm.rpmrepository:019519b8-4db2-7102-a6e6-4a5f5c1ea5b3",
    "shared:prn:core.domain:019513aa-8ee7-77d4-af49-eb445030ae0b"
  ]
}

We have also observed this issue for at least one SLES repo.
The sync is successful, but the publish fails with the error.
Unfortunately, the repo requires SLES login credentials, i.e. it is not a publicly available reproducer, I can however post our remote with the credentials REDACTED:

{
  "pulp_href": "/pulp/api/v3/remotes/rpm/rpm/01963370-4016-7a3f-91b1-21c3f6fc0f0a/",
  "pulp_created": "2025-04-14T08:35:16.632331Z",
  "pulp_last_updated": "2025-04-14T11:29:16.210018Z",
  "name": "2687_SUSE-PackageHub-15-SP6-Backports-Pool_for_sle-15-x86_64-16961352",
  "url": "https://updates.suse.com/SUSE/Backports/SLE-15-SP6_x86_64/standard/",
  "ca_cert": null,
  "client_cert": null,
  "tls_validation": true,
  "proxy_url": "",
  "pulp_labels": {},
  "download_concurrency": null,
  "max_retries": null,
  "policy": "immediate",
  "total_timeout": 3600.0,
  "connect_timeout": 60.0,
  "sock_connect_timeout": 60.0,
  "sock_read_timeout": 3600.0,
  "headers": null,
  "rate_limit": 0,
  "hidden_fields": [
    {
      "name": "client_key",
      "is_set": false
    },
    {
      "name": "proxy_username",
      "is_set": false
    },
    {
      "name": "proxy_password",
      "is_set": false
    },
    {
      "name": "username",
      "is_set": false
    },
    {
      "name": "password",
      "is_set": false
    }
  ],
  "sles_auth_token": "REDACTED"
}