Problem:
If I set CONTENT_PREFIX_PATH to my custom value - I cannot access repository,
If I leave it default pulp/content
- I access repository without problems.
Note: every experiment is executed on fresh/empty instance of Pulp in One Container.
Please, recommend how to change content prefix from default ‘pulp/content’ to
my custom.
Expected outcome:
If I set CONTENT_PATH_PREFIX='/my/'
I expect my repository e.g. deb22
to be accessible at: http://host:8080/my/deb22
Pulpcore version:
3.43.0
Pulp plugins installed and their versions:
pulp-deb 3.1.0
pulp-ansible 0.21.0
pulp-certguard 1.7.1
Operating system - distribution and version:
Ubutu 22
Other relevant data:
-----> This is working settings.py
echo "CONTENT_ORIGIN=‘http://$(hostname):8080’
ANSIBLE_API_HOSTNAME=‘http://$(hostname):8080’
ANSIBLE_CONTENT_HOSTNAME=‘http://$(hostname):8080/pulp/content’
CACHE_ENABLED=True " >> settings/settings.py
NOTE: Can access my repository at: http://host:8080/pulp/content/deb22
-----> Non working settings.py
echo “CONTENT_ORIGIN=‘http://$(hostname):8080’
ANSIBLE_API_HOSTNAME=‘http://$(hostname):8080’
ANSIBLE_CONTENT_HOSTNAME=‘http://$(hostname):8080/pulp/content’
CACHE_ENABLED=True
CONTENT_PATH_PREFIX=’/my/’” >> settings/settings.py
NOTE: CAN NOT access my repository at: http://host:8080/my/deb22
-----> Also non working settings.py
echo “CONTENT_ORIGIN=‘http://$(hostname):8080’
ANSIBLE_API_HOSTNAME=‘http://$(hostname):8080’
ANSIBLE_CONTENT_HOSTNAME=‘http://$(hostname):8080/my’
CACHE_ENABLED=True
CONTENT_PATH_PREFIX=’/my/’” >> settings/settings.py
NOTE: CAN NOT access my repository at: http://host:8080/my/deb22
$ pulp deb distribution create --name=distro22 --base-path=deb22 --repository=deb22
Started background task /pulp/api/v3/tasks/018c80e1-cdc3-7ded-8aa3-bb29cab8b994/
.Done.
{
“pulp_href”: “/pulp/api/v3/distributions/deb/apt/018c80e1-ce59-71fd-a5eb-a2f1c354bcee/”,
“pulp_created”: “2023-12-19T07:02:11.290651Z”,
“base_path”: “mydeb22”,
“base_url”: “http://:8080/my/deb22/”,
“content_guard”: null,
“hidden”: false,
“pulp_labels”: {},
“name”: “distro22”,
“repository”: “/pulp/api/v3/repositories/deb/apt/018c80e1-74e9-7e2b-8dc4-86c6e3fc03be/”,
“publication”: null
}
Trying to open http://<host>:8080/my/deb22/
in browser I get:
Not Found
The requested resource was not found on this server.
Pulp log shows:
pulp [f39627482edb4a6ba1218f279d35cb93]: django.request:WARNING: Not Found: /my/deb22/
(‘pulp [f39627482edb4a6ba1218f279d35cb93]: ::ffff:127.0.0.1 - - [19/Dec/2023:07:15:10 +0000] “GET /my/deb22/ HTTP/1.0” 404 179 “-” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36”’,)