Problem:
There are updates available for elasticsearch, kibana and some more which I sync from https://artifacts.elastic.co/packages/6.x/yum/ and https://artifacts.elastic.co/packages/7.x/yum/
However, my clients connected to my content proxy get an error:
https://foreman-content.example.com/pulp/content/ORG/Production/centos7/custom/elastic/elasticsearch-6-x/Packages/k/kibana-6.8.18-x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found
Foreman and Proxy versions:
2.5.2/4.1.2.1 on both main server.
2.5.2 with latest pulpcore 3.14 rpms on content proxy.
Distribution and version:
CentOS 7.9
Other relevant data:
In the journal for pulpcore-content there is this error:
Aug 09 18:10:27 foreman-content.example.com pulpcore-content[55347]: pulp [None]: pulpcore.content.handler:WARNING: Could not download remote artifact at 'https://foreman.example.com/pulp/content/ORG/Production/centos8/custom/elastic/elasticsearch-6-x/6.8.18/kibana-6.8.18-x86_64.rpm': 404, message='Not Found', url=URL('https://foreman.example.com/pulp/content/ORG/Production/centos8/custom/elastic/elasticsearch-6-x/6.8.18/kibana-6.8.18-x86_64.rpm')
Aug 09 18:10:27 foreman-content.example.com pulpcore-content[55347]: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://foreman.example.com/pulp/content/ORG/Testing/centos7/custom/elastic/elasticsearch-6-x/6.8.18/kibana-6.8.18-x86_64.rpm'))
Aug 09 18:10:27 foreman-content.example.com pulpcore-content[55347]: pulp [None]: backoff:ERROR: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://foreman.example.com/pulp/content/ORG/Testing/centos7/custom/elastic/elasticsearch-6-x/6.8.18/kibana-6.8.18-x86_64.rpm'))
That, of course, is the wrong URL. The correct URL on the main server is https://foreman.example.com/pulp/content/ORG/Testing/centos7/custom/elastic/elasticsearch-6-x/Packages/k/kibana-6.8.18-x86_64.rpm
The upstream repo uses the version directory. At elastic.co the URL for the RPM is https://artifacts.elastic.co/packages/6.x/yum/6.8.18/kibana-6.8.18-x86_64.rpm
For some reason, the content proxy synced the structure of the upstream repo into itâs database although itâs accessing pulp on the main serverâŚ
This is from the pulpcore database on the content proxy:
pulpcore=# select name, epoch, version, release, arch, url, location_base, location_href from rpm_package where name = 'kibana' and version like '6.8.18';
name | epoch | version | release | arch | url | location_base | location_href
--------+-------+---------+---------+--------+------------------------+---------------+---------------------------------
kibana | 0 | 6.8.18 | 1 | x86_64 | https://www.elastic.co | | 6.8.18/kibana-6.8.18-x86_64.rpm
(1 row)