Closed reubenmiller closed 1 year ago
Another motivation is to let an external plugin use the same configuration file instead of coming with yet another configuration file.
Does this ticket require a system test? @didier-wenzek, @reubenmiller
Does this ticket require a system test? @didier-wenzek, @reubenmiller
Yes please.
Having an unknown key in the tedge.toml
file should not prevent the startup of the services.
/etc/tedge/tedge.toml
for example:[another]
key = "value"
Tested
Is your feature improvement request related to a problem? Please describe.
Soften strict parsing of
tedge.toml
andsystem.toml
to handle unknown section or properties so that they do not prevent the service from starting. The unknown sections/properties could be printed out in warning log messages instead.Since multiple services read the
tedge.toml
file;tedge-mapper
,c8y-log-plugin
andc8y-configuration-plugin
. When a component is updated (and the configuration is automatically updated viatedge --init
, then the other non-updated components will not start up as they will throw an exception (and not start) due to detecting an unknown configuration section.Motivation
Scenario
The following scenario would leave to 2 services not starting.
tedge
via Cumulocity and forgets to update the other components liketedge_mapper
,c8y_log_plugin
andc8y_configuration_plugin
)c8y-mapper-*
,c8y-log-plugin
andc8y-configuration-plugin
services do not start because they complain about an unknown section intedge.toml
Example error (from the
tedge-mapper-c8y
serviceDescribe the solution you'd like
tedge.toml
unknown sections or properties should not prevent any service from startingDescribe alternatives you've considered
The dependency to the configuration file schema could be managed via the debian package dependency mechanisms. However this complicates the installation of different packages and would only be possible when using
apt-get install
rather than usingdpkg -i
.And the dependency management system does not solve the robustness issue where users can break tedge by an accidental typo.