~mbruzek/charms/precise/mongodb/00-setup

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Juan L. Negron
  • Date: 2014-07-21 19:41:19 UTC
  • Revision ID: juan.negron@canonical.com-20140721194119-e00hms2bvr7j9n4i
Fix race condition where mongos tries to start without enough config servers available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1234
1234
                (replicaset, hostname, port)
1235
1235
                retVal2 = mongo_client(mongos_host, shard_command2)
1236
1236
                retVal = retVal1 is True and retVal2 is True
 
1237
            else:
 
1238
                juju_log("Not enough config server for mongos yet.")
 
1239
                retVal = True
1237
1240
        else:
1238
1241
            juju_log("mongos_relation_change: undefined rel_type: %s" %
1239
1242
            rel_type)