Skip to content

Commit

Permalink
Merge pull request #178 from MissionCriticalCloud/fix/cloud-early-con…
Browse files Browse the repository at this point in the history
…fig-router-wait-for-cmdline-info

Routers should wait for the cmdline patch on reboot, ssvm/cpvm should not
  • Loading branch information
Boris Schrijver committed Jun 6, 2016
2 parents ed1ed4b + 6df1e39 commit 88c1efe
Showing 1 changed file with 13 additions and 7 deletions.
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

0 comments on commit 88c1efe

Please # to comment.