diff --git a/CHANGES/5510.bugfix b/CHANGES/5510.bugfix new file mode 100644 index 0000000000..947e7fd998 --- /dev/null +++ b/CHANGES/5510.bugfix @@ -0,0 +1 @@ +Fixed openapi command where plugins relied on CONTENT_ORIGIN to be set. diff --git a/pulpcore/app/checks.py b/pulpcore/app/checks.py index b5c89e21c2..0cd4a0478b 100644 --- a/pulpcore/app/checks.py +++ b/pulpcore/app/checks.py @@ -7,7 +7,7 @@ @register(deploy=True) def content_origin_check(app_configs, **kwargs): messages = [] - if not getattr(settings, "CONTENT_ORIGIN", None): + if getattr(settings, "CONTENT_ORIGIN", "UNREACHABLE") == "UNREACHABLE": messages.append( CheckError( "CONTENT_ORIGIN is a required setting but it was not configured. This may be " diff --git a/pulpcore/app/settings.py b/pulpcore/app/settings.py index 6de718191f..72739aa72b 100644 --- a/pulpcore/app/settings.py +++ b/pulpcore/app/settings.py @@ -240,6 +240,8 @@ DRF_ACCESS_POLICY = {"reusable_conditions": ["pulpcore.app.global_access_conditions"]} +# This is a sentinal value for deploy checks, since we don't want to set a default one. +CONTENT_ORIGIN = "UNREACHABLE" CONTENT_PATH_PREFIX = "/pulp/content/" API_APP_TTL = 120 # The heartbeat is called from gunicorn notify (defaulting to 45 sec).