MXS-1929: Take serialization helpers into use in service
The service configuration serialization now uses the helper functions from config.hh. This fixes the failing test mxs1731_old_persisted_config and improves the readability of persisted configuration files. Converted parameters into booleans that were used like booleans. This forced the removal of the automatic enabling of localhost_match_wildcard_host but since it has been enable by default, this change should have no practical effects. In addition to the clarification of the persisted configurations, this change will limit the negative side-effects of changing a configuration value in the main configuration file after a runtime modification has been made. If a value has not been modified at runtime, changes to it in the main configuration will take effect. Previously, a runtime modification prevented all further manual changes to the configuration file. Although in theory this sounds good, in practice this does very little to improve the situation: The only reliable way to change a parameter after a runtime modification is to do it via the REST API (or MaxAdmin).
This commit is contained in:
@ -114,8 +114,8 @@ typedef struct service
|
||||
char user[MAX_SERVICE_USER_LEN]; /**< The user name to use to extract information */
|
||||
char password[MAX_SERVICE_PASSWORD_LEN]; /**< The authentication data requied */
|
||||
SERVICE_STATS stats; /**< The service statistics */
|
||||
int enable_root; /**< Allow root user access */
|
||||
int localhost_match_wildcard_host; /**< Match localhost against wildcard */
|
||||
bool enable_root; /**< Allow root user access */
|
||||
bool localhost_match_wildcard_host; /**< Match localhost against wildcard */
|
||||
MXS_CONFIG_PARAMETER* svc_config_param;/**< list of config params and values */
|
||||
int svc_config_version; /**< Version number of configuration */
|
||||
bool svc_do_shutdown; /**< tells the service to exit loops etc. */
|
||||
|
||||
Reference in New Issue
Block a user