2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-11 10:18:00 +00:00

Try another strategy for confluent initqueue

We want to have each iteration try not much.

But we also want to have a 'good' (primary network) match
supersede a less successful guess.

But we also want to keep guessing.

So the first 'vague' guess gets to run full hook.

If a future good guess happens, rerun the hook to update the data.
This commit is contained in:
Jarrod Johnson 2020-07-15 15:20:17 -04:00
parent ac308fbd9c
commit 6dadac498f

View File

@ -15,8 +15,10 @@ while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}'
/opt/confluent/bin/copernicus -t > /etc/confluent/confluent.info
done
cd /
grep ^EXTMGRINFO: /etc/confluent/confluent.info || return 0
echo -n "" > /tmp/confluent.initq
grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && echo -n "" > /tmp/confluent.initq
grep ^EXTMGRINFO: /etc/confluent/confluent.info || return 0 # Do absolutely nothing if no data at all yet
if [ -f /tmp/confluent.fellback ] && [ ! -f /tmp/confluent.initq ]; return 0; fi
echo -n "" > /tmp/confluent.fellback
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
#TODO: blkid --label <whatever> to find mounted api