Description of problem: pulp-manage-db fails on migration 0009_qpid_queues, requires: qpid-tools. The migration uses qpidtoollibs that is provided by the qpid-tools rpm. Either pulp needs to have a Requires: qpid-tools. Or, the migration needs to be optional based on whether qpid-tools is installed. The danger with doing that is users could be using qpid but not have qpid-tools installed. In this case a necessary migration will be skipped. Version-Release number of selected component (if applicable): 2.4.0-0-7.beta How reproducible: When qpid-tools is not installed. Steps to Reproduce: 1. Make sure qpid-tools is not installed 2. Install pulp. 3. Run pulp-manage-db Actual results: [root@cloud-qe-13 ~]# sudo -u apache pulp-manage-db Loading content types. /usr/lib/python2.6/site-packages/pulp/server/db/connection.py:135: DeprecationWarning: The safe parameter is deprecated. Please use write concern options instead. return method(*args, **kwargs) Content types loaded. Beginning database migrations. No module named qpidtoollibs Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 108, in main _auto_manage_db(options) File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 140, in _auto_manage_db migrate_database(options) File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 58, in migrate_database migration_packages = models.get_migration_packages() File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 304, in get_migration_packages migration_packages = [MigrationPackage(pulp.server.db.migrations)] File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 139, in __init__ available_versions = self.available_versions File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 173, in available_versions migrations = self.migrations File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 202, in migrations migration_modules.append(MigrationModule(module_name)) File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 56, in __init__ self._module = _import_all_the_way(python_module_name) File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/models.py", line 325, in _import_all_the_way module = __import__(module_string) File "/usr/lib/python2.6/site-packages/pulp/server/db/migrations/0009_qpid_queues.py", line 14, in <module> from qpidtoollibs import BrokerAgent ImportError: No module named qpidtoollibs Expected results: Additional info:
(In reply to Jeff Ortel from comment #0) > The danger with > doing that is users could be using qpid but not have qpid-tools installed. > In this case a necessary migration will be skipped. I think we can avoid this danger if we use the broker setting to determine whether the migration is required or not. If their broker string starts with qpid://, then the migration should fail if qpid-tools is not installed (with a useful error message). Otherwise, it's not necessary. What do you think?
Potential fix with: https://fedorahosted.org/pulp/wiki/BugReviewProcess
The link is wrong above; here is the actual potential fix: https://github.com/pulp/pulp/pull/885
PR was merged to master.
verified [root@dhcp129-52 ~]# sudo -u apache pulp-manage-db Loading content types. Content types loaded. Ensuring the admin role and user are in place. Admin role and user are in place. Beginning database migrations. Migration package pulp.server.db.migrations is up to date at version 9 Migration package pulp_puppet.plugins.migrations is up to date at version 2 Migration package pulp_rpm.plugins.migrations is up to date at version 15 Database migrations complete. [root@dhcp129-52 ~]# [root@dhcp129-52 ~]# rpm -qa |grep qpid-tools [root@dhcp129-52 ~]#
This has been fixed in Pulp 2.4.0-1.