core.0054_add_public_key fails in kubenetes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
Version
pulpcore 3.21.0
Describe the bug
I have built an instance of pulp on podman without issue. Now I move to kuberntes I am getting a failure in core.0054_add_public_key...Operations. I can see table spaces veing created on postgres.
Applying core.0053_remote_headers... OK
Traceback (most recent call last):
File "/usr/local/bin/pulpcore-manager", line 8, in
sys.exit(manage())
File "/usr/local/lib/python3.9/site-packages/pulpcore/app/manage.py", line 11, in manage
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
post_migrate_state = executor.migrate(
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/migration.py", line 126, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/usr/local/lib/python3.9/site-packages/pulpcore/app/migrations/0054_add_public_key.py", line 60, in migrate_public_key_values
gpg = gnupg.GPG()
File "/usr/local/lib/python3.9/site-packages/gnupg.py", line 947, in init
self._collect_output(p, result, stdin=p.stdin)
File "/usr/local/lib/python3.9/site-packages/gnupg.py", line 1072, in _collect_output
rr.start()
File "/usr/lib64/python3.9/threading.py", line 892, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
- /usr/local/bin/pulpcore-manager migrate auth --noinput
Applying core.0054_add_public_key...Operations to perform:
Apply all migrations: auth
Running migrations:
To Reproduce
Always when I migrate runs
Expected behavior
Core migrations to complete.
Additional context
Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Kubernetes migration failure using the reported pulpcore 3.21.0 setup and the pulpcore-manager migrate command. Inspect pulpcore/app/migrations/0054_add_public_key.py, especially migrate_public_key_values and its gnupg.GPG() call. Done means the core migrations complete successfully in the reported deployment environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100