Project

Profile

Help

Issue #9133

closed

RPM repository sync error

Added by gvde over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - NOTABUG
Priority:
High
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 101
Quarter:

Description

I have been collecting all information on this problem here: https://community.theforeman.org/t/centos-8-4-baseos-sync-error

In short: occasionally my sync of the CentOS 8 BaseOS repository from centos.org ends with errors:

Error message: the server returns an error
HTTP status code: 400
Response headers: {"date"=>"Thu, 22 Jul 2021 20:36:46 GMT", "server"=>"gunicorn", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"GET, POST, HEAD, OPTIONS", "x-frame-options"=>"SAMEORIGIN", "content-length"=>"67", "correlation-id"=>"ded10b33-c063-4471-9182-3b62facbd36b", "access-control-expose-headers"=>"Correlation-ID", "via"=>"1.1 foreman.example.com", "connection"=>"close"}
Response body: {"repository_version":["Invalid hyperlink - Incorrect URL match."]}Error message: the server returns an error
HTTP status code: 400
Response headers: {"date"=>"Thu, 22 Jul 2021 20:36:47 GMT", "server"=>"gunicorn", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"GET, POST, HEAD, OPTIONS", "x-frame-options"=>"SAMEORIGIN", "content-length"=>"112", "correlation-id"=>"ded10b33-c063-4471-9182-3b62facbd36b", "access-control-expose-headers"=>"Correlation-ID", "via"=>"1.1 foreman.example.com", "connection"=>"close"}
Response body: ["URI /pulp/api/v3/publications/rpm/rpm/1ad1ad0e-c9c1-42ef-94f6-0b188c29f72d/ not found for repositoryversion."]

I can access the mentioned publication URI via API:

# curl -s --cert /etc/pki/katello/certs/pulp-client.crt --key /etc/pki/katello/private/pulp-client.key 'https://foreman.dkrz.de/pulp/api/v3/publications/rpm/rpm/1ad1ad0e-c9c1-42ef-94f6-0b188c29f72d/' | python -m json.tool
{
    "gpgcheck": 0,
    "metadata_checksum_type": "unknown",
    "package_checksum_type": "unknown",
    "pulp_created": "2021-07-22T20:36:04.962028Z",
    "pulp_href": "/pulp/api/v3/publications/rpm/rpm/1ad1ad0e-c9c1-42ef-94f6-0b188c29f72d/",
    "repo_gpgcheck": 1,
    "repository": "/pulp/api/v3/repositories/rpm/rpm/3f9dc526-a51c-4a25-9547-95f82bedb3ee/",
    "repository_version": "/pulp/api/v3/repositories/rpm/rpm/3f9dc526-a51c-4a25-9547-95f82bedb3ee/versions/4/",
    "sqlite_metadata": true
}

However, the repository for that is not found:

# curl -s --cert /etc/pki/katello/certs/pulp-client.crt --key /etc/pki/katello/private/pulp-client.key 'https://foreman.dkrz.de/pulp/api/v3/repositories/rpm/rpm/3f9dc526-a51c-4a25-9547-95f82bedb3ee/' | python -m json.tool
{
    "detail": "Not found."
}

Checking the pulpcore database I can find both:

pulpcore=# select * from rpm_rpmpublication where publication_ptr_id = '1ad1ad0e-c9c1-42ef-94f6-0b188c29f72d';
          publication_ptr_id          | metadata_checksum_type | package_checksum_type | gpgcheck | repo_gpgcheck | sqlite_metadata 
--------------------------------------+------------------------+-----------------------+----------+---------------+-----------------
 1ad1ad0e-c9c1-42ef-94f6-0b188c29f72d | unknown                | unknown               |        0 |             1 | t
(1 row)

pulpcore=# select * from rpm_rpmrepository where repository_ptr_id = '3f9dc526-a51c-4a25-9547-95f82bedb3ee';
          repository_ptr_id           | sub_repo | metadata_signing_service_id |         last_sync_remote_id          | last_sync_repo_version | last_sync_revision
_number |                                                                                        original_checksum_types                                           
                                             | retain_package_versions |                    last_sync_repomd_checksum                     | autopublish | gpgcheck 
| metadata_checksum_type | package_checksum_type | repo_gpgcheck | sqlite_metadata 
--------------------------------------+----------+-----------------------------+--------------------------------------+------------------------+-------------------
--------+----------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------+-------------------------+------------------------------------------------------------------+-------------+----------
+------------------------+-----------------------+---------------+-----------------
 3f9dc526-a51c-4a25-9547-95f82bedb3ee | t        |                             | 69abed5c-b1e1-452a-b58b-f0cc23548924 |                      4 | 8.4.2105          
        | {"group": "sha256", "other": "sha256", "modules": "sha256", "primary": "sha256", "group_xz": "sha256", "other_db": "sha256", "filelists": "sha256", "prim
ary_db": "sha256", "filelists_db": "sha256"} |                       0 | c21c5d2410544fccf2dcc78ce0f472fd8ed9d8c3fc0de1a8f8061a72629a5c7e | f           |        0 
| sha256                 | sha256                |             0 | f
(1 row)

Also available in: Atom PDF