remove ucarp cluster data from the code

This commit is contained in:
Thomas S Hatch 2011-04-01 18:35:55 -06:00
parent 396a2f843a
commit 5689a5e616
3 changed files with 5 additions and 35 deletions

View file

@ -50,20 +50,10 @@
# facilitate the distribution of cluster information
#cluster_masters: []
# The cluster modes are "parinoid" and "full"
# parinoid will only distribute the signed minion public keys
# full will also distribute the master private key and turn on the ucarp
# managed interface, if full is selected ensure that cluster_interface and
# cluster_addr values are set, otherwise the full cluster will fail to start
# the ucarp interface
#cluster_mode: parinoid
# The network interface to bind the ucarp shared ip address to
#cluster_interface: eth0
# The network address used by ucarp, this is the adress that the minions
# should be referencing as the master
#cluster_addr:
# The cluster modes are "paranoid" and "full"
# paranoid will only distribute the accepted minion public keys.
# full will also distribute the master private key.
#cluster_mode: paranoid
##### Logging settings #####

View file

@ -73,9 +73,7 @@ def master_config(path):
'log_level': 'WARNING',
'out_level': 'ERROR',
'cluster_masters': [],
'cluster_mode': 'parinoid',
'cluster_interface': 'eth0',
'cluster_addr': '',
'cluster_mode': 'paranoid',
}
if os.path.isfile(path):

View file

@ -30,21 +30,3 @@ def distrib(minions,
if master_pem:
open(os.path.join(opts['pki_dir'],
'master.pem'), 'w+').write(master_pem)
if cluster_addr:
passwd = master_pem.split()[12][:12]
cmd = 'ifconfig ' + self.opts['cluster_interface']\
+ ' | grep "inet "'\
+ ' | cut -d: -f2 | cut -d" " -f1'
s_addr = subprocess.Popen(cmd,
shell=True,
stdout=subprocess.PIPE,
).communicate()[0]
cmd = 'ucarp -i ' + opts['cluster_interface'] + ' -s ' + s_addr\
+ ' -v 10 -p ' + passwd + ' -a ' + opts['cluster_addr']\
+ ' -u /usr/libexec/salt/clust-up '\
+ ' -d /usr/libexec/salt/clust-down -r 3 -B -z'
g_cmd = 'ps aux | grep "' + cmd + '"'
ret = subprocess.call(g_cmd, shell=True)
if not ret:
# The ucarp interface is not running, start it
subprocess.Popen(cmd, shell=True)