icmap_set_ro_access("totem.netmtu", CS_FALSE, CS_TRUE);
icmap_set_ro_access("qb.ipc_type", CS_FALSE, CS_TRUE);
icmap_set_ro_access("config.reload_in_progress", CS_FALSE, CS_TRUE);
+ icmap_set_ro_access("config.totemconfig_reload_in_progress", CS_FALSE, CS_TRUE);
}
static void main_service_ready (void)
*/
totem_volatile_config_read(totem_config, NULL);
+ icmap_set_uint8("config.totemconfig_reload_in_progress", 0);
+
add_totem_config_notification(totem_config);
return 0;
if (local_node_pos != -1) {
icmap_set_uint32("nodelist.local_node_pos", local_node_pos);
}
+
+ icmap_set_uint8("config.totemconfig_reload_in_progress", 0);
+ } else {
+ icmap_set_uint8("config.totemconfig_reload_in_progress", 1);
}
}
void *user_data)
{
int old_votes, old_expected_votes;
+ uint8_t reloading;
ENTER();
+ /*
+ * If a full reload is in progress then don't do anything until it's done and
+ * can reconfigure it all atomically
+ */
+ if (icmap_get_uint8("config.totemconfig_reload_in_progress", &reloading) == CS_OK && reloading) {
+ return ;
+ }
+
old_votes = us->votes;
old_expected_votes = us->expected_votes;
{
icmap_track_t icmap_track_nodelist = NULL;
icmap_track_t icmap_track_quorum = NULL;
+ icmap_track_t icmap_track_reload = NULL;
ENTER();
NULL,
&icmap_track_quorum);
+ icmap_track_add("config.totemconfig_reload_in_progress",
+ ICMAP_TRACK_ADD | ICMAP_TRACK_MODIFY,
+ votequorum_refresh_config,
+ NULL,
+ &icmap_track_reload);
+
LEAVE();
}
to do atomic reconfiguration rather than changing each key. Note that
individual add/change/delete notifications will still be sent during a reload.
+.TP
+config.totemconfig_reload_in_progress
+This key is similar to
+.B config.totemconfig_reload_in_progress
+but changed after totem config trigger is processed. It is useful (mainly)
+for situations when
+.B nodelist.local_node_pos
+must be first correctly reinstated.
+
.SH DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
Is very same as in configuration file. To add UID 500 use