Bug #26916
closed[nightly] running foreman-installer with --enable-ostree leaves pulp services in errored state
Description
Running `foreman-installer --enable-ostree` on katello nightly seems not tu run the necessary db migrations.
After the command finishes ("successfully"), the pulp services are left in errored state and the syslog shows:
```
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.db.migrate.models:ERROR: pulp_ostree.plugins.migrations hasn't been updated to the latest available migration.
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:CRITICAL: *****************************************************
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:CRITICAL: The Pulp server failed to start due to the following reasons:
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) The database has not been migrated to the current version. Run pulp-manage-db and restart the application.
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) Traceback (most recent call last):
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 111, in wsgi_application
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) _initialize_web_services()
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 74, in _initialize_web_services
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) migration_models.check_package_versions()
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) File "/usr/lib/python2.7/site-packages/pulp/server/db/migrate/models.py", line 314, in check_package_versions
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) raise Exception(error_message)
May 29 09:06:11 qe-foreman-rhel7 pulp: pulp.server.webservices.application:ERROR: (28998-23936) InitializationException: The database has not been migrated to the current version. Run pulp-manage-db and restart the application.
```
```
- rpm -qa pulp
python-pulp-deb-common-1.9.0-2.el7.noarch
python-pulp-rpm-common-2.19.0-2.el7.noarch
python-pulp-oid_validation-2.19.0-2.el7.noarch
pulp-server-2.19.0-2.el7.noarch
pulp-katello-1.0.3-1.el7.noarch
pulp-docker-plugins-3.2.3-2.el7.noarch
tfm-rubygem-pulp_file_client-0.0.1b10.dev.1557779852-1.el7.noarch
pulp-selinux-2.19.0-2.el7.noarch
python-pulp-ostree-common-1.4.0-1.el7.noarch
python-pulp-docker-common-3.2.3-2.el7.noarch
pulp-puppet-plugins-2.19.0-2.el7.noarch
python-pulp-common-2.19.0-2.el7.noarch
pulp-puppet-tools-2.19.0-2.el7.noarch
pulp-client-1.0-1.noarch
rubygem-smart_proxy_pulp-1.4.1-1.el7.noarch
python-pulp-repoauth-2.19.0-2.el7.noarch
python-pulp-streamer-2.19.0-2.el7.noarch
pulp-rpm-plugins-2.19.0-2.el7.noarch
tfm-rubygem-pulpcore_client-3.0.0rc2.dev.1557772471-1.el7.noarch
python-pulp-puppet-common-2.19.0-2.el7.noarch
pulp-ostree-plugins-1.4.0-1.el7.noarch
pulp-deb-plugins-1.9.0-2.el7.noarch
```
Updated by Jonathon Turel over 5 years ago
- Target version set to Katello 3.13.0
- Triaged changed from No to Yes
Updated by Justin Sherrill about 5 years ago
Hey roman, this is actually a dupe of https://projects.theforeman.org/issues/18261
Some background of that issue, partha attempted to fix it in a simple way in katello-installer here: https://github.com/Katello/katello-installer/pull/500
that was met with resistance for a more complicated but puppet-centric solution. Ewoud ended up opening up https://github.com/theforeman/puppet-pulp/pull/240 to provide a solution, but that has stagnated too.
Given that, a solution will likely not be 'quick'. If this is blocking some testing, i would recommend running with '--enable-ostree=true' at installation time (not after installation). This should install with no issue.
Do you think that is an acceptable solution? Given the difficulty of resolving the issue in an acceptable way, coupled with the age of the issue, and the fact that pulp2 and ostree will be going away, we may not see a fix for this ever.
Updated by roman plevka about 5 years ago
Justin Sherrill wrote:
Hey roman, this is actually a dupe of https://projects.theforeman.org/issues/18261
Some background of that issue, partha attempted to fix it in a simple way in katello-installer here: https://github.com/Katello/katello-installer/pull/500
that was met with resistance for a more complicated but puppet-centric solution. Ewoud ended up opening up https://github.com/theforeman/puppet-pulp/pull/240 to provide a solution, but that has stagnated too.
Given that, a solution will likely not be 'quick'. If this is blocking some testing, i would recommend running with '--enable-ostree=true' at installation time (not after installation). This should install with no issue.
Do you think that is an acceptable solution? Given the difficulty of resolving the issue in an acceptable way, coupled with the age of the issue, and the fact that pulp2 and ostree will be going away, we may not see a fix for this ever.
Hey Justin, thanks for heads up. I see what i can do. If passing the option at installation time doesn't hit the issue, it sounds as an easy workaround for us. I'll see what i can do.
Updated by Justin Sherrill about 5 years ago
- Status changed from New to Duplicate
Thanks roman, i'll go ahead and close this as duplicate, please let me know if the solution i mentioned doesn't work for you.
Updated by Justin Sherrill about 5 years ago
- Is duplicate of Bug #18261: pulp-manage-db need to run after ostree is installed added
Updated by Chris Roberts about 5 years ago
- Target version changed from Katello 3.13.0 to Katello Recycle Bin