Help with installing pulp-python plugin

Hi, I am trying to create a pulp repository to support hosting python packages. As per the documentation I am following, we need to have pulp-python plugin. I installed it from PyPi. But when I do pulp status the “domain_compatible”: false for pulp-python.
FYI when I ran the command to create repo:

[pulp@pulpcore ~]$ pulp python repository create --name foo
Error:
<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>

Pulp Status output

[pulp@pulpcore ~]$ pulp status
{
  "versions": [
    {
      "component": "core",
      "version": "3.31.0",
      "package": "pulpcore",
      "domain_compatible": true
    },
    {
      "component": "certguard",
      "version": "1.6.5",
      "package": "pulp-certguard",
      "domain_compatible": true
    },
    {
      "component": "container",
      "version": "2.16.0",
      "package": "pulp-container",
      "domain_compatible": false
    },
    {
      "component": "file",
      "version": "1.14.4",
      "package": "pulp-file",
      "domain_compatible": true
    },
    {
      "component": "python",
      "version": "3.11.0",
      "package": "pulp-python",
      "domain_compatible": false
    },
    {
      "component": "rpm",
      "version": "3.22.3",
      "package": "pulp-rpm",
      "domain_compatible": true
    }
  ],
  "online_workers": [
    {
      "pulp_href": "/pulp/api/v3/workers/018cd8d8-0b97-7d49-8777-0a5755c9cf38/",
      "pulp_created": "2024-01-05T08:58:06.617329Z",
      "name": "1814397@pulpcore.managevpc-pulpcore3.awsuse1.boomi.com",
      "last_heartbeat": "2024-01-05T11:39:05.242303Z",
      "current_task": null
    },
    {
      "pulp_href": "/pulp/api/v3/workers/018cd8d8-14e3-7e8e-aed7-5670ca1dbddb/",
      "pulp_created": "2024-01-05T08:58:08.997069Z",
      "name": "1814421@pulpcore.managevpc-pulpcore3.awsuse1.boomi.com",
      "last_heartbeat": "2024-01-05T11:39:05.400451Z",
      "current_task": null
    }
  ],
  "online_content_apps": [
    {
      "name": "1821713@pulpcore.managevpc-pulpcore3.awsuse1.boomi.com",
      "last_heartbeat": "2024-01-05T11:39:01.626510Z"
    },
    {
      "name": "1821712@pulpcore.managevpc-pulpcore3.awsuse1.boomi.com",
      "last_heartbeat": "2024-01-05T11:39:01.626546Z"
    }
  ],
  "database_connection": {
    "connected": true
  },
  "redis_connection": {
    "connected": false
  },
  "storage": {
    "total": 9223372036853727232,
    "used": 1307265990656,
    "free": 9223370729587736576
  },
  "content_settings": {
    "content_origin": "http://localhost:24816",
    "content_path_prefix": "/pulp/content/"
  },
  "domain_enabled": false
}

Pulpcore version:
pulpcore==3.31.0

Operating system - distribution and version:
RHEL 8.8

Please let me know if you need any other information and help me with what I am missing.
Thank You!

domain_compatible only affects your system if you have domain_enabled=True. Can you share how you set up your Pulp instance? I see in your provided pulp status you have more than pulp_python installed which leads me to believe you used the Pulp in One Container which includes pulp_python and all our other supported plugins already installed. Also, can you share the logs for the Pulp machine after the 500 error, podman logs $PULP_CONTAINER_NAME?

Hi @gerrod,
I am not using Pulp in One Container. I followed PyPi Installation to setup my pulp server. I am able to create a repo, remote, and distribution using the pulp rpm command. I am just guessing that, as domain_compatible is false for pulp-python, maybe that is the problem for me. Do I have to make domain_enabled=True to make it compatible? And how do you do that?

output of /var/log/messages

Jan 8 06:08:41 pulpcore gunicorn[1823904]: 127.0.0.1 - admin [08/Jan/2024:06:08:41 +0000] “POST /pulp/api/v3/repositories/python/python/ HTTP/1.1” 500 145 “-” “Pulp-CLI/0.21.2”

Thank you for your help!

No, you don’t need to set domain_enabled=True. If you can create rpm objects then it must be something specific to pulp_python. Can you paste the entirety of the 500 error message from the server logs. It should include the code path to where the error occurred along with an final error message.

In fact, you just cannot enable the domain feature as long as pulp_python is installed and declares incompatible. That is the whole point in the domain_compatible flag.

1 Like

Hi @gerrod @x9c4,
I checked the logs for error and found out that there is an attempt to insert data into a table named “python_pythonrepository,” but this table does not exist in the database.
django.db.utils.ProgrammingError: relation “python_pythonrepository” does not exist

LINE 1: INSERT INTO "python_pythonrepository" ("repository_ptr_id", ...

I was able to resolve the error by running
pulpcore-manager migrate --noinput

Now, I am able to create pulp python repository.
Thank you for your help!

3 Likes