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

automerge

(cherry picked from commit 0c14ca58c7)
This commit is contained in:
mergify[bot]
2019-10-27 13:55:37 -07:00
committed by Michael Vines
parent 4cb38ddf01
commit f1e9a944ef
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
@@ -732,6 +736,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