MCPcopy Create free account
hub / github.com/corosync/corosync / force_gather_notify_fn

Function force_gather_notify_fn

exec/main.c:1002–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000}
1001
1002static void force_gather_notify_fn(
1003 int32_t event,
1004 const char *key_name,
1005 struct icmap_notify_value new_val,
1006 struct icmap_notify_value old_val,
1007 void *user_data)
1008{
1009 char *key_val;
1010
1011 if (icmap_get_string(key_name, &key_val) == CS_OK && strcmp(key_val, "no") == 0)
1012 goto out;
1013
1014 icmap_set_string("runtime.force_gather", "no");
1015
1016 if (strcmp(key_name, "runtime.force_gather") == 0) {
1017 log_printf(LOGSYS_LEVEL_ERROR, "Forcing into GATHER state\n");
1018 totempg_force_gather();
1019 }
1020
1021out:
1022 free(key_val);
1023}
1024
1025static void corosync_force_gather_init (void)
1026{

Callers

nothing calls this directly

Calls 3

icmap_get_stringFunction · 0.85
icmap_set_stringFunction · 0.85
totempg_force_gatherFunction · 0.85

Tested by

no test coverage detected