Motr
M0
|
XXX FIXME: confd documentation is outdated.
Configuration service (confd) is designed to work as a part of user-space configuration service, driven by request handler and provides a "FOP-based" interface for accessing Motr configuration information stored in configuration db. Confd is run within the context of a request handler.
Confd pre-loads configuration values fetched from configuration db in memory-based data cache to speed up confc requests.
m0_confd_cache – represents an efficient, high concurrency, in-memory cache over the underlying database.
Members:
Confd receives multiple configuration requests from confcs. Each request is a FOP containing a "path" of a requested configuration value to be retrieved from the configuration db. Confcs and confds use RPC layer as a transport to send FOPs.
The following FOPs are defined for confd (see conf/onwire.h):
Confd is initiated and put into operation by request handler logic, after motr is started. Confd service should be registered in request handler with m0_confd_register() call, where it has to initialise own data structures and FOPs used for communication.
Initial configuration database is manually created prior to startup. Confd assumes that:
The following errors may occur while using the configuration db:
While initialization process, confd has to preload internal cache of configuration objects with their configuration values. It loads entire configuration db into memory-based structures. Pre-loading details can be found in Logical Specification.
Initialised confd may be eventually terminated by m0_confd_unregister() in which confd has to finalise own data structures and FOPs.
After a confd instance is started it manages configuration database, its own internal cache structures and incoming FOP-requests.
To configure confd from console, standard options described in Motr Setup in cs_help() function are used.
Client sends a m0_conf_fetch FOP request to confd;
Configuration service processes confc requests in m0_fom_ops::fo_tick() function of m0_conf_fetch FOP request and sends m0_conf_fetch_resp FOP back.