Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling of replica access #1516

Merged
merged 3 commits into from
May 7, 2018
Merged

Allow disabling of replica access #1516

merged 3 commits into from
May 7, 2018

Conversation

ofek
Copy link
Contributor

@ofek ofek commented May 7, 2018

What does this PR do?

This allow customers to disable replica access by PyMongo.

Motivation

Resolves DataDog/dd-agent#2522

Copy link
Collaborator

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks 🙇 Just left a couple nits. Let me know what you think.

self._report_replica_set_state(
data['state'], clean_server_name, replset_name, self.agentConfig
)
if not instance.get('disable_replica_check'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to use the self._is_affirmative function here so we can handle the variations of Yes, yes, no, No, etc.

# Whether or not to disable reads from available replicas.
# Use this if any replicas are inaccessible to the agent.
#
# disable_replica_check: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit: Can we have this be an affirmative choice? Like enable_replica_check? Having it be an affirmative typically causes less confusion for people and may be more intuitive.

@ofek ofek merged commit e591866 into master May 7, 2018
@ofek ofek deleted the ofek/mongo-replica branch May 7, 2018 21:35
@ofek ofek added this to the 6.3 milestone May 7, 2018
@rishabh rishabh changed the title [mongo] allow disabling of replica access Allow disabling of replica access Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants