Skip to content

Exception forbidden checksum 'sha1' #780

@vkukk

Description

@vkukk

Version
3.95.2

Describe the bug
A clear and concise description of what the bug is.

I have a Pod running multiprocess Pulp on GKE Autopilot.

/etc/pulp/settings.py contains ALLOWED_CONTENT_CHECKSUMS = ["sha1", "sha224", "sha256", "sha384", "sha512"]

Each time the container starts, it logs error:

Calling /etc/init/postgres-prepare
2025-12-15 14:44:18.610 UTC [124] LOG:  redirecting log output to logging collector process
2025-12-15 14:44:18.610 UTC [124] HINT:  Future log output will appear in directory "log".
ALTER DATABASE
[oneshot] postgres-prepare: running Pulp migrations
[oneshot] certs: finished adding webserver certificate to the certificate store
s6-rc: info: service certs successfully started
Operations to perform:
  Apply all migrations: ansible, auth, certguard, container, contenttypes, core, deb, file, gem, maven, npm, ostree, python, rpm, sessions
Running migrations:
  Applying file.0018_alter_filecontent_options... OK
Access policy for content/file/files updated.
s6-rc: info: service postgres-prepare successfully started
s6-rc: info: service add-workers: starting
s6-rc: info: service pulpcore-worker@1: starting
s6-rc: info: service pulpcore-content: starting
s6-rc: info: service pulpcore-api: starting
s6-rc: info: service pulpcore-worker@1 successfully started
Calling /etc/init/add-workers
Checking for database migrations
Checking for database migrations
s6-rc: info: service pulpcore-api successfully started
Checking for database migrations
s6-rc: info: service pulpcore-content successfully started
s6-rc: info: service nginx: starting
Calling /etc/init/nginx
s6-rc: info: service nginx successfully started
[oneshot] add-workers: Adding workers 2 through 4
[oneshot] add-workers: Workers will be added shortly after the boot finishes
s6-rc: info: service add-workers successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Calling /etc/init/postgres-init
Calling /etc/init/db-fields-key-create
Calling /etc/init/fix-pulp-perms
[oneshot] db-fields-key-create: creating database fields key
Checking /var/lib/pulp/media permissions
Calling /etc/init/certs
Checking /var/lib/pulp/scripts permissions
Checking /var/lib/pulp/tmp permissions
Calling /etc/init/postgres-prepare
2025-12-15 14:44:29.421 UTC [345] LOG:  redirecting log output to logging collector process
2025-12-15 14:44:29.421 UTC [345] HINT:  Future log output will appear in directory "log".
ALTER DATABASE
[oneshot] postgres-prepare: running Pulp migrations
Traceback (most recent call last):
  File "/usr/local/bin/pulpcore-manager", line 8, in <module>
    sys.exit(manage())
             ^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/manage.py", line 11, in manage
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/local/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/__init__.py", line 34, in <module>
    from .exporter import (
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/exporter.py", line 11, in <module>
    from pulpcore.app.models.repository import Repository
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/repository.py", line 33, in <module>
    from pulpcore.cache import Cache
  File "/usr/local/lib/python3.11/site-packages/pulpcore/cache/__init__.py", line 1, in <module>
    from .cache import (
  File "/usr/local/lib/python3.11/site-packages/pulpcore/cache/cache.py", line 17, in <module>
    from pulpcore.app.settings import settings
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/settings.py", line 631, in <module>
    raise e
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/settings.py", line 604, in <module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: There have been identified artifacts with forbidden checksum 'sha1'. Run 'pulpcore-manager handle-artifact-checksums' first to unset forbidden checksums.
Traceback (most recent call last):
  File "/usr/local/bin/pulpcore-manager", line 8, in <module>
    sys.exit(manage())
             ^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/manage.py", line 11, in manage
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/local/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/__init__.py", line 34, in <module>
    from .exporter import (
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/exporter.py", line 11, in <module>
    from pulpcore.app.models.repository import Repository
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/models/repository.py", line 33, in <module>
    from pulpcore.cache import Cache
  File "/usr/local/lib/python3.11/site-packages/pulpcore/cache/__init__.py", line 1, in <module>
    from .cache import (
  File "/usr/local/lib/python3.11/site-packages/pulpcore/cache/cache.py", line 17, in <module>
    from pulpcore.app.settings import settings
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/settings.py", line 631, in <module>
    raise e
  File "/usr/local/lib/python3.11/site-packages/pulpcore/app/settings.py", line 604, in <module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: There have been identified artifacts with forbidden checksum 'sha1'. Run 'pulpcore-manager handle-artifact-checksums' first to unset forbidden checksums.
Database migrated!
ready
Database migrated!
ready
Database migrated!
ready
Operations to perform:
  Apply all migrations: ansible, auth, certguard, container, contenttypes, core, deb, file, gem, maven, npm, ostree, python, rpm, sessions
Running migrations:
  No migrations to apply.

It proceeds to boot up and functionality does not seem to be affected.
When I manually run either 'pulpcore-manager handle-artifact-checksums' directly on the full script /etc/init/postgres-prepare, no error is displayed.

# pulpcore-manager handle-artifact-checksums --report
Found 0 on-demand content units with forbidden checksums.
Found 0 downloaded content units with forbidden or missing checksums.

# /etc/init/postgres-prepare 
ALTER DATABASE
[oneshot] postgres-prepare: running Pulp migrations
Operations to perform:
  Apply all migrations: ansible, auth, certguard, container, contenttypes, core, deb, file, gem, maven, npm, ostree, python, rpm, sessions
Running migrations:
  No migrations to apply.

To Reproduce
Delete the statefultsets pod and check the logs of Pulp multi process image. Each time it throws error.

Expected behavior
Since sha1 is allowed in config, the bootup script must succeed without throwing error.

Additional context
It is very annoying because it creates alert noise from log parsing monitors and makes me doubt if indeed actually my Pulp service is running properly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions