Skip to content

Replica set check requires "clusterManager" database role #478

@brent-hoover

Description

@brent-hoover

This issue was manually transferred from the reaction-identity repo because this project still uses the waitForMongo.js script cc/ @aldeed

Issue Description

Reaction Admin waits before starting up to confirm that the MongoDB replica set is available. This check fails if the database user does not have "clusterManager" database role. We should not require this role in a deployed situation, especially not in production.

Steps to Reproduce

  1. Start Reaction Admin Docker service with a MONGO_URL that specifies a user who does not have1 "clusterManager" database role.
  2. View the service logs. It will hang for 2 minutes waiting for replica set, and then show a permission error.

Solution

This check was added primarily for development environments, where we are creating a replica set on the fly and Reaction Admin (Meteor) will throw an error if it isn't ready yet (race condition).

We can wrap the check in an environment variable that we set by default in development but would need to be manually set in a deployed environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions