merge new change to master
Change-Id: I566f0183532979e53af75b56ac89a9f25ff6c1ad
This commit is contained in:
parent
2e40ce9f72
commit
4ca08e44e7
@ -84,15 +84,37 @@ def get_stats():
|
||||
return None
|
||||
for i in resp:
|
||||
if i['vhost'] == VHOST:
|
||||
# AN issue here is that the name has a GUID embedded and this is not a correct
|
||||
# metric name for a time series database. The next lines attempt to remeady this
|
||||
# by removing anything after the first or second character sequence followed by "_".
|
||||
|
||||
iname = str(i['name']).split("_")
|
||||
#logger('warn', 'iname = %s simplified.' % iname)
|
||||
#logger('warn', 'Simplified from i[name] = %s.' % str(i['name']))
|
||||
iname = str(i['name']).split("_")
|
||||
if(len(iname) > 1):
|
||||
if(iname[0] == 'reply'):
|
||||
mname = iname[0]
|
||||
else:
|
||||
mname = iname[0] + "_" + iname[1]
|
||||
else:
|
||||
mname = iname[0]
|
||||
|
||||
if "messages" in i:
|
||||
stats['ctl_messages'] += i['messages']
|
||||
stats['ctl_messages_%s' % i['name']] = i['messages']
|
||||
#stats['ctl_messages_%s' % i['name']] = i['messages']
|
||||
stats['ctl_messages_%s' % mname ] = i['messages']
|
||||
#logger('warn', 'ctl_message = %s.' % str(i['messages']))
|
||||
if "memory" in i:
|
||||
stats['ctl_memory'] += i['memory']
|
||||
stats['ctl_memory_%s' % i['name']] = i['memory']
|
||||
#stats['ctl_memory_%s' % i['name']] = i['memory']
|
||||
stats['ctl_memory_%s' % mname ] = i['memory']
|
||||
#logger('warn', 'ctl_memory = %s.' % str(i['memory']))
|
||||
if "consumers" in i:
|
||||
stats['ctl_consumers'] += i['consumers']
|
||||
stats['ctl_consumers_%s' % i['name']] = i['consumers']
|
||||
#stats['ctl_consumers_%s' % i['name']] = i['consumers']
|
||||
stats['ctl_consumers_%s' % mname ] = i['consumers']
|
||||
#logger('warn', 'ctl_consumers = %s.' % str(i['consumers']))
|
||||
if not stats['ctl_memory'] > 0:
|
||||
logger('warn', '%s reports 0 memory usage. This is probably incorrect.'
|
||||
% RABBITMQ_API)
|
||||
|
@ -4,12 +4,6 @@
|
||||
# System Authorization
|
||||
auth --useshadow --enablemd5
|
||||
|
||||
# System Bootloader
|
||||
bootloader --location=mbr
|
||||
|
||||
# Clear MBR
|
||||
zerombr
|
||||
|
||||
# Use Text Mode
|
||||
text
|
||||
|
||||
@ -70,6 +64,7 @@ $SNIPPET('kickstart_pre_partition_disks')
|
||||
|
||||
# Enable installation monitoring
|
||||
$SNIPPET('kickstart_pre_anamon')
|
||||
%end
|
||||
|
||||
# Packages
|
||||
%packages --nobase
|
||||
@ -85,6 +80,7 @@ libestr
|
||||
libgt
|
||||
liblogging
|
||||
rsyslog
|
||||
%end
|
||||
|
||||
%post --log=/var/log/post_install.log
|
||||
$SNIPPET('log_ks_post')
|
||||
@ -109,3 +105,4 @@ $SNIPPET($kickstart_tool)
|
||||
#end if
|
||||
$SNIPPET('kickstart_post_anamon')
|
||||
$SNIPPET('kickstart_done')
|
||||
%end
|
||||
|
@ -1,3 +1,15 @@
|
||||
#set ip_address = ""
|
||||
#set ikeys = $interfaces.keys()
|
||||
#for $iname in $ikeys
|
||||
#set $idata = $interfaces[$iname]
|
||||
#set $static = $idata["static"]
|
||||
#set $management = $idata["management"]
|
||||
#set $ip = $idata["ip_address"]
|
||||
#if $management and $ip
|
||||
#set $ip_address = $ip
|
||||
#end if
|
||||
#end for
|
||||
|
||||
cat << EOF > /etc/chef/run.sh
|
||||
#!/bin/bash
|
||||
touch /tmp/chef.log
|
||||
@ -15,13 +27,20 @@ while true; do
|
||||
let all_nodes_success=1
|
||||
for node in \\$nodes; do
|
||||
mkdir -p /var/log/chef/\\$node
|
||||
cat << EOL > /etc/chef/\\$node.json
|
||||
if [ ! -f /etc/chef/\\$node.json ]; then
|
||||
cat << EOL > /etc/chef/\\$node.json
|
||||
#if $getVar("local_repo","") != ""
|
||||
{"local_repo": "$local_repo"}
|
||||
{
|
||||
"local_repo": "$local_repo",
|
||||
"ip_address": "$ip_address"
|
||||
}
|
||||
#else
|
||||
{}
|
||||
{
|
||||
"ip_address": "$ip_address"
|
||||
}
|
||||
#end if
|
||||
EOL
|
||||
fi
|
||||
if [ ! -f "/etc/chef/\\$node.pem" ]; then
|
||||
cat << EOL > /etc/rsyslog.d/\\$node.conf
|
||||
\\\\$ModLoad imfile
|
||||
|
@ -26,7 +26,7 @@ cat << EOF > /etc/init.d/anamon.init
|
||||
# installation.
|
||||
#
|
||||
#end raw
|
||||
/usr/local/sbin/anamon --watchfile "/var/log/boot.log /var/log/messages /var/log/dmesg" --name $name --server $server --port $http_port --exit
|
||||
/usr/local/sbin/anamon --watchfile "/var/log/boot.log /var/log/messages /var/log/dmesg /var/log/anaconda.log" --name $name --server $server --port $http_port --exit
|
||||
chkconfig anamon.init off
|
||||
mv /etc/init.d/anamon.init /tmp/anamon.init
|
||||
EOF
|
||||
|
@ -210,6 +210,9 @@ done
|
||||
|
||||
partition_size=\${partitions_size[/boot]:-500}
|
||||
unset \${partitions_name[/boot]}
|
||||
echo "bootloader --location=mbr --driveorder=\${sorted_disks[0]}" >> /tmp/part-include
|
||||
echo "zerombr" >> /tmp/part-include
|
||||
echo "part biosboot --fstype=biosboot --size=1 --ondisk=\${sorted_disks[0]}" >> /tmp/part-include
|
||||
echo "part /boot --fstype=\${partition_fstype} --size=\${partition_size} --ondisk=\${sorted_disks[0]} --asprimary" >> /tmp/part-include
|
||||
partition_size=\${partitions_size[swap]:-0}
|
||||
if [[ "\$partition_size" == "0" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user