mongodb_user.present returns successfully on error #53377
Labels
Bug
broken, incorrect, or confusing behavior
Confirmed
Salt engineer has confirmed bug/feature - often including a MCVE
severity-medium
3rd level, incorrect or bad functionality, confusing and lacks a work around
State-Module
Milestone
Description of Issue
When trying to add a user using mongodb.user_present on a Mongo 4.0.7 server, even though /var/log/salt/minion errs with: "Creating database admin failed with error: Use of SCRAM-SHA-256 requires undigested passwords".
As far as I understand, the master should be informed about the error (and all other errors that are probably hidden) and return a failed state.
Using the latest version of pymongo (using pip) solves the problem of the user not being created, but this, obviously, doesn't solve the non failed state problem.
Setup
Minion installed in debian-9 on a SmartOS lx zone (version 20180404), python version 2.7.13-2, salt-minion version 2019.2.0 (Fluorine). salt-master version 2018.3.1 (Oxygen, running on SmartOS zone)
Steps to Reproduce Issue
run the following state on the minion:
output on master:
logs in /var/log/salt/minion:
2019-06-05 12:09:17,812 [salt.loaded.int.module.mongodb:294 ][ERROR ][83009] Creating database admin failed with error: Use of SCRAM-SHA-256 requires undigested passwords
Versions Report
minion:
master:
If a user connects to the mongo server using the command-line mongo client, they can verify that the user has not been created in the admin database.
The text was updated successfully, but these errors were encountered: