Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

mongodb user / password not enforced #199

@rgarrigue

Description

@rgarrigue

Hi

I tried to use db_user and db_password parameter, which failed. In /etc/mongod.conf there's noauth=true. And I'ld expect something like thios somewhere in the module

mongodb::db { $db_database:
user => $db_username,
password => $db_password,
}

Here's my log

==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Attempting to connect to localhost:27017
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Attempting to connect to localhost:27017
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Write concern for Mongo connection: {}
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Database initialization failed: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Traceback (most recent call last):
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 198, in main
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:     connection.initialize(max_timeout=1)
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:   File "/usr/lib/python2.7/site-packages/pulp/server/db/connection.py", line 157, in initialize
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:     raise RuntimeError(msg)
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: RuntimeError: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Error: pulp-manage-db && touch /var/lib/pulp/init.flag returned 70 instead of one of [0]
==> test.vagrant.local: Error: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: change from notrun to 0 failed: pulp-manage-db && touch /var/lib/pulp/init.flag returned 70 instead of one of [0]
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Attempting to connect to localhost:27017
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Attempting to connect to localhost:27017
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Write concern for Mongo connection: {}
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Database initialization failed: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: Traceback (most recent call last):
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 198, in main
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:     connection.initialize(max_timeout=1)
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:   File "/usr/lib/python2.7/site-packages/pulp/server/db/connection.py", line 157, in initialize
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns:     raise RuntimeError(msg)
==> test.vagrant.local: Notice: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]/returns: RuntimeError: Authentication to MongoDB with username and password failed.
==> test.vagrant.local: Error: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]: Failed to call refresh: pulp-manage-db && touch /var/lib/pulp/init.flag returned 70 instead of one of [0]
==> test.vagrant.local: Error: /Stage[main]/Pulp::Database/Exec[migrate_pulp_db]: pulp-manage-db && touch /var/lib/pulp/init.flag returned 70 instead of one of [0]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions