Delay starting compute services until controller services are up

On AIO-SX startup there are many services that need to get started up.
We have noted experimentally that there can be significant CPU
congestion if the controller services are still initializing when we
start up the compute services.

With this change we will wait for the "cloud-services" service-group to
be active before starting up the compute services.

This has minimal effect on overall startup times because the controller
services can continue to run on all host CPUs until the cloud services
start up, at which point all host services are restricted to the
platform
CPUs.

Change-Id: Ie9f129fb078e19883cab910b3f411813237d376b
This commit is contained in:
Chris Friesen 2018-04-09 17:14:40 -06:00 committed by Jack Ding
parent 0c2dc137b9
commit bb6c4111fd
1 changed files with 3 additions and 4 deletions

View File

@ -98,12 +98,11 @@ get_ip()
wait_for_controller_services()
{
SERVICE="platform-nfs-ip"
while [ "$SECONDS" -le "$DELAY_SEC" ]
do
# Check to make sure the service is enabled
sm-query service ${SERVICE} | grep -q "enabled-active"
if [ $? -eq 0 ]
# Check to make sure the cloud-services group is enabled
OUTPUT=`sm-query service-group cloud-services`
if [ "$OUTPUT" == "cloud-services active" ]
then
return 0
fi