Change compute node to worker node personality
The compute personality & subfunction has been changed to worker, and compute_reserved.conf has been rename to worker_reserved.conf. This update changes sm dependencies to compute personality and compute_reserved.conf. Tests Performed: Non-containerized deployment AIO-SX: Sanity and Nightly automated test suite AIO-DX: Sanity and Nightly automated test suite 2+2 System: Sanity and Nightly automated test suite 2+2 System: Horizon Patch Orchestration Kubernetes deployment: AIO-SX: Create, delete, reboot and rebuild instances 2+2+2 System: worker nodes are unlock enable and no alarms Story: 2004022 Task: 27013 Depends-On: https://review.openstack.org/#/c/624452/ Change-Id: I0d6fac17cb5b7fa1e2cc757ea82b7c0385b9a6ee Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
parent
549d54a262
commit
787c7c192d
@ -35,15 +35,15 @@ then
|
||||
fi
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
|
||||
COMPUTE_RESERVED_FILE=/etc/nova/compute_reserved.conf
|
||||
WORKER_RESERVED_FILE=/etc/platform/worker_reserved.conf
|
||||
SM_PLATFORM_CORES_FILE=/var/run/sm/.platform_cores
|
||||
|
||||
export PATH
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f $COMPUTE_RESERVED_FILE ]; then
|
||||
. $COMPUTE_RESERVED_FILE
|
||||
if [ -f $WORKER_RESERVED_FILE ]; then
|
||||
. $WORKER_RESERVED_FILE
|
||||
mkdir /var/run/sm -p
|
||||
echo $PLATFORM_CPU_LIST > $SM_PLATFORM_CORES_FILE
|
||||
fi
|
||||
|
@ -73,26 +73,26 @@ def main():
|
||||
six.print_(" state: %s" % sg_state, file=f)
|
||||
six.print_(" notification: %s" % sg_notification, file=f)
|
||||
|
||||
# Script to start/stop compute services. Called here for CPE upgrade
|
||||
# Script to start/stop worker services. Called here for CPE upgrade
|
||||
# support. Scripts will be run in a separate process so it does not
|
||||
# block sm.
|
||||
if 'compute' in tsconfig.subfunctions:
|
||||
compute_services_script = "/etc/init.d/compute_services"
|
||||
if 'worker' in tsconfig.subfunctions:
|
||||
worker_services_script = "/etc/init.d/worker_services"
|
||||
if sg_name == 'vim-services':
|
||||
if sg_desired_state == "active" and sg_state == "active":
|
||||
if want_log_file:
|
||||
with open(sm_log_file, 'a') as f:
|
||||
six.print_("Called script: %s start" %
|
||||
compute_services_script, file=f)
|
||||
subprocess.Popen([compute_services_script, "start"])
|
||||
worker_services_script, file=f)
|
||||
subprocess.Popen([worker_services_script, "start"])
|
||||
elif sg_aggregate_state == "go-standby" \
|
||||
and sg_desired_state == "standby" \
|
||||
and sg_state == "standby":
|
||||
if want_log_file:
|
||||
with open(sm_log_file, 'a') as f:
|
||||
six.print_("Called script: %s stop" %
|
||||
compute_services_script, file=f)
|
||||
subprocess.Popen([compute_services_script, "stop"])
|
||||
worker_services_script, file=f)
|
||||
subprocess.Popen([worker_services_script, "stop"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -11,7 +11,7 @@ case "$1" in
|
||||
|
||||
stop)
|
||||
. /etc/platform/platform.conf
|
||||
if [[ "$subfunction" == "controller,compute"* ]]; then
|
||||
if [[ "$subfunction" == "controller,worker"* ]]; then
|
||||
# Trigger logout of iSCSI connections to avoid shutdown race condition
|
||||
/sbin/iscsiadm -m node --logoutall=all
|
||||
fi
|
||||
|
@ -163,14 +163,14 @@ SmErrorT sm_node_utils_is_aio( bool* is_aio )
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
// Node Utilities - Sub-Functions Has Compute
|
||||
// Node Utilities - Sub-Functions Has Worker
|
||||
// ==========================================
|
||||
SmErrorT sm_node_utils_sub_function_has_compute( bool* has_compute )
|
||||
SmErrorT sm_node_utils_sub_function_has_worker( bool* has_worker )
|
||||
{
|
||||
char sub_functions[SM_NODE_SUB_FUNCTIONS_MAX_CHAR+1] = "";
|
||||
SmErrorT error;
|
||||
|
||||
*has_compute = false;
|
||||
*has_worker = false;
|
||||
|
||||
error = sm_node_utils_get_sub_functions( sub_functions );
|
||||
if( SM_OKAY != error )
|
||||
@ -180,9 +180,9 @@ SmErrorT sm_node_utils_sub_function_has_compute( bool* has_compute )
|
||||
return( error );
|
||||
}
|
||||
|
||||
if( NULL != strstr( sub_functions, "compute" ) )
|
||||
if( NULL != strstr( sub_functions, "worker" ) )
|
||||
{
|
||||
*has_compute = true;
|
||||
*has_worker = true;
|
||||
}
|
||||
|
||||
return( SM_OKAY );
|
||||
|
@ -29,7 +29,7 @@ extern SmErrorT sm_node_utils_is_aio( bool* is_aio );
|
||||
// ****************************************************************************
|
||||
// Node Utilities - Sub-Functions Has Compute
|
||||
// ==========================================
|
||||
extern SmErrorT sm_node_utils_sub_function_has_compute( bool* has_compute );
|
||||
extern SmErrorT sm_node_utils_sub_function_has_worker( bool* has_worker );
|
||||
// ****************************************************************************
|
||||
|
||||
// ****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user