2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-04 20:17:58 +00:00

Avoid exiting on tail failure

tail can fail in certain scenarios.  Switch to wait if that should occur.
This commit is contained in:
Jarrod Johnson
2026-09-04 08:39:05 -04:00
parent 2f49ab602d
commit 8fcb5aec9a
8 changed files with 34 additions and 8 deletions
@@ -69,4 +69,7 @@ systemctl disable firstboot
rm /etc/systemd/system/firstboot.service
rm /etc/confluent/firstboot.ran
) &
tail --pid $! -n 0 -F /var/log/confluent/confluent-firstboot.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /var/log/confluent/confluent-firstboot.log > /dev/console; then
wait $subpid
fi
@@ -48,4 +48,9 @@ systemctl disable firstboot
rm /etc/systemd/system/firstboot.service
rm /etc/confluent/firstboot.ran
) &
tail --pid $! -F /var/log/confluent/confluent-firstboot.log > /dev/console
subpid=$!
if ! tail --pid $subpid -F /var/log/confluent/confluent-firstboot.log > /dev/console;
then
wait $subpid
fi
@@ -27,4 +27,7 @@ run_remote_parts firstboot.d
run_remote_config firstboot.d
curl --capath /etc/confluent/tls -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $confluent_apikey" -X POST -d "status: complete" https://$confluent_mgr/confluent-api/self/updatestatus
) &
tail --pid $! -n 0 -F /target/var/log/confluent/confluent-post.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /target/var/log/confluent/confluent-firstboot.log > /dev/console; then
wait $subpid
fi
@@ -92,4 +92,7 @@ python3 /opt/confluent/bin/apiclient /confluent-api/self/updatestatus -d 'statu
umount /target/sys /target/dev /target/proc
) &
tail --pid $! -n 0 -F /target/var/log/confluent/confluent-post.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /target/var/log/confluent/confluent-post.log > /dev/console; then
wait $subpid
fi
@@ -46,5 +46,8 @@ if [ ! -e /tmp/installdisk ]; then
fi
sed -i s!%%INSTALLDISK%%!/dev/$(cat /tmp/installdisk)! /autoinstall.yaml
) &
tail --pid $! -n 0 -F /var/log/confluent/confluent-pre.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /var/log/confluent/confluent-pre.log > /dev/console; then
wait $subpid
fi
@@ -40,4 +40,7 @@ run_remote_parts firstboot.d
run_remote_config firstboot.d
curl --capath /etc/confluent/tls -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $confluent_apikey" -X POST -d "status: complete" https://$confluent_mgr/confluent-api/self/updatestatus
) &
tail --pid $! -n 0 -F /var/log/confluent/confluent-post.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /var/log/confluent/confluent-firstboot.log > /dev/console; then
wait $subpid
fi
@@ -125,4 +125,7 @@ python3 /opt/confluent/bin/apiclient /confluent-api/self/updatestatus -d 'statu
umount /target/sys /target/dev /target/proc /target/run
) &
tail --pid $! -n 0 -F /target/var/log/confluent/confluent-post.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /target/var/log/confluent/confluent-post.log > /dev/console; then
wait $subpid
fi
@@ -59,5 +59,8 @@ if [ "$cryptboot" != "" ] && [ "$cryptboot" != "none" ] && [ "$cryptboot" != "n
chmod 000 /etc/confluent_lukspass
fi
) &
tail --pid $! -n 0 -F /var/log/confluent/confluent-pre.log > /dev/console
subpid=$!
if ! tail --pid $subpid -n 0 -F /var/log/confluent/confluent-pre.log > /dev/console; then
wait $subpid
fi