Commit b4c934e2 by Joseph Mulloy Committed by GitHub

Merge pull request #4124 from edx/jdmulloy/ops2117/mongo32_runbook

Jdmulloy/ops2117/mongo32 runbook
parents 49a6c930 52c0f0b6
......@@ -351,6 +351,12 @@ def validate_args():
if (username and not password) or (password and not username):
module.fail_json(msg="Must provide both username and password or neither.")
# Check that if votes is 0 priority is also 0
for member in module.params.get('rs_config').get('members'):
if member.get('votes') == 0 and member.get('priority') != 0:
module.fail_json(msg="Non-voting member {} must have priority 0".
format(member['host']))
return module
......
......@@ -134,6 +134,8 @@
- "install"
- "install:app-configuration"
- "update_mongod_conf"
- "manage"
- "manage:db-replication"
# If either auth or unauthed access comes back with a replica set, we
# do not want to initialize one. Since initialization requires a bunch
......@@ -178,6 +180,8 @@
backup: yes
register: update_mongod_conf
tags:
- "install"
- "install:app-configuration"
- "manage"
- "manage:db-replication"
- "update_mongod_conf"
......@@ -199,6 +203,7 @@
tags:
- "manage"
- "manage:start"
- "manage:db-replication"
- name: wait for mongo server to start
wait_for:
......@@ -207,6 +212,7 @@
tags:
- "manage"
- "manage:start"
- "manage:db-replication"
# We only try passwordless superuser creation when
# we're initializing the replica set and need to use
......@@ -226,7 +232,7 @@
run_once: true
tags:
- "manage"
- "manage:db"
- "manage:db-replication"
# Now that the localhost exemption has been used to create the superuser, we need
# to add replica set to our configuration. This will never happen if we detected
......@@ -236,8 +242,6 @@
skip_replica_set: false
when: initialize_replica_set
tags:
- "install"
- "install:app-configuration"
- "manage"
- "manage:db-replication"
......@@ -258,7 +262,6 @@
when: initialize_replica_set
tags:
- "manage"
- "manage:start"
- "manage:db-replication"
- name: wait for mongo server to start
......@@ -268,7 +271,6 @@
when: initialize_replica_set
tags:
- "manage"
- "manage:start"
- "manage:db-replication"
- name: configure replica set
......@@ -282,6 +284,7 @@
- "manage"
- "manage:db"
- "manage:db-replication"
- "manage:db-replication-configuration"
# During initial replica set configuration, it can take a few seconds to vote
# a primary and for all members to reflect that status. During that window,
......@@ -318,6 +321,7 @@
tags:
- "manage"
- "manage:db"
- "manage:db-users"
- "manage:db-replication"
- name: ensure mongo starts at boot time
......@@ -327,4 +331,3 @@
tags:
- "manage"
- "manage:start"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment