Hide Forgot
Description of problem: Pulp does not allow authentication with mongodb using username with an empty password if specified in server.conf and shows a traceback, though mongo allows access to pulp_database with an empty pass Might be connected to BZ 1182335 Version-Release number of selected component (if applicable): >> rpm -qa pulp-server pulp-server-2.6.0-0.7.beta.fc20.noarch Steps to Reproduce: >> mongo MongoDB shell version: 2.4.6 connecting to: test > use pulp_database switched to db pulp_database > db.changeUserPassword("gena", "") > exit bye >> mongo pulp_database -u gena MongoDB shell version: 2.4.6 connecting to: pulp_database > db.repos.find() { "_id" : ObjectId("54b7c4cb99cca86045dd3fcb"), "_ns" : "repos", "content_unit_counts" : { "erratum" : 4, "package_category" : 1, "package_group" : 2 }, "description" : null, "display_name" : "zoo_repo", "id" : "zoo_repo", "last_unit_added" : ISODate("2015-01-15T13:47:14.329Z"), "last_unit_removed" : null, "notes" : { "_repo-type" : "rpm-repo" }, "scratchpad" : { "checksum_type" : "sha256" } } > exit bye >> vi /etc/pulp/server.conf username: gena password: >> for s in {qpidd,pulp_celerybeat,pulp_resource_manager,pulp_workers,httpd}; do sudo systemctl restart $s; done; >> pulp-admin login -u admin -p admin There was an internal server error while trying to access the Pulp application. One possible cause is that the database needs to be migrated to the latest version. If this is the case, run pulp-manage-db and restart the services. More information may be found in Apache's log. >> sudo -u apache pulp-manage-db Database initialization failed: The server config specified username/password authentication but is missing either the username or the password The server config specified username/password authentication but is missing either the username or the password Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 124, in main connection.initialize(max_timeout=1) File "/usr/lib/python2.7/site-packages/pulp/server/db/connection.py", line 92, in initialize raise Exception(_("The server config specified username/password authentication but " Exception: The server config specified username/password authentication but is missing either the username or the password >> mongo MongoDB shell version: 2.4.6 connecting to: test > use pulp_database switched to db pulp_database > db.changeUserPassword("gena", "genka") > exit bye >> vi /etc/pulp/server.conf username: gena password: genka >> for s in {qpidd,pulp_celerybeat,pulp_resource_manager,pulp_workers,httpd}; do sudo systemctl restart $s; done; >> pulp-admin rpm repo list +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: zoo_repo Display Name: zoo_repo Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2
I think this bug is as simple as adjusting this section [0] of code so that if username is not the default (empty string) then both username and password will be included as connection_kwargs. The default password is an empty string so if the user does not adjust the password of server.conf [database] section then an empty password should be allowed. [0]: https://github.com/pulp/pulp/blob/master/server/pulp/server/db/connection.py#L87-L93
Moved to https://pulp.plan.io/issues/708
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.