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

Implement retries for MongoDB shell commands #217

Merged
merged 2 commits into from
Aug 20, 2015
Merged

Implement retries for MongoDB shell commands #217

merged 2 commits into from
Aug 20, 2015

Conversation

iberezovskiy
Copy link
Contributor

Retries for MongoDB shell commands could be useful
in some cases:

  • unstable connectivity
  • when replica or sharding initialization is in process and
    it needs to wait some time till its end

  Retries for MongoDB shell commands could be useful
  in some cases:
  * unstable connectivity
  * when replica or sharding initialization is in process and
    you should wait some time till its end
  If authentication and replica set are enabled
  we can't create users before replica initialization
  and we also can't configure replica from any host
  except localhost.
openstack-gerrit pushed a commit to openstack-archive/fuel-library that referenced this pull request Jul 17, 2015
  Key moments:
    * Adds Support for Keyfile Key:
      upstream commit 7bbcff8024152b4ec9ce53dbba00024523707162
    * Remove useless openstack::mongo class
    * Add upstream changes for 217 pull request
      (voxpupuli/puppet-mongodb#217):
      - Implement retries for MongoDB shell commands
      - Initiate replica set creation from localhost if auth is enabled
    * Improve support for MongoDB authentication
      voxpupuli/puppet-mongodb#194
    * Fix lint errors (actually fixed in upstream)
    * Add noop tests for MongoDB parameters

  Implements: blueprint upgrade-openstack-puppet-modules

  Closes-bug: #1383639
  Related-bug: #1308990

Change-Id: I3b9cbd35bf46483782d7b7eb7ef030fd31fdd544
hunner added a commit that referenced this pull request Aug 20, 2015
Implement retries for MongoDB shell commands
@hunner hunner merged commit 6fad8b4 into voxpupuli:master Aug 20, 2015
@EmilienM
Copy link
Contributor

I know this is too late, but it would have been great to have unit & functional testing.
For history, we are investigating failures that could probably come from this PR.

https://bugs.launchpad.net/tripleo/+bug/1488531

@iberezovskiy
Copy link
Contributor Author

Emilien,

I think I can provide solution for this but it can look a little bit
revolutionary: if auth in mongo is enabled and we are going to create
replica set, we should follow these steps:

  1. Prepare configuration file with admin user credeantial on each mongo
    node.
  2. Deploy replica master. Initiate replica from it. (as result we will get
    master of replica on this node)
  3. Create admin user on master (username and password should be the same as
    in credentials file)
  4. Deploy another slaves. These slave will be able to add yourself to
    replica set using authentication creadentials for primary mongo.

what do you think?

P.S. this solution is used in Fuel deployments and I can prepare (and I
will do) the same approach for puppetlabs-mongodb.

2015-08-26 17:08 GMT+03:00 Emilien Macchi notifications@github.com:

I know this is too late, but it would have been great to have unit &
functional testing.
For history, we are investigating failures that could probably come
from this PR.

https://bugs.launchpad.net/tripleo/+bug/1488531


Reply to this email directly or view it on GitHub
#217 (comment)
.

Thanks, Ivan Berezovskiy
Ceilometer Deployment Engineer
at Mirantis https://www.mirantis.com/

slack: iberezovskiy
skype: bouhforever
phone: + 7-960-343-42-46

@dprince
Copy link
Contributor

dprince commented Aug 26, 2015

@iberezovskiy hi, the new proposal sounds interesting. What we are dealing with here is an interface breakage however and I'm inclined to say reverting the (breaking) code is the best option today.

Then perhaps we can post a new patch with the more "revolutionary" changes that you are proposing?

@iberezovskiy
Copy link
Contributor Author

Dan Prince,

If it broke something I am agree to revert this change, but please, do not
revert commit with adding retries for mongo shell commands. They are useful
in any case :)
So, you can mark like an action items on me to prepare my patch, and what I
need here is review of my improvement from you and OpenStack Puppet team.

2015-08-26 17:55 GMT+03:00 Dan Prince notifications@github.com:

@iberezovskiy https://github.com/iberezovskiy hi, the new proposal
sounds interesting. What we are dealing with here is an interface breakage
however and I'm inclined to say reverting the (breaking) code is the best
option today.

Then perhaps we can post a new patch with the more "revolutionary" changes
that you are proposing?


Reply to this email directly or view it on GitHub
#217 (comment)
.

Thanks, Ivan Berezovskiy
Ceilometer Deployment Engineer
at Mirantis https://www.mirantis.com/

slack: iberezovskiy
skype: bouhforever
phone: + 7-960-343-42-46

@nibalizer
Copy link
Member

According to http://ci.puppet.community/modules/puppetlabs/puppetlabs-mongodb, we haven't had passing beaker tests on this module, ever. @EmilienM pcci runs beaker tests per pull request and can be configured to vote here. However, no one has made the effort to make the tests pass.

@nibalizer nibalizer mentioned this pull request Aug 26, 2015
@iberezovskiy
Copy link
Contributor Author

Hi, Guys!
Can you please review this pull request #194 ?
Here is what I've been talking before: improvements for replica, for authentication. It follows all steps that I've listed before.

Thanks!

teran pushed a commit to fuel-infra/puppetlabs-mongodb that referenced this pull request Jan 20, 2016
Key moments:
    * Adds Support for Keyfile Key:
      upstream commit 7bbcff8
    * Remove useless openstack::mongo class
    * Add upstream changes for 217 pull request
      (voxpupuli/puppet-mongodb#217):
      - Implement retries for MongoDB shell commands
      - Initiate replica set creation from localhost if auth is enabled
    * Improve support for MongoDB authentication
      voxpupuli/puppet-mongodb#194
    * Fix lint errors (actually fixed in upstream)
    * Add noop tests for MongoDB parameters
  Implements: blueprint upgrade-openstack-puppet-modules
  Closes-bug: #1383639
  Related-bug: #1308990

Change-Id: I3b9cbd35bf46483782d7b7eb7ef030fd31fdd544
cegeka-jenkins pushed a commit to cegeka/puppet-mongodb that referenced this pull request Oct 23, 2017
Implement retries for MongoDB shell commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants