3.17 Katello , Puppet 6.14 and foreman 2.2 | 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]

I update puppet to puppet

puppet-agent-6.19.1-1.el7.x86_64 puppetserver-6.14.1-1.el7.noarch

[ERROR 2020-11-05T14:33:43 main] Errors encountered during run:

[ERROR 2020-11-05T14:33:43 main] foreman-maintain packages is-locked --assumeyes failed! Check the output for error!

[ERROR 2020-11-05T14:33:43 main] ‘pulpcore-manager migrate --noinput’ returned 1 instead of one of [0]

[ERROR 2020-11-05T14:33:43 main] /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]

I believe if you change repos or delete existing repos below error come but not sure

foreman-maintain packages is-locked --assumeyes failed! Check the output for error!

can you try running this as root:

PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager migrate --noinput

and see if you get any errors?

1 Like

I run foreman-installer again and it fixed but sure what was the issue but I del repo in yum.repos which I revert.

PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager migrate --noinput

System check identified some issues:

WARNINGS:

?: (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').

Operations to perform:

Apply all migrations: admin, auth, certguard, container, contenttypes, core, file, guardian, pulp_2to3_migration, rpm, sessions

Running migrations:

No migrations to apply.

Yep that looks fine. I guess the problem is resolved?

1 Like

yes foreman-maintain service restart

I also ran into this error upgrading from 3.16 to 3.17. This post pointed me in the right direction… But for me I found that the ownership of /etc/pulp/settings.py was root, 0640. Once I changed it to pulp as owner, the foreman-install completed.

chown pulp /etc/pulp/settings.py
foreman-installer
2 Likes

That is not recommended. The ownership should be root while the group should be pulp. If that doesn’t work, it’s a bug. In fact, the installer should reset those permissions before it even runs migrations.

1 Like