Fixed
Details
Assignee
Don CrossDon CrossReporter
eystein.maloy.stenbergeystein.maloy.stenbergLabels
Priority
(None)Fix versions
Backlog
yes
Details
Details
Assignee
Don Cross
Don CrossReporter
eystein.maloy.stenberg
eystein.maloy.stenbergLabels
Priority
Fix versions
Backlog
yes
Zendesk Support
Zendesk Support
Zendesk Support
Checklist
Checklist
Checklist
Created August 28, 2018 at 5:58 PM
Updated June 25, 2024 at 12:02 PM
Resolved October 2, 2018 at 10:53 AM
At the moment mender.conf is always bundled with the root file system, so it is contained in all Mender Artifacts created as well.
However, there are several cases where it is not desirable to make all settings in mender.conf Artifact-dependent. For example:
The partition layout (in particular which partitions the root file systems reside) may be different on different devices, so not a uniform setting during build time
TenantToken is different for different Hosted Mender customers, so demo Artifacts should not contain them (or they would need to be built for every customer)
The polling interval may depend on the device network interface (e.g. 3g, ethernet), which is not uniformly the same for each build across devices
The proposal:
Merge mender.conf from several locations, with lowering priority, in this order:
/etc/mender/mender.conf
Settings that need to be overridden in an update. In many cases this might be entirely empty, but could be used for updating the server URL, for example.
/var/lib/mender/mender.conf (/data)
Settings that are permanent for the system, such as RootfsA and RootfsB locations
Examples:
If TenantToken is specified in both /var/lib/mender/mender.conf and /etc/mender/mender.conf then the latter one will be used
If polling interval is only specified in /var/lib/mender/mender.conf that is the one that will be used
Acceptance criteria
If a setting is in /etc/mender/mender.conf, this will be used
If a setting is not in /etc/mender/mender.conf but is in /var/lib/mender/mender.conf, it will be used
If a setting is in both locations, the one in /etc/mender/mender.conf will be used
If /etc/mender/mender.conf does not exist, the settings in /var/lib/mender/mender.conf will be used
If neither /etc/mender/mender.conf nor /var/lib/mender/mender.conf exists or contain the required settings (e.g. rootfs partitions), an error is produced and Mender stops
The final settings are available in debug output from the Mender client