Project

Profile

Help

Issue #8238

0030_collectionversion_requires_ansible.py migration throws FileNotFoundError

Added by alikins 3 months ago. Updated 3 months ago.

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

Description

After updating galaxy_ng to use git versions of pulpcore, pulp_ansible, pulp_container I:

  1. Ran ./compose run api manage handle-artifact-checksums. That seemed to run without errors.
  2. ./compose up which brought up the galaxy_ng servers but showed needed migrations.
  3. In another term, ran ./compose run api manage migrate

Got the Error:

Operations to perform:
  Apply all migrations: admin, ansible, auth, authtoken, container, contenttypes, core, galaxy, guardian, sessions
Running migrations:
  Applying ansible.0027_tag_length... OK
  Applying ansible.0028_collectionversion_namespace_length... OK
  Applying ansible.0029_manifest_and_files_json_fields... OK
  Applying ansible.0030_collectionversion_requires_ansible...Traceback (most recent call last):
  File "/venv/bin/django-admin", line 8, in <module>
    sys.exit(execute_from_command_line())
  File "/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/venv/lib64/python3.6/site-packages/django/core/management/commands/migrate.py", line 234, in handle
    fake_initial=fake_initial,
  File "/venv/lib64/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 "/venv/lib64/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 "/venv/lib64/python3.6/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/venv/lib64/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 "/venv/lib64/python3.6/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/src/pulp_ansible/pulp_ansible/app/migrations/0030_collectionversion_requires_ansible.py", line 19, in set_requires_ansible_and_manifest_and_files_json
    with artifact.file.open() as artifact_file, tarfile.open(fileobj=artifact_file, mode="r") as tar:
  File "/venv/lib64/python3.6/site-packages/django/db/models/fields/files.py", line 74, in open
    self.file = self.storage.open(self.name, mode)
  File "/venv/lib64/python3.6/site-packages/django/core/files/storage.py", line 36, in open
    return self._open(name, mode)
  File "/venv/lib64/python3.6/site-packages/django/core/files/storage.py", line 224, in _open
    return File(open(self.path(name), mode))
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pulp/media/artifact/d4/07b75923940bb9a477be4fe019a9ae1ec8b85a998f218aa5913a455488a202'
ERROR: 1
pip-freeze-v-v.txt (3.18 KB) pip-freeze-v-v.txt pip freeze -v -v -v output from container alikins, 02/10/2021 06:21 PM
freeze.out (2.51 KB) freeze.out ignore 'pip-freeze-v-v.txt', this is the pip freeze from the container alikins, 02/10/2021 06:23 PM
media_root_diffsettings.diff (15 KB) media_root_diffsettings.diff pulp-manager diffsettings --output unified output from api container alikins, 02/10/2021 06:51 PM

History

#1 Updated by alikins 3 months ago

#2 Updated by alikins 3 months ago

Note on the container, the file doesn't exist. But the version without the /media/ does exist:

[galaxy@addad5122ca6 /]$ ls /var/lib/pulp/media/artifact/d4/07b75923940bb9a477be4fe019a9ae1ec8b85a998f218aa5913a455488a202
ls: cannot access '/var/lib/pulp/media/artifact/d4/07b75923940bb9a477be4fe019a9ae1ec8b85a998f218aa5913a455488a202': No such file or directory

[galaxy@addad5122ca6 /]$ ls /var/lib/pulp
artifact  assets  tmp

[galaxy@addad5122ca6 /]$ ls /var/lib/pulp/media
ls: cannot access '/var/lib/pulp/media': No such file or directory

[galaxy@addad5122ca6 /]$ ls /var/lib/pulp/artifact/d
d0/ d1/ d2/ d4/ d5/ d6/ d7/ d8/ d9/ da/ db/ dc/ dd/ de/ df/ 

[galaxy@addad5122ca6 /]$ ls /var/lib/pulp/artifact/d4/07b75923940bb9a477be4fe019a9ae1ec8b85a998f218aa5913a455488a202 
/var/lib/pulp/artifact/d4/07b75923940bb9a477be4fe019a9ae1ec8b85a998f218aa5913a455488a202

#4 Updated by alikins 3 months ago

Settings as deployed attached, highlights:

(galaxy_ng_2) [newswoop:F31:galaxy_ng (rev_pulp_container %)]$ cat media_root_diffsettings.diff | grep /var/lib/
+ DEPLOY_ROOT = PosixPath('/var/lib/pulp')
+ FILE_UPLOAD_TEMP_DIR = PosixPath('/var/lib/pulp/tmp')
+ MEDIA_ROOT = '/var/lib/pulp/media'
+ STATIC_ROOT = PosixPath('/var/lib/pulp/assets')
+ WORKING_DIRECTORY = PosixPath('/var/lib/pulp/tmp')

#5 Updated by bmbouter 3 months ago

With pulpcore 3.10 the artifact storage is moved to /media/, e.g. this the top line on these release notes: https://docs.pulpproject.org/pulpcore/changes.html#features

Am I understanding correctly that you have a system on < pulpcore 3.10 and it's loaded with data and then you upgrade to 3.10? If that's right are you upgrading with the installer? If you are not then you'll have to handle moving the data in your environment at upgrade time (like the installer does).

We want to get this resolved for you, so let us know how we can help.

#6 Updated by bmbouter 3 months ago

  • Status changed from NEW to CLOSED - NOTABUG

I believe this was environmental so I'm closing as NOTABUG. Please comment so we can reopen or message us to reopen if its not.

Please register to edit this issue

Also available in: Atom PDF