Open thomas-riccardi opened 9 years ago
For sub-issue 1 it seems all functions in libraries/ just log error or warnings, but don't return/raise an error...
How to fix those issues?
How should we return an error from the functions in libraries/mongodb.rb
? And in definitions/mongodb.rb
? Throw an exception (which one?) ? Call Chef::Application.fatal
?
Should we bug-report to MongoDB Inc.?
Or should we hook into Chef services providers to add a wait loop?
Or should we notify :immediately
an extra ruby block that waits?
Or should we add retry loop on libraries/mongodb.rb
? (on connection, and for replica-set until replica set ready?)
And/or should we expose a function to wait for server ready?
chef-mongodb v0.16.2
With
include_recipe "mongodb::replicaset"
:What happens? When creating the service it is enabled and started, and immediately after that the
config_replicaset
is run (since PR #352, but the issue could still happen without this merge). However the first service start takes time to pre-allocate the large files on disk. So the service is started, but it's not ready to accept requests yet. Theconfig_replicaset
fails because the server is not ready yet. It logs an error, but the recipe continues to run!Sub-issue 1:
Why does the recipe continue to run?
Sub-issue 2:
Why does the recipe re-configures the replica set via the additional
run_config_replicaset
block (in addition to the notify :immediate from the service) ?Sub-issue 3:
Why does the service start finishes before the server is really started (ie ready to accept requests).