Skip to content

Commit

Permalink
Including found known issues
Browse files Browse the repository at this point in the history
  • Loading branch information
migtor committed Sep 21, 2016
1 parent 4a39be4 commit 55fc2f0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions saltstack/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ The nodegroups are defined based on grains rules:
slave: 'G@emr:instance_role:Core or G@emr:instance_role:Task'


## Known issues ##

When running in syndicated mode, sometimes the minions fail to unregister from the master of masters when they are shutdown (such as after a resize of a instance group). Most people would probably use the default mode which doesn't exhibit this problem. The script 'salt_clean.sh' can be run in the master of masters (as root user) to clean the "zombie" unregistered minions.


## Brief introduction to SaltStack ##

[SaltStack](https://docs.saltstack.com/en/2015.5/) is an open source tool for automation and infrastructure management (such as Chef or Puppet). It started as a remote execution engine, it's based on ZeroMQ.
Expand Down
21 changes: 21 additions & 0 deletions saltstack/salt_clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/bash

echo "Cleaning minions that do not respond to ping... "

salt '*' test.ping > /tmp/all_hosts

cat all_hosts | grep return -B 1 | grep -v 'return' | cut -d ':' -f1 > /tmp/salt_error_hosts

for i in $( cat salt_error_hosts); do
# for deleting the auth-key
salt-key -d $i -y;
# for delete the unauth key , sometimes it's needed:
salt-key -d $i -y;
# delete the pem file
if [ -f /etc/salt/pki/master/minions/%i ]; then
rm -f /etc/salt/pki/master/minions/$i
fi
done

rm /tmp/all_hosts /tmp/salt_error_hosts
echo "done"

0 comments on commit 55fc2f0

Please sign in to comment.