Closed albinsuresh closed 9 months ago
The following would be the suggested default settings both the configuration and log management features:
file: /etc/tedge/plugins/tedge-log-plugin.toml
[[files]]
type = "software-management"
path = "/var/log/tedge/agent/software-*"
file: /etc/tedge/plugins/tedge-configuration-plugin.toml
[[files]]
path = "/etc/tedge/tedge.toml"
type = "tedge.toml"
[[files]]
path = "/etc/tedge/plugins/tedge-log-plugin.toml"
type = "tedge-log-plugin"
user = "tedge"
group = "tedge"
mode = 0o0444
Plugin config defaults updated as the described in the previous comment, where the config and log directory path prefixes used in those default path entries are derived from the values passed in the --config-dir
argument and the tedge logs.path
configuration respectively.
Tests already exist for the config entries using the default config and log paths:
configuration_operation.robot::Default plugin configuration
log_operation::Default plugin configuration
.QA has thoroughly checked the feature and here are the results:
Is your feature improvement request related to a problem? Please describe.
The
tedge-log-plugin
andtedge-config-plugin
currently creates their configuration files with zero file entries (all example entries commented), as they can run both on main device as well as child devices and those examples only make sense on the main device. Leaving them empty on child devices is acceptable as we can't assume any paths on those devices. But, at least on the main device, some sensible default entries should be present, so that someone using these plugins get to try out those features immediately, without having to update those files.Describe the solution you'd like
tedge.toml
,system.toml
etc) intedge-configuration-plugin.toml
should not assume the default config dir:/etc/tedge
but rather derive it from the--config-dir
option that's used to invoke that plugintedge-log-plugin.toml
on the main device should at least have the tedge-agent/software-management entries in it.Describe alternatives you've considered
Additional context