Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Routers should wait for the cmdline patch on reboot, ssvm/cpvm should not #178

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions systemvm/patches/debian/config/etc/init.d/cloud-early-config
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,19 @@ get_boot_params() {
echo $pubkey > /var/cache/cloud/authorized_keys
echo $pubkey > /root/.ssh/authorized_keys
fi
done < /dev/vport0p1
# In case of reboot we do not send the boot args again.
# So, no need to wait for them, as the boot args are already set at startup
if [ -s /var/cache/cloud/cmdline ]
then
log_it "Found a non empty cmdline file. Will now exit the loop and proceed with configuration."
break;
done < /dev/vport0p1
# In case of reboot of secstoragevm or consoleproxyvm we do not send the boot args again.
# So, no need to wait for them, as the boot args are already set at startup
# Routers and VPC do get new boot args (new linklocal address) so we should wait for it
# or else we'll reuse the old linklocal address and prevent the mgt server to control it.
if [ -s /var/cache/cloud/cmdline ]
then
systemvm_type=$(cat /var/cache/cloud/cmdline | tr ' ' '\n' | grep type | cut -d\= -f2)
if [[ "${systemvm_type}" == "secstorage" || "${systemvm_type}" == "consoleproxy" ]];
then
log_it "Found a non empty cmdline file for type = ${systemvm_type}. Will now exit the loop and proceed with configuration."
break;
fi
fi
sleep ${progress}s
progress=$[ progress * factor ]
Expand Down