Use common logger for consistent log output

Use the common logger for consistent log output for some echo statements
that were not making use of it.

Change-Id: I7fae2a950318f5cd3245a4571dc464009726d4ae
This commit is contained in:
Anderson, Craig (ca846m) 2019-02-13 18:28:11 -08:00
parent 8f102a878a
commit 87268308f8
10 changed files with 10 additions and 35 deletions

View File

@ -121,15 +121,12 @@ for filename in ${!CURRENT_FILENAMES[@]}; do
$load_cmd ${persist_path}/${filename} || die "Problem loading ${persist_path}/${filename}"
done
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/apparmor_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/apparmor_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -160,15 +160,12 @@ dpkg --configure -a
apt-get autoremove -y
{{- end }}
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/apt.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/apt.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -208,15 +208,12 @@ else
log.WARN 'No ethtool overrides defined for this node.'
fi
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/ethtool_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/ethtool_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -211,14 +211,12 @@ UNIQUE_EOF_1840dbd4-09e1-4725-87f5-3b6944b80526
fi
{{- end }}
{{- end }}
log.INFO 'Putting the daemon to sleep for {{ $exec_loop_sleep_interval }} seconds.'
UNIQUE_EOF_9c341059-25a0-4725-9489-1789e255e381
chmod 700 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/exec_host_{{ .Chart.Version }}.sh
while true; do
nsenter -t 1 -m -u -n -i -p /tmp/exec_host_{{ .Chart.Version }}.sh
sleep 2
echo 'INFO Putting the daemon to sleep.'
sleep {{ $exec_loop_sleep_interval }}
done

View File

@ -93,15 +93,12 @@ else
log.WARN 'No limits overrides defined for this node.'
fi
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/limits_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/limits_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -138,15 +138,12 @@ else
log.WARN 'No mounts defined for this node.'
fi
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/mounts_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/mounts_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -197,16 +197,14 @@ if [[ $hash_check = pass ]] && [[ $interval_check = pass ]]; then
fi
echo 0 > "${hash}/exit_code"
exit 0
{{- end}}
log.INFO 'Putting the daemon to sleep for {{ $perm_loop_sleep_interval }} seconds.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/perm_host.sh
while true; do
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/perm_host.sh
sleep 2
echo 'INFO Putting the daemon to sleep.'
sleep {{ $perm_loop_sleep_interval }}
done

View File

@ -123,15 +123,12 @@ else
log.WARN 'No sysctl overrides defined for this node.'
fi
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/sysctl_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/sysctl_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -230,15 +230,12 @@ else
log.WARN 'No uamlite overrides defined for this node.'
fi
exit 0
log.INFO 'Putting the daemon to sleep.'
EOF
chmod 755 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/uamlite_host.sh
chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/uamlite_host.sh
sleep 1
echo 'INFO Putting the daemon to sleep.'
while [ 1 ]; do
sleep 300
done

View File

@ -394,7 +394,7 @@ get_container_status(){
echo "${CLOGS}"
exit 1
fi
elif [[ $(echo -e ${status} | tr -d '[:cntrl:]') = *'INFO Putting the daemon to sleep.'* ]] ||
elif [[ $(echo -e ${status} | tr -d '[:cntrl:]') = *'INFO Putting the daemon to sleep'* ]] ||
[[ $(echo -e ${status} | tr -d '[:cntrl:]') = *'DEBUG + exit 0'* ]]; then
if [ "${2}" = 'expect_failure' ]; then
echo 'Expected pod to die with error, but pod completed successfully'