Problem: I’m trying to deploy pulp-oci-images using the Compose method on an EC2 instance with an external DB running on RDS and an S3 bucket as the storage backend, but after running docker-compose up, the migration service fails to start, and checking its logs, I can see the error message below:
...
class FileContent(Content):
File "/usr/local/lib/python3.9/site-packages/pulpcore/app/models/base.py", line 94, in __new__
new_class = super().__new__(cls, name, bases, attrs, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 134, in __new__
raise RuntimeError(
RuntimeError: Model class pulp_file.app.models.FileContent doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Expected outcome:
Migration service should complete and pulp should run
Pulpcore version:
3.81
Pulp plugins installed and their versions:
Not sure, as pulp has not started, but the ones installed in the pulp/pulp-minimal:3.81 image
Operating system - distribution and version:
Running pulp/pulp-minimal:3.81 image on Ubuntu 24.04.2 LTS
Other relevant data:
docker-compose.yml:
services:
migration_service:
image: pulp/pulp-minimal:3.81
command: pulpcore-manager migrate --noinput
volumes:
- "./settings.py:/etc/pulp/settings.py"
- "./certs:/etc/pulp/certs"
signing_key_service:
image: pulp/pulp-minimal:3.81
command: sh -c "add_signing_service.sh"
depends_on:
migration_service:
condition: service_completed_successfully
volumes:
- "./settings.py:/etc/pulp/settings.py"
- "./certs:/etc/pulp/certs"
pulp_web:
image: "pulp/pulp-web:3.81"
command: ["/usr/bin/nginx.sh"]
depends_on:
pulp_api:
condition: service_healthy
pulp_content:
condition: service_healthy
ports:
- "8080:8080"
hostname: pulp
user: root
volumes:
- "./nginx.sh:/usr/bin/nginx.sh"
- "./nginx.conf.template:/etc/nginx/nginx.conf.template"
restart: always
pulp_api:
image: pulp/pulp-minimal:3.81
deploy:
replicas: 2
command: ["pulp-api"]
depends_on:
migration_service:
condition: service_completed_successfully
signing_key_service:
condition: service_completed_successfully
hostname: pulp-api
user: pulp
volumes:
- "./settings.py:/etc/pulp/settings.py"
- "./certs:/etc/pulp/certs"
restart: always
healthcheck:
test: readyz.py /pulp/api/v3/status/
interval: 10s
timeout: 5s
retries: 5
pulp_content:
image: pulp/pulp-minimal:3.81
deploy:
replicas: 2
command: ["pulp-content"]
depends_on:
migration_service:
condition: service_completed_successfully
hostname: pulp-content
user: pulp
volumes:
- "./settings.py:/etc/pulp/settings.py"
- "./certs:/etc/pulp/certs"
restart: always
healthcheck:
test: readyz.py /pulp/content/
interval: 10s
timeout: 5s
retries: 5
pulp_worker:
image: pulp/pulp-minimal:3.81
deploy:
replicas: 2
command: ["pulp-worker"]
depends_on:
migration_service:
condition: service_completed_successfully
user: pulp
volumes:
- "./settings.py:/etc/pulp/settings.py"
- "./certs:/etc/pulp/certs"
restart: always
settings.py:
ENABLED_PLUGINS=["pulp_container", "pulp_deb"]
TOKEN_AUTH_DISABLED=True
MEDIA_ROOT=""
REDIRECT_TO_OBJECT_STORAGE=False
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": {
"bucket_name": "${s3_bucket}",
"region_name": "${s3_region}",
},
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"HOST": "${db_hostname}",
"NAME": "${db_name}",
"USER": "${db_username}",
"PASSWORD": "${db_password}",
"PORT": "5432",
"CONN_MAX_AGE": 0,
"OPTIONS": {
"sslmode": "prefer"
}
}
}