Project

Profile

Help

Issue #9062

pulp python 3.4 db migration fails

Added by rverdile 2 months ago. Updated 2 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

After installing pulp-python 3.4 with pip3 install pulp-python==3.4 then running migration with sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' /usr/bin/pulpcore-manager migrate

migration "0005_pythonpackagecontent_sha256.py" fails

Get this error:

Traceback (most recent call last):
  File "/usr/bin/pulpcore-manager", line 11, in <module>
    load_entry_point('pulpcore==3.14.1', 'console_scripts', 'pulpcore-manager')()
  File "/usr/lib/python3.6/site-packages/pulpcore/app/manage.py", line 11, in manage
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 234, in handle
    fake_initial=fake_initial,
  File "/usr/lib/python3.6/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/lib/python3.6/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/lib/python3.6/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/lib/python3.6/site-packages/django/db/migrations/migration.py", line 124, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/lib/python3.6/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.6/site-packages/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py", line 18, in add_sha256_to_current_models
    python_package.sha256 = artifact.sha256
AttributeError: 'NoneType' object has no attribute 'sha256'

History

#1 Updated by gerrod 2 months ago

Can you provide more details about the system you are installing pulp_python onto? What is the pulpcore version, did you have pulp_python installed at a previous time, what plugins do you currently have installed?

#2 Updated by rverdile 2 months ago

gerrod wrote:

Can you provide more details about the system you are installing pulp_python onto? What is the pulpcore version, did you have pulp_python installed at a previous time, what plugins do you currently have installed?

The system is a vagrant box running Centos7 I'm using to work on Katello. Let me know what details you might need.

Pulpcore version 3.14.1

Previously I had pulp_python 3.2 installed.

The pulp plugins had installed were

  • pulp-ansible (0.8.0)
  • pulp-certguard (1.4.0)
  • pulp-cli (0.10.1)
  • pulp-container (2.7.0)
  • pulp-deb (2.13.0)
  • pulp-file (1.8.1)
  • pulp-rpm (3.13.3)

I got pulp_python 3.4 installed correctly after resetting my database through Foreman, which also ran through the migrations successfully. It may have just needed the reset, not sure.

#3 Updated by gerrod 2 months ago

  • Status changed from NEW to CLOSED - WORKSFORME

rverdile wrote:

I got pulp_python 3.4 installed correctly after resetting my database through Foreman, which also ran through the migrations successfully. It may have just needed the reset, not sure.

Interesting, if you run into this issue again, file it at https://github.com/pulp/pulp_python/issues. We are slowly moving our plugins to GitHub issues and pulp_python is already there.

Please register to edit this issue

Also available in: Atom PDF