Rialto has customisable configuration settings that can be set either by calling the C++ interface rialto::servermanager::service::create with the ServerManagerConfig structure or by modifying one of JSON configuration files.
There are three possible configuration files read by the Session Server Manager:
Current config parameters:
| Config Name | Description | Default value |
|---|---|---|
| environmentVariables | A list of environment variables that are set in the session servers spawned by the session server manager | ["XDG_RUNTIME_DIR=/tmp", "GST_REGISTRY=/tmp/rialto-server-gstreamer-cache.bin", "WESTEROS_SINK_USE_ESSRMGR=1"] |
| extraEnvVariables | A list of environment variables that are added to the existing environmentVariables. These are typically used in rialto-soc.json or rialto-config-overrides.json | [""] |
| sessionServerPath | An absolute path to the session server binary | "/usr/bin/RialtoServer" |
| startupTimeoutMs | The amount of time the session server manager waits for a session server to start. If this time is exceeded, the session server manager stops the server and reports a failure. If the value is set to 0, there is no time limit, and the manager will wait indefinitely. | 0 |
| healthcheckIntervalInSeconds | Specifies how often health check messages are sent. | 5 |
| numOfPingsBeforeRecovery | Specifies how many consecutive failed pings are required before a recovery action is triggered. | 3 |
| socketPermissions | Specifies the permissions for the session management socket, expressed in octal permissions. | 666 |
| socketOwner | Specifies the owner of the session management socket. If it's blank, it will be inherited from the parent process. | "" |
| socketGroup | Specifies the group ownership of the session management socket. If it's blank, it will be inherited from the parent process. | "" |
| numOfPreloadedServers | The amount of preloaded servers. | 1 |
| logLevel | Log level of all Rialto components. 1 - ERROR | 3 |
The order in which these configuration settings are processed is as follows:
ServerManagerConfig passed to rialto::servermanager::service::create/etc/sky/rialto-config.json/etc/rialto-soc.json/opt/persistent/sky/rialto-config-overrides.jsonIf any configuration is repeated in a subsequent file, it will be overwritten. For example, if sessionServerPath is defined in both ServerManagerConfig and /etc/sky/rialto-config.json, the value from /etc/sky/rialto-config.json will be used.
To allow more flexible environment variable management, repeated environmentVariables will also overwrite extraEnvVariables from the previous configuration settings. Additionally, if there are environment variables with the same names in both environmentVariables and extraEnvVariables, the values from extraEnvVariables will take priority and be used.
Examples:
| Example | Final environment variables set in the Session Server | Note |
|---|---|---|
| ["env3=3"] | environmentVariables from /etc/rialto-soc.json overriden both environmentVariables and extraEnvVariables from /etc/sky/rialto-config.json |
/etc/sky/rialto-config.json: environmentVariables = ["env1=1"], extraEnvVariables = ["env2=2"] | ["env1=1", "env4=4"] | extraEnvVariables from the /opt/persistent/sky/rialto-config-overrides.json and environmentVariables from /etc/sky/rialto-config.json are combined |
/etc/sky/rialto-config.json: environmentVariables = ["env1=1", "env2=2"]extraEnvVariables = ["env1=3"] | ["env1=3", "env2=2"] | env1 is defined in both environmentVariables and extraEnvVariables, the value from extraEnvVariables will be used. |