forked from TrueCloudLab/frostfs-aio
[#10] Rework new epoch tick during AIO initialization
Previous implementation from #3 was based on a sleep counter. This solution is not reliable, because sometimes sleep duration is not enough for the storage node to send bootstrap request. New implementation checks network status of the node and ticks new epoch until node enters in the network map. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
parent
6c628e2459
commit
6606aabedd
1 changed files with 6 additions and 2 deletions
|
@ -45,10 +45,14 @@ runServices() {
|
||||||
|
|
||||||
while [[ -z "$(/usr/bin/frostfs-cli control healthcheck --endpoint localhost:16513 -c /config/cli-cfg-sn.yaml | grep 'Health status: READY')" ]];
|
while [[ -z "$(/usr/bin/frostfs-cli control healthcheck --endpoint localhost:16513 -c /config/cli-cfg-sn.yaml | grep 'Health status: READY')" ]];
|
||||||
do
|
do
|
||||||
sleep 5;
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
/usr/bin/frostfs-adm morph force-new-epoch --config /config/frostfs-adm.yml || die "Failed to update epoch"
|
while [[ -z "$(/usr/bin/frostfs-cli control healthcheck --endpoint localhost:16513 -c /config/cli-cfg-sn.yaml | grep 'Network status: ONLINE')" ]];
|
||||||
|
do
|
||||||
|
/usr/bin/frostfs-adm morph force-new-epoch --config /config/frostfs-adm.yml || die "Failed to update epoch"
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
/usr/bin/frostfs-s3-gw --config /config/s3-gw-config.yaml &
|
/usr/bin/frostfs-s3-gw --config /config/s3-gw-config.yaml &
|
||||||
/usr/bin/frostfs-http-gw --config /config/http-gw-config.yaml &
|
/usr/bin/frostfs-http-gw --config /config/http-gw-config.yaml &
|
||||||
|
|
Loading…
Reference in a new issue