Skip to content

Instantly share code, notes, and snippets.

@mzeier
Created November 12, 2018 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzeier/27b9cdcec238ce7dc22c26566758e261 to your computer and use it in GitHub Desktop.
Save mzeier/27b9cdcec238ce7dc22c26566758e261 to your computer and use it in GitHub Desktop.
Stop and terminate old instances
mrz-masaba:anisble mrz$ ansible-playbook fdb-excludes.yml \
> -l tag_cluster_red:\&tag_mirror_primary \
> -t cleanup \
> -e cluster=red \
> -e mode=ssd \
> -e mirror=primary
PLAY [tag_index_1:&tag_role_db:!tag_planned_removal_true] ***************************************************************************
TASK [Gathering Facts] **************************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : fail] ***********************************************************************************************************
skipping: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : fail] ***********************************************************************************************************
skipping: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : fail] ***********************************************************************************************************
skipping: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : gather ec2_facts] ***********************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : remove deps and re-install in proper order.] ********************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e] => (item={u'name': u'aws'})
ok: [red_2b_db1_i_09f86e2d21867e32e] => (item={u'name': u'fabric'})
TASK [fdb-exclude : ensure required deps are present] *******************************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item={u'name': u'awscli'})
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item={u'name': u'boto'})
TASK [fdb-exclude : Get the details about the nodes marked for exclusion] ***********************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : Get details about all of the instances] *************************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : include] ********************************************************************************************************
skipping: [red_2b_db1_i_09f86e2d21867e32e] => (item=10.23.3.61)
skipping: [red_2b_db1_i_09f86e2d21867e32e] => (item=10.23.3.30)
skipping: [red_2b_db1_i_09f86e2d21867e32e] => (item=10.23.3.14)
TASK [fdb-exclude : check coordination state on both tiers to ensure coordinators have been moved] **********************************
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=ssd)
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=mem)
TASK [fdb-exclude : Check both mem and ssd tiers to ensure all excludes are finished] ***********************************************
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=ssd)
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=mem)
TASK [fdb-exclude : Check both mem and ssd tiers to ensure the exclusions are safe for removal] *************************************
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=ssd)
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=mem)
TASK [fdb-exclude : Put a copy of the IPs somewhere in case this job fails and we have to restart it] *******************************
changed: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : shutdown the following instances i-059a3574011096da1, i-002cb6194a8594414, i-0b1d0ad6fe5a5dda7] *****************
changed: [red_2b_db1_i_09f86e2d21867e32e -> localhost]
TASK [fdb-exclude : Wait for instances to completely stop] **************************************************************************
Pausing for 300 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : Check ssd tier to ensure the cluster health] ********************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : Check the mem tier to ensure cluster health] ********************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : set_fact] *******************************************************************************************************
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : fail] ***********************************************************************************************************
skipping: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : wait for sanity] ************************************************************************************************
Pausing for 7200 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : Disable termination protection] *********************************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e -> localhost]
TASK [fdb-exclude : Terminate the instances] ****************************************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e -> localhost]
TASK [fdb-exclude : allow time for instances to terminate so we don't accidentally re-include] **************************************
Pausing for 60 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
ok: [red_2b_db1_i_09f86e2d21867e32e]
TASK [fdb-exclude : Include the IPs back into the cluster] **************************************************************************
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=ssd)
changed: [red_2b_db1_i_09f86e2d21867e32e] => (item=mem)
PLAY RECAP **************************************************************************************************************************
red_2b_db1_i_09f86e2d21867e32e : ok=25 changed=13 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment