Project

Profile

Help

Issue #7493

closed

Installer: remove auth migration task

Added by chouseknecht over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Currently the installer runs auth migrations first, then runs all other migrations. This is causing the following error in galaxy_ng:

TASK [pulp_database_config : Run database auth migrations] *********************
fatal: [pulp3-source-fedora31]: FAILED! => {
    "changed": true,
    "cmd": [
        "/usr/local/lib/pulp/bin/django-admin",
        "migrate",
        "auth",
        "--no-input"
    ],
    "delta": "0:00:04.244303",
    "end": "2020-09-10 20:49:05.957899",
    "rc": 1,
    "start": "2020-09-10 20:49:01.713596"
}

STDOUT:

Operations to perform:
  Apply all migrations: auth
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK


STDERR:

Traceback (most recent call last):
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "galaxy_user" does not exist
LINE 1: ...er"."is_active", "galaxy_user"."date_joined" FROM "galaxy_us...

Django's migration system should get it right (i.e., run things in the correct order) no matter what. If it isn't, it's because a dependency isn't in place correctly in the code that declares migration dependencies.

According to bmbouter, "Early on in pulp3 there was a requirement for it to be run in two-steps because we weren't commiting migrations to git. Like years ago at this point. I think this is a vestige from that."


Related issues

Related to Pulp - Issue #7499: pulp_installer is unpredictable about when it resets the admin passwordCLOSED - CURRENTRELEASEActions

Also available in: Atom PDF