Skip to content

Commit 22a99d8

Browse files
Ken Gaillotnrwahl2
authored andcommitted
Refactor: controller: rename controld_delete_node_state()
... to controld_delete_node_history(), and controld_node_state_deletion_strings() to controld_node_history_deletion_strings(), since they only delete history now
1 parent a268941 commit 22a99d8

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

daemons/controld/controld_cib.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ cib_delete_callback(xmlNode *msg, int call_id, int rc, xmlNode *output,
287287
* \param[out] desc If not NULL, where to store loggable description
288288
*/
289289
void
290-
controld_node_state_deletion_strings(const char *uname, bool unlocked_only,
291-
char **xpath, char **desc)
290+
controld_node_history_deletion_strings(const char *uname, bool unlocked_only,
291+
char **xpath, char **desc)
292292
{
293293
const char *desc_pre = NULL;
294294

@@ -319,7 +319,7 @@ controld_node_state_deletion_strings(const char *uname, bool unlocked_only,
319319
* \param[in] options CIB call options to use
320320
*/
321321
void
322-
controld_delete_node_state(const char *uname, bool unlocked_only, int options)
322+
controld_delete_node_history(const char *uname, bool unlocked_only, int options)
323323
{
324324
cib_t *cib = controld_globals.cib_conn;
325325
char *xpath = NULL;
@@ -328,7 +328,7 @@ controld_delete_node_state(const char *uname, bool unlocked_only, int options)
328328

329329
pcmk__assert((uname != NULL) && (cib != NULL));
330330

331-
controld_node_state_deletion_strings(uname, unlocked_only, &xpath, &desc);
331+
controld_node_history_deletion_strings(uname, unlocked_only, &xpath, &desc);
332332
cib__set_call_options(options, "node state deletion",
333333
cib_xpath|cib_multiple);
334334
cib_rc = cib->cmds->remove(cib, xpath, NULL, options);

daemons/controld/controld_cib.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ int controld_update_cib(const char *section, xmlNode *data, int options,
4646
void *));
4747
unsigned int cib_op_timeout(void);
4848

49-
void controld_node_state_deletion_strings(const char *uname, bool unlocked_only,
50-
char **xpath, char **desc);
51-
void controld_delete_node_state(const char *uname, bool unlocked_only,
52-
int options);
49+
void controld_node_history_deletion_strings(const char *uname,
50+
bool unlocked_only,
51+
char **xpath, char **desc);
52+
void controld_delete_node_history(const char *uname, bool unlocked_only,
53+
int options);
5354
int controld_delete_resource_history(const char *rsc_id, const char *node,
5455
const char *user_name, int call_options);
5556

daemons/controld/controld_execd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ force_reprobe(lrm_state_t *lrm_state, const char *from_sys,
10711071
}
10721072

10731073
/* Now delete the copy in the CIB */
1074-
controld_delete_node_state(lrm_state->node_name, false, cib_none);
1074+
controld_delete_node_history(lrm_state->node_name, false, cib_none);
10751075
}
10761076

10771077
/*!

daemons/controld/controld_fencing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ update_node_state_after_fencing(const char *target, const char *target_xml_id)
248248
fsa_register_cib_callback(rc, pcmk__str_copy(target), cib_fencing_updated);
249249

250250
// Delete node's resource history from CIB
251-
controld_delete_node_state(peer->name, false, cib_none);
251+
controld_delete_node_history(peer->name, false, cib_none);
252252

253253
// Ask attribute manager to delete node's transient attributes
254254
// @TODO: This is the only call to controld_purge_node_attrs that doesn't

daemons/controld/controld_join_dc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ do_dc_join_ack(long long action, enum crmd_fsa_cause cause,
824824
}
825825

826826
// Delete relevant parts of node's current executor state from CIB
827-
controld_node_state_deletion_strings(join_from, unlocked_only, &xpath,
828-
NULL);
827+
controld_node_history_deletion_strings(join_from, unlocked_only, &xpath,
828+
NULL);
829829

830830
rc = cib->cmds->remove(cib, xpath, NULL,
831831
cib_xpath|cib_multiple|cib_transaction);

daemons/controld/controld_remote_ra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ purge_remote_node_attrs(int call_opt, pcmk__node_status_t *node)
213213
controld_purge_node_attrs(node->name, true);
214214
}
215215

216-
controld_delete_node_state(node->name, unlocked_only, call_opt);
216+
controld_delete_node_history(node->name, unlocked_only, call_opt);
217217
}
218218

219219
/*!
@@ -322,7 +322,7 @@ remote_node_down(const char *node_name, const enum down_opts opts)
322322
* think resources are still running on the node.
323323
*/
324324
if (opts == DOWN_ERASE_LRM) {
325-
controld_delete_node_state(node_name, false, call_opt);
325+
controld_delete_node_history(node_name, false, call_opt);
326326
}
327327

328328
/* Ensure node is in the remote peer cache with lost state */

0 commit comments

Comments
 (0)