diff --git a/exec/main.c b/exec/main.c index 0edd4bf2..e423c97d 100644 --- a/exec/main.c +++ b/exec/main.c @@ -1061,6 +1061,7 @@ static void set_icmap_ro_keys_flag (void) icmap_set_ro_access("runtime.connections.", CS_TRUE, CS_TRUE); icmap_set_ro_access("runtime.totem.", CS_TRUE, CS_TRUE); icmap_set_ro_access("runtime.services.", CS_TRUE, CS_TRUE); + icmap_set_ro_access("runtime.config.", CS_TRUE, CS_TRUE); /* * Set RO flag for constrete keys of configuration which can't be changed diff --git a/exec/totemconfig.c b/exec/totemconfig.c index abaabdf8..daf07193 100644 --- a/exec/totemconfig.c +++ b/exec/totemconfig.c @@ -142,12 +142,21 @@ static void totem_volatile_config_set_value (struct totem_config *totem_config, const char *key_name, const char *deleted_key, unsigned int default_value, int allow_zero_value) { + char runtime_key_name[ICMAP_KEYNAME_MAXLEN]; if (icmap_get_uint32(key_name, totem_get_param_by_name(totem_config, key_name)) != CS_OK || (deleted_key != NULL && strcmp(deleted_key, key_name) == 0) || (!allow_zero_value && *totem_get_param_by_name(totem_config, key_name) == 0)) { *totem_get_param_by_name(totem_config, key_name) = default_value; } + + /* + * Store totem_config value to cmap runtime section + */ + strcpy(runtime_key_name, "runtime.config."); + strcat(runtime_key_name, key_name); + + icmap_set_uint32(runtime_key_name, *totem_get_param_by_name(totem_config, key_name)); } @@ -169,6 +178,11 @@ static void totem_volatile_config_read (struct totem_config *totem_config, const u32 = TOKEN_COEFFICIENT; icmap_get_uint32("totem.token_coefficient", &u32); totem_config->token_timeout += (totem_config->interfaces[0].member_count - 2) * u32; + + /* + * Store totem_config value to cmap runtime section + */ + icmap_set_uint32("runtime.config.totem.token", totem_config->token_timeout); } totem_volatile_config_set_value(totem_config, "totem.max_network_delay", deleted_key, MAX_NETWORK_DELAY, 0); diff --git a/man/cmap_keys.8 b/man/cmap_keys.8 index bda6615d..f19d2c98 100644 --- a/man/cmap_keys.8 +++ b/man/cmap_keys.8 @@ -131,6 +131,14 @@ contains the total number of interrupted sends. .B service_id contains the ID of service which the IPC is connected to. +.TP +runtime.config.* +Contains the values actually in use by the totem membership protocol. +Values here are either taken from the Corosync configuration file, +defaults or computed from entries in the config file. For information +on individual keys please refer to the man page +.BR corosync.conf (5). + .TP runtime.services.* Prefix with statistics for service engines. Each service has it's own