summaryrefslogtreecommitdiffstats
path: root/daemons/schedulerd/schedulerd_messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/schedulerd/schedulerd_messages.c')
-rw-r--r--daemons/schedulerd/schedulerd_messages.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/daemons/schedulerd/schedulerd_messages.c b/daemons/schedulerd/schedulerd_messages.c
index 1c124d2..5a97365 100644
--- a/daemons/schedulerd/schedulerd_messages.c
+++ b/daemons/schedulerd/schedulerd_messages.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2022 the Pacemaker project contributors
+ * Copyright 2004-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -22,12 +22,12 @@
static GHashTable *schedulerd_handlers = NULL;
-static pe_working_set_t *
+static pcmk_scheduler_t *
init_working_set(void)
{
- pe_working_set_t *data_set = pe_new_working_set();
+ pcmk_scheduler_t *scheduler = pe_new_working_set();
- CRM_ASSERT(data_set != NULL);
+ CRM_ASSERT(scheduler != NULL);
crm_config_error = FALSE;
crm_config_warning = FALSE;
@@ -35,8 +35,8 @@ init_working_set(void)
was_processing_error = FALSE;
was_processing_warning = FALSE;
- data_set->priv = logger_out;
- return data_set;
+ scheduler->priv = logger_out;
+ return scheduler;
}
static xmlNode *
@@ -72,7 +72,7 @@ handle_pecalc_request(pcmk__request_t *request)
xmlNode *reply = NULL;
bool is_repoke = false;
bool process = true;
- pe_working_set_t *data_set = init_working_set();
+ pcmk_scheduler_t *scheduler = init_working_set();
pcmk__ipc_send_ack(request->ipc_client, request->ipc_id, request->ipc_flags,
"ack", NULL, CRM_EX_INDETERMINATE);
@@ -81,9 +81,9 @@ handle_pecalc_request(pcmk__request_t *request)
CRM_FEATURE_SET);
converted = copy_xml(xml_data);
if (!cli_config_update(&converted, NULL, TRUE)) {
- data_set->graph = create_xml_node(NULL, XML_TAG_GRAPH);
- crm_xml_add_int(data_set->graph, "transition_id", 0);
- crm_xml_add_int(data_set->graph, "cluster-delay", 0);
+ scheduler->graph = create_xml_node(NULL, XML_TAG_GRAPH);
+ crm_xml_add_int(scheduler->graph, "transition_id", 0);
+ crm_xml_add_int(scheduler->graph, "cluster-delay", 0);
process = false;
free(digest);
@@ -98,9 +98,9 @@ handle_pecalc_request(pcmk__request_t *request)
if (process) {
pcmk__schedule_actions(converted,
- pe_flag_no_counts
- |pe_flag_no_compat
- |pe_flag_show_utilization, data_set);
+ pcmk_sched_no_counts
+ |pcmk_sched_no_compat
+ |pcmk_sched_show_utilization, scheduler);
}
// Get appropriate index into series[] array
@@ -112,7 +112,7 @@ handle_pecalc_request(pcmk__request_t *request)
series_id = 2;
}
- value = pe_pref(data_set->config_hash, series[series_id].param);
+ value = pe_pref(scheduler->config_hash, series[series_id].param);
if ((value == NULL)
|| (pcmk__scan_min_int(value, &series_wrap, -1) != pcmk_rc_ok)) {
series_wrap = series[series_id].wrap;
@@ -126,8 +126,8 @@ handle_pecalc_request(pcmk__request_t *request)
crm_trace("Series %s: wrap=%d, seq=%u, pref=%s",
series[series_id].name, series_wrap, seq, value);
- data_set->input = NULL;
- reply = create_reply(msg, data_set->graph);
+ scheduler->input = NULL;
+ reply = create_reply(msg, scheduler->graph);
if (reply == NULL) {
pcmk__format_result(&request->result, CRM_EX_ERROR, PCMK_EXEC_ERROR,
@@ -172,7 +172,7 @@ handle_pecalc_request(pcmk__request_t *request)
done:
free_xml(converted);
- pe_free_working_set(data_set);
+ pe_free_working_set(scheduler);
return reply;
}