diff --git a/service-mgmt/sm-1.0.0/scripts/sm b/service-mgmt/sm-1.0.0/scripts/sm index fa51152c..c2b221ce 100755 --- a/service-mgmt/sm-1.0.0/scripts/sm +++ b/service-mgmt/sm-1.0.0/scripts/sm @@ -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 diff --git a/service-mgmt/sm-1.0.0/scripts/sm.notification b/service-mgmt/sm-1.0.0/scripts/sm.notification index cf082234..942d8729 100644 --- a/service-mgmt/sm-1.0.0/scripts/sm.notification +++ b/service-mgmt/sm-1.0.0/scripts/sm.notification @@ -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__': diff --git a/service-mgmt/sm-1.0.0/scripts/sm.shutdown b/service-mgmt/sm-1.0.0/scripts/sm.shutdown index 4d7764dd..ddebfb7c 100644 --- a/service-mgmt/sm-1.0.0/scripts/sm.shutdown +++ b/service-mgmt/sm-1.0.0/scripts/sm.shutdown @@ -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 diff --git a/service-mgmt/sm-common-1.0.0/src/sm_node_utils.c b/service-mgmt/sm-common-1.0.0/src/sm_node_utils.c index d4d14792..e7411864 100644 --- a/service-mgmt/sm-common-1.0.0/src/sm_node_utils.c +++ b/service-mgmt/sm-common-1.0.0/src/sm_node_utils.c @@ -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 ); diff --git a/service-mgmt/sm-common-1.0.0/src/sm_node_utils.h b/service-mgmt/sm-common-1.0.0/src/sm_node_utils.h index 16fb34f8..b2645e94 100644 --- a/service-mgmt/sm-common-1.0.0/src/sm_node_utils.h +++ b/service-mgmt/sm-common-1.0.0/src/sm_node_utils.h @@ -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 ); // **************************************************************************** // ****************************************************************************