Sfoglia il codice sorgente

Patching improvements

Brad Poulton 4 anni fa
parent
commit
5d56d29608
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      Patching Notes.md

+ 4 - 2
Patching Notes.md

@@ -751,7 +751,7 @@ for i in `salt -C '( *splunk-cm* ) not moose*' test.ping --out=txt`; do echo htt
 
 #### Reboot the indexers one at a time (AFS cluster gets backed up when an indexer is rebooted)
 
-TODO: get command to view "three green check marks" from salt. 
+Command to view "three green check marks" from salt. 
 
 `salt -C ' *splunk-cm* not moose* ' state.sls splunk.master.cluster_status --static --out=json | jq --raw-output 'keys[] as $k | "\($k): \(.[$k] | .[].changes?.stdout)"' | grep -1 factor`
 
@@ -763,7 +763,7 @@ BETTER:
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1a or G@ec2:placement:availability_zone:us-gov-east-1a ) not moose*' test.ping --out=txt
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1a or G@ec2:placement:availability_zone:us-gov-east-1a ) not moose*' cmd.run 'df -h | egrep "[890][0-9]\%"'
 date; salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1a or G@ec2:placement:availability_zone:us-gov-east-1a ) not moose*' system.reboot --async
-salt -C ' *splunk-cm* not moose* ' state.sls splunk.master.cluster_status --static --out=json | jq --raw-output 'keys[] as $k | "\($k): \(.[$k] | .[].changes?.stdout)"' | grep -1 factor | grep "not met"
+salt -C ' *splunk-cm* not moose* ' cmd.run runas=splunk "/opt/splunk/bin/splunk show cluster-status -auth minion:'{{ pillar['minion_pass'] }}'" | grep -2 factor | grep "not met"
 watch "salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1a or G@ec2:placement:availability_zone:us-gov-east-1a ) not moose*' test.ping --out=txt"
 ```
 
@@ -776,6 +776,7 @@ Wait for 3 green check marks
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1b or G@ec2:placement:availability_zone:us-gov-east-1b ) not moose*' test.ping --out=txt
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1b or G@ec2:placement:availability_zone:us-gov-east-1b ) not moose*' cmd.run 'df -h | egrep "[890][0-9]\%"'
 date; salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1b or G@ec2:placement:availability_zone:us-gov-east-1b ) not moose*' system.reboot --async
+salt -C ' *splunk-cm* not moose* ' cmd.run runas=splunk "/opt/splunk/bin/splunk show cluster-status -auth minion:'{{ pillar['minion_pass'] }}'" | grep -2 factor | grep "not met"
 watch "salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1b or G@ec2:placement:availability_zone:us-gov-east-1b ) not moose*' test.ping --out=txt"
 
 # 3 green checkmarks 
@@ -783,6 +784,7 @@ watch "salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1b or
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1c or G@ec2:placement:availability_zone:us-gov-east-1c ) not moose*' test.ping --out=txt
 salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1c or G@ec2:placement:availability_zone:us-gov-east-1c ) not moose*' cmd.run 'df -h | egrep "[890][0-9]\%"'
 date; salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1c or G@ec2:placement:availability_zone:us-gov-east-1c ) not moose*' system.reboot  --async
+salt -C ' *splunk-cm* not moose* ' cmd.run runas=splunk "/opt/splunk/bin/splunk show cluster-status -auth minion:'{{ pillar['minion_pass'] }}'" | grep -2 factor | grep "not met"
 watch "salt -C '*splunk-i* and ( G@ec2:placement:availability_zone:us-east-1c or G@ec2:placement:availability_zone:us-gov-east-1c ) not moose*' test.ping --out=txt"
 
 # 3 green checkmarks