Separate cobbler IP from compass IP in cobbler snippets
Compass IP now is isolated so that during PXE process, a pxe-server IP is available and DHCP will have its own subnet and cobbler server owns the vip for that subnet. This only partially closes bug #1393957, further change will be maide in compass-core. So no "Closes-Bug" will be added in the message. Partial-bug: #1393957 Change-Id: I0d693f2958a33b5a093728dccf063e2114c7406b
This commit is contained in:
parent
116364c29a
commit
f639a5d67f
@ -57,7 +57,11 @@ EOL
|
||||
\\\\$InputFileFacility local3
|
||||
\\\\$InputRunFileMonitor
|
||||
\\\\$InputFilePollInterval 1
|
||||
local3.info @$server:514
|
||||
#if $getVar("compass_server","") != ""
|
||||
local3.info @$compass_server:514
|
||||
#else
|
||||
local3.info @server:514
|
||||
#end if
|
||||
EOL
|
||||
rm -rf /var/lib/rsyslog/chef_\\$node_log
|
||||
service rsyslog restart
|
||||
|
@ -2,7 +2,11 @@
|
||||
#set profile_name = $getVar('profile_name','')
|
||||
#set breed = $getVar('breed','')
|
||||
#set os_version = $getVar('os_version','')
|
||||
#set srv = $getVar('http_server','')
|
||||
#if $getVar("compass_server","") != ""
|
||||
#set srv = $getVar('compass_server','')
|
||||
#else
|
||||
#set srv = $getVar('server','')
|
||||
#end if
|
||||
#set kickstart = $getVar('kickstart','')
|
||||
#set run_install_triggers = $str($getVar('run_install_triggers',''))
|
||||
#set pxe_just_once = $str($getVar('pxe_just_once',''))
|
||||
|
@ -8,7 +8,11 @@ $idata["ip_address"] $hostname
|
||||
#end for
|
||||
#import os
|
||||
#set $server_name = $os.uname[1]
|
||||
#if $getVar("compass_server", "") != ""
|
||||
$compass_server $server_name
|
||||
#else
|
||||
$server $server_name
|
||||
#end if
|
||||
#if $getVar("chef_server_ip", "") != "" and $getVar("chef_server_dns", "") != ""
|
||||
$chef_server_ip $chef_server_dns
|
||||
#end if
|
||||
|
@ -1,7 +1,11 @@
|
||||
#if $str($getVar('anamon_enabled','')) == "1"
|
||||
|
||||
## install anamon script
|
||||
#if $getVar("compass_server","") != ""
|
||||
wget -O /usr/local/sbin/anamon "http://$compass_server:$http_port/cobbler/aux/anamon"
|
||||
#else
|
||||
wget -O /usr/local/sbin/anamon "http://$server:$http_port/cobbler/aux/anamon"
|
||||
#end if
|
||||
## install anamon system service
|
||||
cat << EOF > /etc/init.d/anamon.init
|
||||
#raw
|
||||
@ -26,7 +30,11 @@ cat << EOF > /etc/init.d/anamon.init
|
||||
# installation.
|
||||
#
|
||||
#end raw
|
||||
#if $getVar("compass_server","") != ""
|
||||
/usr/local/sbin/anamon --watchfile "/var/log/boot.log /var/log/messages /var/log/dmesg /var/log/anaconda.log" --name $name --server $compass_server --port $http_port --exit
|
||||
#else
|
||||
/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
|
||||
#end if
|
||||
chkconfig anamon.init off
|
||||
mv /etc/init.d/anamon.init /tmp/anamon.init
|
||||
EOF
|
||||
|
@ -1,4 +1,9 @@
|
||||
#if $str($getVar('anamon_enabled','')) == "1"
|
||||
#if $getVar("compass_server", "") != ""
|
||||
wget -O /tmp/anamon "http://$compass_server:$http_port/cobbler/aux/anamon"
|
||||
python /tmp/anamon --name "$name" --server "$compass_server" --port "$http_port"
|
||||
#else
|
||||
wget -O /tmp/anamon "http://$server:$http_port/cobbler/aux/anamon"
|
||||
python /tmp/anamon --name "$name" --server "$server" --port "$http_port"
|
||||
python /tmp/anamon --name "$name" --server "$_server" --port "$http_port"
|
||||
#end if
|
||||
#end if
|
||||
|
@ -9,7 +9,11 @@ cat << EOL > /etc/rsyslog.conf
|
||||
\\$ActionQueueFileName srvrfwd
|
||||
\\$ActionResumeRetryCount -1
|
||||
\\$ActionQueueSaveOnShutDown on
|
||||
#if $getVar("compass_server", "") != ""
|
||||
*.* @@$compass_server:514
|
||||
#else
|
||||
*.* @@$server:514
|
||||
#end if
|
||||
|
||||
\# Provides UDP syslog reception
|
||||
\#\\$ModLoad imudp
|
||||
|
Loading…
Reference in New Issue
Block a user