Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

404 not found on all content #1157

Closed
DaveDrupsteen opened this issue Jun 3, 2022 · 4 comments · Fixed by #1158
Closed

404 not found on all content #1157

DaveDrupsteen opened this issue Jun 3, 2022 · 4 comments · Fixed by #1158

Comments

@DaveDrupsteen
Copy link

Hi,

I hope this is the right way to do this, I am getting 404: Not found on all types of /content/ requests.

I am running the follow versions:

"component": "core",            "version": "3.19.0"
"component": "rpm",            "version": "3.17.5"
"component": "file",            "version": "1.10.2"
"component": "ansible",            "version": "0.13.0"
OS: Oracle Linux Server release 8.6

I have used the RPM module to host/serve repositories and i have tried using the file module. Both to no avail.
I have followed this manual for the file module for the creating of a repository and syncing with remote: https://docs.pulpproject.org/pulp_file/workflows/sync.html#create-a-repository-foo
And i have used https://docs.pulpproject.org/pulp_file/workflows/publish-host.html to publish it.

Via pulp-cli i see it has created a successful distribution that should be accessible:

[root@pulp ~]# pulp file distribution show --name $DIST_NAME
{
  "pulp_href": "/pulp/api/v3/distributions/file/file/02515f30-54ed-498d-b642-6895368ba8d1/",
  "pulp_created": "2022-06-03T07:24:13.393639Z",
  "base_path": "zriuy",
  "base_url": "https://xxx.yyy.zzz/pulp/content/zriuy/",
  "content_guard": null,
  "pulp_labels": {},
  "name": "tykvn",
  "repository": null,
  "publication": "/pulp/api/v3/publications/file/file/3d6869ad-7008-4cd3-9718-c92ed89cbdb2/"
}

The API using GET /pulp/api/v3/content/file/files/ also there are 3 ISO's present on the system.
But no matter what I do, I keep getting 404: Not Found

This setup has been deployed with suggested Ansible role using version: pulp.pulp_installer 3.19.2

@DaveDrupsteen
Copy link
Author

After downgrading the pulp_installer collection
ansible-galaxy collection install pulp.pulp_installer:==3.18.3
I can see the content again using the exact same steps as described in the docs.

@fduranti
Copy link

fduranti commented Jun 4, 2022

I had the same problem.
pulp 3.19 installed correctly and anything seems to work but the content directory.
File and RPM repository was always reporting 404.
I've downgraded to 3.18.3 and all works correctly now.

@ggainey
Copy link

ggainey commented Jun 8, 2022

See https://discourse.pulpproject.org/t/ansible-installer-content-path-prefix-handling-broken/481 - the problem is in pulp_installer's setting of CONTENT_PATH_PREFIX.

I just tested on my dev-box, and making sure that /etc/pulp/settings.py sets CONTENT_PATH_PREFIX like so:

CONTENT_PATH_PREFIX = '/pulp/content/' # <== NOTE the trailing slash

fixes the problem.

I'm moving this issue to pulp_installer, will comment same on the discourse thread!

@ggainey ggainey transferred this issue from pulp/pulpcore Jun 8, 2022
@mikedep333 mikedep333 self-assigned this Jun 8, 2022
@mikedep333
Copy link
Member

mikedep333 added a commit to mikedep333/pulp_installer that referenced this issue Jun 8, 2022
Due to an incorrect value of pulp_settings.content_path_prefix

fixes: pulp#1157
mikedep333 added a commit to mikedep333/pulp_installer that referenced this issue Jun 9, 2022
Due to an incorrect value of pulp_settings.content_path_prefix

fixes: pulp#1157
mikedep333 added a commit that referenced this issue Jun 15, 2022
Due to an incorrect value of pulp_settings.content_path_prefix

fixes: #1157
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants