Project

Profile

Help

Issue #501

Pulp should fail to start if the Mongo Connection doesn't meet the minimum version requirement

Added by rbarlow over 6 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.4.0
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
We have a current Mongo requirement of 2.4.0 or greater. Nothing in Pulp currently validates that the Mongo version is 2.4.0. It would be good for us to check the Mongo version upon connecting, raising a meaningful error in the logs if the version doesn't meet our requirements.

Version-Release number of selected component (if applicable):
2.4.0-1

How reproducible:
Very

Steps to Reproduce:
1. Configure Pulp to use a Mongo server < 2.4.0
2. Start Pulp

Actual results:
Observe that most operations will work, but when you hit one that doesn't, it's a doozy!

Expected results:
Pulp should refuse to connect to a Mongo that doesn't meet our requirements.

Additional info:
Here is how to check the Mongo version:

In [5]: pymongo.Connection('limeade.usersys.redhat.com').server_info()['versionArray']
Out[5]: [2, 4, 6, 0]

There is also a 'version' key that looks like '2.4.6'.

+ This bug was cloned from Bugzilla Bug #1133953 +

History

#1 Updated by bcourt over 6 years ago

The pulp-manage-db migration script should also check the mongo version.

+ This comment was cloned from Bugzilla #1133953 comment 1 +

#2 Updated by cduryee over 6 years ago

Is it possible to check that the mongo connection has correct privileges on pulp_database during startup? This would also be helpful, especially when connecting as non-admin users.

+ This comment was cloned from Bugzilla #1133953 comment 2 +

#4 Updated by cduryee over 6 years ago

merged to 2.5-dev and master

+ This comment was cloned from Bugzilla #1133953 comment 4 +

#5 Updated by cduryee over 6 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1133953 comment 5 +

#6 Updated by pthomas@redhat.com over 6 years ago

verified
[root@ibm-x3550m3-07 ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el6.noarch
[root@ibm-x3550m3-07 ~]#

Mongo version is getting checked while running pulp-manage-db

[root@ibm-x3550m3-07 ~]# sudo -u apache pulp-manage-db
Mongo database for connection is version 2.4.12
Loading content types.
Loading type descriptors [iso_support.json, nodes.json, rpm_support.json]
Parsing type descriptors
Validating type descriptor syntactic integrity
Validating type descriptor semantic integrity
Updating the database with types [iso, repository, node, distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file]
Found the following type definitions that were not present in the update collection [puppet_module]
/usr/lib/python2.6/site-packages/pulp/server/db/connection.py:162: DeprecationWarning: The safe parameter is deprecated. Please use write concern options instead.
return method(*args, **kwargs)
Content types loaded.
Ensuring the admin role and user are in place.
Mongo database for connection is version 2.4.12
Admin role and user are in place.
Beginning database migrations.
Migration package pulp.server.db.migrations is up to date at version 12
Migration package pulp_rpm.plugins.migrations is up to date at version 18
Database migrations complete.

+ This comment was cloned from Bugzilla #1133953 comment 6 +

#7 Updated by bmbouter over 6 years ago

  • Severity changed from High to 3. High

#8 Updated by rbarlow over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#11 Updated by bmbouter over 1 year ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF