The upgrade to Red Hat Satellite 6.12 fails with error 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
Environment
- Red Hat Satellite 6.11.3 on RHEL 8.
Issue
Upgrade of Red Hat Satellite server from the 6.11 to the 6.12 release fails with the following error:
2022-11-21 17:22:08 [NOTICE] [configure] 13000 configuration steps out of 13613 steps complete.
2022-11-21 17:22:09 [NOTICE] [configure] 13250 configuration steps out of 13614 steps complete.
2022-11-21 17:22:49 [NOTICE] [configure] 13500 configuration steps out of 13614 steps complete.
2022-11-21 17:22:55 [ERROR ] [configure] 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
2022-11-21 17:22:55 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed:
'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
2022-11-21 17:23:26 [NOTICE] [configure] System configuration has finished.
Resolution
Red Hat Engineering team is already aware of this bug and is currently tracking the issue in This content is not included.Bug 2143695 - 0077_move_remote_url_credentials.py fails on Remotes that have @ in path, not netloc
For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.
Diagnostic Steps
- In /var/log/foreman-installer/satellite.log, the following traceback can be seen:
2022-11-21 17:22:50 [DEBUG ] [configure] Pulpcore::Admin[migrate --noinput]: Starting to evaluate the resource (13515 of 13614)
2022-11-21 17:22:50 [DEBUG ] [configure] Pulpcore::Admin[migrate --noinput]: Evaluated in 0.00 seconds
2022-11-21 17:22:50 [DEBUG ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]: Starting to evaluate the resource (13516 of 13614)
2022-11-21 17:22:50 [DEBUG ] [configure] Exec[pulpcore-manager migrate --noinput](provider=posix): Executing check 'pulpcore-manager migrate --plan | grep "No planned migration operations"'
2022-11-21 17:22:50 [DEBUG ] [configure] Executing with uid=pulp: 'pulpcore-manager migrate --plan | grep "No planned migration operations"'
2022-11-21 17:22:52 [DEBUG ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless: System check identified some issues:
2022-11-21 17:22:52 [DEBUG ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless:
2022-11-21 17:22:52 [DEBUG ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless: WARNINGS:
2022-11-21 17:22:52 [DEBUG ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless: ?: (guardian.W001) Guardian authentication backend is not hooked. You can add this in settings as eg: `AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend')`.
2022-11-21 17:22:52 [DEBUG ] [configure] Exec[pulpcore-manager migrate --noinput](provider=posix): Executing 'pulpcore-manager migrate --noinput'
2022-11-21 17:22:52 [DEBUG ] [configure] Executing with uid=pulp: 'pulpcore-manager migrate --noinput'
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: System check identified some issues:
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns:
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: WARNINGS:
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: ?: (guardian.W001) Guardian authentication backend is not hooked. You can add this in settings as eg: `AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend')`.
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: Operations to perform:
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: Apply all migrations: admin, ansible, auth, certguard, container, contenttypes, core, file, guardian, rpm, sessions
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: Running migrations:
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: Applying core.0077_move_remote_url_credentials...Traceback (most recent call last):
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/bin/pulpcore-manager", line 33, in <module>
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: sys.exit(load_entry_point('pulpcore==3.18.10', 'console_scripts', 'pulpcore-manager')())
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/pulpcore/app/manage.py", line 11, in manage
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: execute_from_command_line(sys.argv)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: utility.execute()
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packa
ges/django/core/management/__init__.py", line 413, in execute
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: self.fetch_command(subcommand).run_from_argv(self.argv)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: self.execute(*args, **cmd_options)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: output = self.handle(*args, **options)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: res = handle_func(*args, **kwargs)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: post_migrate_state = executor.migrate(
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: state = migration.apply(state, schema_editor)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/db/migrations/migration.py", line 126, in apply
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: self.code(from_state.apps, schema_editor)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: File "/usr/lib/python3.9/site-packages/pulpcore/app/migrations/0077_move_remote_url_credentials.py", line 19, in move_remote_url_credentials
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: _, url_split = url.netloc.rsplit("@", maxsplit=1)
2022-11-21 17:22:55 [INFO ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: ValueError: not enough values to unpack (expected 2, got 1)
2022-11-21 17:22:55 [ERROR ] [configure] 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
2022-11-21 17:22:55 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.