Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ae9a754
Refactor: libcrmcommon: Use bool for crm_trigger_t:running
nrwahl2 Apr 21, 2026
e880914
Refactor: libcrmcommon: Use bool for crm_trigger_t:trigger
nrwahl2 Apr 21, 2026
624f79b
Refactor: libcrmcommon: Best practices for child_free()
nrwahl2 Aug 12, 2026
cf1b668
Refactor: libcrmcommon: Use bool for mainloop_child_t:timeout
nrwahl2 Aug 12, 2026
67590c3
Refactor: libcrmcommon: Best practices for mainloop_child_add_with_flags
nrwahl2 Aug 12, 2026
ef61e5c
Refactor: libcrmcommon: Best practices for child_signal_init()
nrwahl2 Aug 12, 2026
8486d01
Doc: libcrmcommon: Document struct mainloop_child_s
nrwahl2 Aug 12, 2026
bbf7369
Refactor: libcrmcommon: Rename mainloop_child_t:timerid to timer_id
nrwahl2 Aug 12, 2026
c64f173
Refactor: libcrmcommon: Rename mainloop_child_t:timeout to timed_out
nrwahl2 Aug 12, 2026
be572ab
Refactor: libcrmcommon: Rename mainloop_child_t:privatedata to user_data
nrwahl2 Aug 12, 2026
b5b3e49
Refactor: libcrmcommon: Replace mainloop_child_t:flags with kill_group
nrwahl2 Aug 12, 2026
09e3fc5
Refactor: pacemakerd: Drop mainloop_child_name() internally
nrwahl2 Aug 12, 2026
7ff8c3f
Refactor: libcrmservice: Drop mainloop_child_timeout() internally
nrwahl2 Aug 12, 2026
937f6e3
Refactor: various: Drop mainloop_child_userdata() internally
nrwahl2 Aug 12, 2026
d7e043d
Refactor: libcrmservice: Drop mainloop_clear_child_userdata() internally
nrwahl2 Aug 12, 2026
fb1e807
Refactor: libcrmcommon: New compare_children_by_pid()
nrwahl2 Aug 12, 2026
f83391b
Refactor: libcrmcommon: Use g_list_delete_link() in mainloop_child_kill
nrwahl2 Aug 13, 2026
5a105f3
Doc: libcrmcommon: Add Doxygen for mainloop_child_kill()
nrwahl2 Aug 12, 2026
26393f7
Refactor: libcrmcommon: Best practices in child_timeout_callback()
nrwahl2 Aug 13, 2026
2c952da
Refactor: libcrmcommon: Drop five-second hung child check
nrwahl2 Aug 13, 2026
04b1024
Refactor: libcrmcommon: Always set timed_out in child_timeout_callback()
nrwahl2 Aug 13, 2026
786738b
Refactor: libcrmcommon: Clean up child_kill_helper()
nrwahl2 Aug 13, 2026
a5bbf75
Refactor: libcrmcommon: Clean up child_death_dispatch()
nrwahl2 Aug 13, 2026
f9037f4
Refactor: libcrmcommon: Move duplicated functionality to child_waitpid()
nrwahl2 Aug 13, 2026
589a217
Refactor: libcrmcommon: CRM_CHECK() else case in child_waitpid()
nrwahl2 Aug 13, 2026
8f04db4
Refactor: libcrmcommon: child_waitpid() takes a bool argument
nrwahl2 Aug 13, 2026
767f966
Log: libcrmcommon: child_waitpid() logs more specific messages
nrwahl2 Aug 14, 2026
b6221c6
Low: libcrmcommon: Fix core dumped logic in child_waitpid()
nrwahl2 Aug 14, 2026
8985333
Low: libcrmcommon: Don't set signo/exitcode for nonpositive child->pid
nrwahl2 Aug 14, 2026
273ab09
Doc: libcrmcommon: Add Doxygen to child_waitpid()
nrwahl2 Aug 14, 2026
40fb285
Low: libcrmcommon: Fix child_waitpid() return values
nrwahl2 Aug 14, 2026
7657ae3
Low: libcrmcommon: Don't set signo to SIGCHLD for waitpid() ECHILD
nrwahl2 Aug 14, 2026
437c07b
Refactor: libcrmcommon: New pcmk__main_loop_child_create()
nrwahl2 Aug 14, 2026
6f38b70
Refactor: libcrmservice: Use bool variable in services_action_cancel()
nrwahl2 Aug 14, 2026
bed681b
Refactor: libcrmcommon: New pcmk__main_loop_child_kill()
nrwahl2 Aug 14, 2026
1d0b82c
API: libcrmcommon: Deprecate mainloop_child_t API
nrwahl2 Aug 15, 2026
840bbec
Refactor: libcrmcommon: Make free_main_loop_child() a GDestroyNotify
nrwahl2 Aug 15, 2026
051ca95
Refactor: libcrmcommon: Reorder some mainloop.c functions
nrwahl2 Aug 15, 2026
1df7e28
Refactor: libcrmcommon: Move pcmk__mainloop_child_exit_fn_t
nrwahl2 Aug 15, 2026
4de76fc
Refactor: libcrmcommon: mainloop_child_t -> pcmk__main_loop_child_t
nrwahl2 Aug 15, 2026
a96a196
Refactor: libcrmcommon: Rename pcmk__mainloop_child_exit_fn_t
nrwahl2 Aug 15, 2026
db80ae4
Refactor: libcrmcommon: Rename pcmk__main_loop_child_t:exit_fn
nrwahl2 Aug 15, 2026
f692591
Refactor: libcrmcommon: Drop pcmk__mainloop_timer_get_period()
nrwahl2 Aug 15, 2026
f699c94
Refactor: libcrmcommon: Lightly reformat main loop timer functions
nrwahl2 Aug 15, 2026
eb9c522
Refactor: libcrmcommon: Don't start main loop timer if callback is NULL
nrwahl2 Aug 17, 2026
3991bf9
Refactor: libcrmcommon: Drop repeat variable from mainloop_timer_cb()
nrwahl2 Aug 17, 2026
2a47ae9
Refactor: various: Always pass repeat=true to mainloop_timer_add()
nrwahl2 Aug 17, 2026
cca1f56
Refactor: various: Use G_SOURCE_{CONTINUE,REMOVE} in GSourceFuncs
nrwahl2 Aug 15, 2026
b0200f1
Refactor: controller: Drop fsa_timer_t:callback
nrwahl2 Aug 17, 2026
abcdf2e
Refactor: controller: Drop redundant inits in controld_init_fsa_timers()
nrwahl2 Aug 17, 2026
70dfac4
Refactor: controller: controld_init_fsa_timers() returns void
nrwahl2 Aug 17, 2026
2c186de
Refactor: controller: Drop overridden set of finalization timer input
nrwahl2 Aug 17, 2026
de2b2b6
Refactor: controller: Drop get_timer_desc()
nrwahl2 Aug 17, 2026
8fd6ebe
Refactor: controller: New new_fsa_timer()
nrwahl2 Aug 17, 2026
8876cdc
Refactor: controller: New free_fsa_timer()
nrwahl2 Aug 17, 2026
245d5d3
Refactor: attrd, pacemakerd: Rename two main loop timers
nrwahl2 Aug 18, 2026
aa00961
Refactor: libcrmcommon: New pcmk__main_loop_timer_new()
nrwahl2 Aug 18, 2026
c0226e3
Refactor: libcrmcommon: New pcmk__main_loop_timer_running()
nrwahl2 Aug 18, 2026
2c3f5e1
Refactor: libcrmcommon: New pcmk__main_loop_timer_free()
nrwahl2 Aug 18, 2026
5d3aa11
Refactor: various: Drop mainloop_timer_set_period() internally
nrwahl2 Aug 18, 2026
22e782b
Refactor: fencer: Drop dead code from get_agent_metadata_cb()
nrwahl2 Aug 18, 2026
454fef1
Refactor: libcrmcommon: New pcmk__main_loop_timer_start()
nrwahl2 Aug 18, 2026
c2f5eaf
Refactor: libcrmcommon: New pcmk__main_loop_timer_stop()
nrwahl2 Aug 18, 2026
bf19a0c
Refactor: libcrmcommon: New main_loop_timer_cb()
nrwahl2 Aug 18, 2026
8280f33
Refactor: controller: Use "interval" instead of "period" for timers
nrwahl2 Aug 18, 2026
4541343
Refactor: libcrmcommon: Use "interval" instead of "period" for timers
nrwahl2 Aug 18, 2026
2ed962f
Refactor: libcrmcommon: Rename mainloop_timer_t:userdata to user_data
nrwahl2 Aug 18, 2026
cad6acb
Refactor: libcrmcommon: Rename mainloop_timer_t:id to source_id
nrwahl2 Aug 18, 2026
cafad30
Refactor: libcrmcommon: New pcmk__main_loop_timer_t
nrwahl2 Aug 18, 2026
85bd3ea
API: libcrmcommon: Deprecate mainloop_timer_t API
nrwahl2 Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion daemons/attrd/attrd_attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ attrd_create_attribute(xmlNode *xml)
const char *dampen_s = pcmk__xe_get(xml, PCMK__XA_ATTR_DAMPENING);
attribute_t *a = NULL;

pcmk__assert(name != NULL);

if (set_type == NULL) {
set_type = PCMK_XE_INSTANCE_ATTRIBUTES;
}
Expand Down Expand Up @@ -97,7 +99,7 @@ attrd_update_dampening(attribute_t *a, xmlNode *xml, const char *attr)
}

if (a->timeout_ms != dampen) {
mainloop_timer_del(a->timer);
pcmk__main_loop_timer_free(a->timer);
a->timeout_ms = (int) QB_MIN(dampen, INT_MAX);
if (dampen > 0) {
a->timer = attrd_add_timer(attr, a->timeout_ms, a);
Expand Down
18 changes: 9 additions & 9 deletions daemons/attrd/attrd_cib.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ attribute_timer_cb(void *data)
attribute_t *a = data;
pcmk__trace("Dampen interval expired for %s", a->id);
attrd_write_or_elect_attribute(a);
return FALSE;
return G_SOURCE_REMOVE;
}

static void
Expand Down Expand Up @@ -270,7 +270,7 @@ attrd_cib_callback(xmlNode *msg, int call_id, int rc, xmlNode *output, void *use
last_cib_op_done = call_id;
if (a->timer && !a->timeout_ms) {
// Remove temporary dampening for failed writes
g_clear_pointer(&a->timer, mainloop_timer_del);
g_clear_pointer(&a->timer, pcmk__main_loop_timer_free);
}
break;

Expand Down Expand Up @@ -319,18 +319,18 @@ attrd_cib_callback(xmlNode *msg, int call_id, int rc, xmlNode *output, void *use
*/
} else if (a->timer) {
// Attribute has a dampening value, so use that as delay
if (!mainloop_timer_running(a->timer)) {
if (!pcmk__main_loop_timer_running(a->timer)) {
pcmk__trace("Delayed re-attempted write for %s by %s",
name, pcmk__readable_interval(a->timeout_ms));
mainloop_timer_start(a->timer);
pcmk__main_loop_timer_start(a->timer);
}
} else {
/* Set a temporary dampening of 2 seconds (timer will continue
* to exist until the attribute's dampening gets set or the
* write succeeds).
*/
a->timer = attrd_add_timer(a->id, 2000, a);
mainloop_timer_start(a->timer);
pcmk__main_loop_timer_start(a->timer);
}
}
}
Expand Down Expand Up @@ -489,10 +489,10 @@ set_alert_attribute_value(GHashTable *t, attribute_value_t *v)
g_hash_table_replace(t, a_v->nodename, a_v);
}

mainloop_timer_t *
pcmk__main_loop_timer_t *
attrd_add_timer(const char *id, int timeout_ms, attribute_t *attr)
{
return mainloop_timer_add(id, timeout_ms, FALSE, attribute_timer_cb, attr);
return pcmk__main_loop_timer_new(id, timeout_ms, attribute_timer_cb, attr);
}

/*!
Expand Down Expand Up @@ -536,9 +536,9 @@ write_attribute(attribute_t *a, bool ignore_delay)
a->id, a->update);
goto done;

} else if (mainloop_timer_running(a->timer)) {
} else if (pcmk__main_loop_timer_running(a->timer)) {
if (ignore_delay) {
mainloop_timer_stop(a->timer);
pcmk__main_loop_timer_stop(a->timer);
pcmk__debug("Overriding '%s' write delay", a->id);
} else {
pcmk__info("Delaying write of '%s'", a->id);
Expand Down
2 changes: 1 addition & 1 deletion daemons/attrd/attrd_corosync.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ update_attr_on_host(attribute_t *a, const pcmk__node_status_t *peer,
if (a->timeout_ms && a->timer) {
pcmk__trace("Delaying write of %s %s for dampening", attr,
pcmk__readable_interval(a->timeout_ms));
mainloop_timer_start(a->timer);
pcmk__main_loop_timer_start(a->timer);
} else {
attrd_write_or_elect_attribute(a);
}
Expand Down
9 changes: 5 additions & 4 deletions daemons/attrd/attrd_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct confirmation_action {
* \brief A timer that will be used to remove the client should it time out
* before receiving all confirmations
*/
mainloop_timer_t *timer;
pcmk__main_loop_timer_t *timer;

/*!
* \brief A function to run when all confirmations have been received
Expand Down Expand Up @@ -341,7 +341,7 @@ free_action(void *data)
{
struct confirmation_action *action = (struct confirmation_action *) data;
g_list_free_full(action->respondents, free);
mainloop_timer_del(action->timer);
pcmk__main_loop_timer_free(action->timer);
pcmk__xml_free(action->xml);
free(action->client_id);
free(action);
Expand Down Expand Up @@ -513,8 +513,9 @@ attrd_expect_confirmations(pcmk__request_t *request, attrd_confirmation_action_f
action->ipc_id = request->ipc_id;
action->flags = request->flags;

action->timer = mainloop_timer_add(NULL, 15000, FALSE, confirmation_timeout_cb, action);
mainloop_timer_start(action->timer);
action->timer = pcmk__main_loop_timer_new("attrd_confirmation", 15000,
confirmation_timeout_cb, action);
pcmk__main_loop_timer_start(action->timer);

pcmk__intkey_table_insert(expected_confirmations, callid, action);
pcmk__trace("Callid %d now waiting on %u confirmations", callid,
Expand Down
2 changes: 1 addition & 1 deletion daemons/attrd/attrd_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ attrd_free_attribute(void *data)
free(a->set_type);
free(a->user);

mainloop_timer_del(a->timer);
pcmk__main_loop_timer_free(a->timer);
g_hash_table_destroy(a->values);

free(a);
Expand Down
5 changes: 3 additions & 2 deletions daemons/attrd/pacemaker-attrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ typedef struct {
int timeout_ms; // How long to wait for more changes before writing
uint32_t flags; // Group of enum attrd_attr_flags
GHashTable *values; // Key: node name, value: attribute_value_t
mainloop_timer_t *timer; // Timer to use for timeout_ms
pcmk__main_loop_timer_t *timer; // Timer to use for timeout_ms
} attribute_t;

#define attrd_set_attr_flags(attr, flags_to_set) do { \
Expand Down Expand Up @@ -236,7 +236,8 @@ extern int minimum_protocol_version;
void attrd_remove_peer_protocol_ver(const char *host);
void attrd_update_minimum_protocol_ver(const char *host, const char *value);

mainloop_timer_t *attrd_add_timer(const char *id, int timeout_ms, attribute_t *attr);
pcmk__main_loop_timer_t *attrd_add_timer(const char *id, int timeout_ms,
attribute_t *attr);

void attrd_unregister_handlers(void);
void attrd_handle_request(pcmk__request_t *request);
Expand Down
10 changes: 5 additions & 5 deletions daemons/based/based_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "pacemaker-based.h"

static mainloop_timer_t *digest_timer = NULL;
static pcmk__main_loop_timer_t *digest_timer = NULL;
static long long ping_seq = 0;
static char *ping_digest = NULL;
static bool ping_modified_since = false;
Expand Down Expand Up @@ -102,8 +102,8 @@ void
based_callbacks_init(void)
{
if (digest_timer == NULL) {
digest_timer = mainloop_timer_add("based_digest_timer", 5000, false,
digest_timer_cb, NULL);
digest_timer = pcmk__main_loop_timer_new("based_digest_timer", 5000,
digest_timer_cb, NULL);
}
}

Expand All @@ -114,7 +114,7 @@ based_callbacks_init(void)
void
based_callbacks_cleanup(void)
{
g_clear_pointer(&digest_timer, mainloop_timer_del);
g_clear_pointer(&digest_timer, pcmk__main_loop_timer_free);
g_clear_pointer(&ping_digest, free);
}

Expand Down Expand Up @@ -566,7 +566,7 @@ based_perform_op_rw(xmlNode *request, const cib__operation_t *operation,
ping_modified_since = true;
}

mainloop_timer_start(digest_timer);
pcmk__main_loop_timer_start(digest_timer);

done:
if (!pcmk__any_flags_set(call_options,
Expand Down
7 changes: 4 additions & 3 deletions daemons/based/based_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ static crm_trigger_t *write_trigger = NULL;
* \internal
* \brief Process the exit status of a child forked from \c write_cib_async()
*
* \param[in] child Mainloop child data
* \param[in] child Main loop child
* \param[in] core If set to 1, the child process dumped core
* \param[in] signo Signal that the child process exited with
* \param[in] exit_code Child process's exit code
*/
static void
write_cib_cb(mainloop_child_t *child, int core, int signo, int exit_code)
write_cib_cb(pcmk__main_loop_child_t *child, int core, int signo, int exit_code)
{
const char *error = "Could not write CIB to disk";

Expand Down Expand Up @@ -113,7 +113,8 @@ write_cib_async(void *user_data)

if (pid > 0) {
// Parent
mainloop_child_add(pid, 0, "disk-writer", NULL, write_cib_cb);
pcmk__main_loop_child_create(pid, "disk-writer", 0, NULL, true,
write_cib_cb);

if (blackbox_state == QB_LOG_STATE_ENABLED) {
qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, QB_TRUE);
Expand Down
4 changes: 1 addition & 3 deletions daemons/controld/controld_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,7 @@ do_startup(long long action, enum crmd_fsa_cause cause,
controld_execd_state_table_init();
controld_remote_proxy_table_init();

if (!controld_init_fsa_timers()) {
register_fsa_error(I_ERROR, msg_data);
}
controld_init_fsa_timers();
}

// \return libqb error code (0 on success, -errno on error)
Expand Down
2 changes: 1 addition & 1 deletion daemons/controld/controld_election.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ controld_configure_election(GHashTable *options)
unsigned int interval_ms = 0;

pcmk_parse_interval_spec(value, &interval_ms);
election_timeout_set_period(controld_globals.cluster, interval_ms);
election_timeout_set_interval(controld_globals.cluster, interval_ms);
}

void
Expand Down
51 changes: 27 additions & 24 deletions daemons/controld/controld_fencing.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ controld_execute_fencing_cleanup(void)
*/

static stonith_t *fencer_api = NULL;
static mainloop_timer_t *controld_fencer_connect_timer = NULL;
static pcmk__main_loop_timer_t *controld_fencer_connect_timer = NULL;
static char *te_client_id = NULL;

static bool
Expand Down Expand Up @@ -443,8 +443,8 @@ destroy_fencer_connection(stonith_t *st, stonith_event_t *e)

if (pcmk__is_set(controld_globals.fsa_input_register, R_ST_REQUIRED)) {
pcmk__err("Lost fencer connection (will attempt to reconnect)");
if (!mainloop_timer_running(controld_fencer_connect_timer)) {
mainloop_timer_start(controld_fencer_connect_timer);
if (!pcmk__main_loop_timer_running(controld_fencer_connect_timer)) {
pcmk__main_loop_timer_start(controld_fencer_connect_timer);
}
} else {
pcmk__info("Disconnected from fencer");
Expand Down Expand Up @@ -674,9 +674,9 @@ controld_timer_fencer_connect(void *user_data)

if (controld_fencer_connect_timer == NULL) {
controld_fencer_connect_timer =
mainloop_timer_add("controld_fencer_connect", 1000,
TRUE, controld_timer_fencer_connect,
GINT_TO_POINTER(TRUE));
pcmk__main_loop_timer_new("controld_fencer_connect", 1000,
controld_timer_fencer_connect,
GINT_TO_POINTER(TRUE));
}

if (rc != pcmk_ok) {
Expand All @@ -686,8 +686,8 @@ controld_timer_fencer_connect(void *user_data)
QB_XS " rc=%d",
pcmk_strerror(rc), rc);

if (!mainloop_timer_running(controld_fencer_connect_timer)) {
mainloop_timer_start(controld_fencer_connect_timer);
if (!pcmk__main_loop_timer_running(controld_fencer_connect_timer)) {
pcmk__main_loop_timer_start(controld_fencer_connect_timer);
}

return G_SOURCE_CONTINUE;
Expand Down Expand Up @@ -735,7 +735,8 @@ controld_disconnect_fencer(bool destroy)
g_clear_pointer(&fencer_api, fencer_api->cmds->free);
}

g_clear_pointer(&controld_fencer_connect_timer, mainloop_timer_del);
g_clear_pointer(&controld_fencer_connect_timer,
pcmk__main_loop_timer_free);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

g_clear_pointer(&te_client_id, free);
}
}
Expand Down Expand Up @@ -1011,19 +1012,21 @@ controld_validate_fencing_watchdog_timeout(const char *value)
*/

static crm_trigger_t *fencing_history_sync_trigger = NULL;
static mainloop_timer_t *fencing_history_sync_timer_short = NULL;
static mainloop_timer_t *fencing_history_sync_timer_long = NULL;
static pcmk__main_loop_timer_t *fencing_history_sync_timer_short = NULL;
static pcmk__main_loop_timer_t *fencing_history_sync_timer_long = NULL;

void
controld_cleanup_fencing_history_sync(stonith_t *st, bool free_timers)
{
if (free_timers) {
g_clear_pointer(&fencing_history_sync_timer_short, mainloop_timer_del);
g_clear_pointer(&fencing_history_sync_timer_long, mainloop_timer_del);
g_clear_pointer(&fencing_history_sync_timer_short,
pcmk__main_loop_timer_free);
g_clear_pointer(&fencing_history_sync_timer_long,
pcmk__main_loop_timer_free);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation on both of these


} else {
mainloop_timer_stop(fencing_history_sync_timer_short);
mainloop_timer_stop(fencing_history_sync_timer_long);
pcmk__main_loop_timer_stop(fencing_history_sync_timer_short);
pcmk__main_loop_timer_stop(fencing_history_sync_timer_long);
}

if (st) {
Expand All @@ -1042,7 +1045,7 @@ static gboolean
fencing_history_sync_set_trigger(void *user_data)
{
mainloop_set_trigger(fencing_history_sync_trigger);
return FALSE;
return G_SOURCE_REMOVE;
}

void
Expand Down Expand Up @@ -1074,24 +1077,24 @@ controld_trigger_fencing_history_sync(bool long_timeout)
if (long_timeout) {
if (fencing_history_sync_timer_long == NULL) {
fencing_history_sync_timer_long =
mainloop_timer_add("history_sync_long", 30000,
FALSE, fencing_history_sync_set_trigger,
NULL);
pcmk__main_loop_timer_new("history_sync_long", 30000,
fencing_history_sync_set_trigger,
NULL);
}
pcmk__info("Fence history will be synchronized cluster-wide within 30 "
"seconds");
mainloop_timer_start(fencing_history_sync_timer_long);
pcmk__main_loop_timer_start(fencing_history_sync_timer_long);

} else {
if (fencing_history_sync_timer_short == NULL) {
fencing_history_sync_timer_short =
mainloop_timer_add("history_sync_short", 5000,
FALSE, fencing_history_sync_set_trigger,
NULL);
pcmk__main_loop_timer_new("history_sync_short", 5000,
fencing_history_sync_set_trigger,
NULL);
}
pcmk__info("Fence history will be synchronized cluster-wide within 5 "
"seconds");
mainloop_timer_start(fencing_history_sync_timer_short);
pcmk__main_loop_timer_start(fencing_history_sync_timer_short);
}

}
Expand Down
Loading