Invoke on-reboot from cloud startup script to avoid racing with cron (#6579)

automerge
This commit is contained in:
Michael Vines 2019-10-27 10:56:16 -07:00 committed by Grimes
parent f3c0aa154a
commit 0c14ca58c7
2 changed files with 6 additions and 1 deletions

View File

@ -662,6 +662,7 @@ EOF
set -ex
if [[ -f /solana-scratch/.instance-startup-complete ]]; then
echo reboot
$(
cd "$here"/scripts/
if "$enableGpu"; then
@ -672,6 +673,9 @@ if [[ -f /solana-scratch/.instance-startup-complete ]]; then
cat mount-additional-disk.sh
fi
)
if [[ -x ~solana/solana/on-reboot ]]; then
sudo -u solana ~solana/solana/on-reboot
fi
# Skip most setup on instance reboot
exit 0
@ -733,6 +737,8 @@ $(
)
cat > /etc/motd <<EOM
See startup script log messages in /var/log/syslog for status:
$ sudo cat /var/log/syslog | egrep \\(startup-script\\|cloud-init\)
$(printNetworkInfo)
$(creationInfo)
EOM

View File

@ -76,7 +76,6 @@ now=\$(date -u +"%Y-%m-%dT%H:%M:%SZ")
ln -sfT validator.log.\$now validator.log
EOF
chmod +x ~/solana/on-reboot
echo "@reboot ~/solana/on-reboot" | crontab -
GPU_CUDA_OK=false
GPU_FAIL_IF_NONE=false