Module cartridge.confapplier
Configuration management primitives.
Implements the internal state machine which helps to manage cluster
operation and protects from invalid state transitions.
get_readonly ([section_name])
Get a read-only view on the clusterwide configuration.
Returns either conf[section_name]
or entire conf
.
Any attempt to modify the section or its children
will raise an error.
Parameters:
- section_name: (string) (optional)
Returns:
(table)
get_deepcopy ([section_name])
Get a read-write deep copy of the clusterwide configuration.
Returns either conf[section_name]
or entire conf
.
Changing it has no effect
unless it’s used to patch clusterwide configuration.
Parameters:
- section_name: (string) (optional)
Returns:
(table)
Perform state transition.
Parameters:
- state: (string) New state
- err: (optional)
Returns:
(nil)
wish_state (state[, timeout])
Make a wish for meeting desired state.
Parameters:
- state: (string) Desired state.
- timeout: (number) (optional)
Returns:
(string) Final state, may differ from desired.
validate_config (clusterwide_config_new)
Validate configuration by all roles.
Parameters:
- clusterwide_config_new: (table)
Returns:
(boolean) true
Or
(nil)
(table) Error description
Restart replication from topology on the current node.
apply_config (clusterwide_config)
Apply the role configuration.
Parameters:
- clusterwide_config: (table)
Returns:
(boolean) true
Or
(nil)
(table) Error description