2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-11 20:16:27 +00:00

Stop the SUSE 16 install when agama rejects the config

The default Etc/UTC is not in the tzdata list agama validates against,
so the load failed and the install fell through to agama defaults and
still reported completion. Normalize it and halt if the load fails.
This commit is contained in:
Markus Hilger
2026-09-07 05:05:37 +02:00
parent f3ea32bcd3
commit f742626226
2 changed files with 11 additions and 1 deletions
@@ -24,6 +24,9 @@ python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/pre.s
chmod +x /tmp/pre.sh
/tmp/pre.sh > $serialcons 2>&1
kill $tailpid
agama config load /tmp/autoinstall.json <> $serialcons > $serialcons 2>&1
if ! agama config load /tmp/autoinstall.json <> $serialcons > $serialcons 2>&1; then
echo "****Failed to load the install configuration, halting install" > $serialcons
while :; do sleep 86400; done
fi
agama install <> $serialcons > $serialcons 2>&1
agama finish <> $serialcons > $serialcons 2>&1
@@ -38,6 +38,9 @@ sed -i s!%%DEPLOYER%%!$deployserver!g /tmp/autoinstall.json
sed -i s!%%PROFILE%%!$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}')!g /tmp/autoinstall.json
sed -i s!%%ROOTPASSWORD%%!$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|awk '{print $2}')!g /tmp/autoinstall.json
sed -i s!%%NODENAME%%!$(hostname)!g /tmp/autoinstall.json
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/profile.yaml > /tmp/instprofile.yaml
blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //')
sed -i 's!%%INSTALLEDARGS%%!'"$blargs"'!g' /tmp/autoinstall.json
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/getinstalldisk > /tmp/getinstalldisk
locale=$(grep ^locale: /etc/confluent/confluent.deploycfg)
locale=${locale#locale: }
@@ -45,6 +48,10 @@ keymap=$(grep ^keymap: /etc/confluent/confluent.deploycfg)
keymap=${keymap#keymap: }
tz=$(grep ^timezone: /etc/confluent/confluent.deploycfg)
tz=${tz#timezone: }
# agama checks against the tzdata list, which carries UTC but no Etc/ zones
if [ "$tz" = "Etc/UTC" ]; then
tz=UTC
fi
sed -i 's!%%TIMEZONE%%!'$tz'!g' /tmp/autoinstall.json
sed -i 's!%%LOCALE%%!'$locale'!g' /tmp/autoinstall.json
sed -i 's!%%KEYMAP%%!'$keymap'!g' /tmp/autoinstall.json