[Buildroot] [PATCH 2/8] package/mender: update install of config files

Mirza Krak mirza.krak at northern.tech
Wed Aug 15 18:48:27 UTC 2018


On Wed, Aug 15, 2018 at 7:41 PM, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
> Hello,
>
> On Wed, 15 Aug 2018 14:42:51 +0200, Mirza Krak wrote:
>
>> > Do you know why tenant.conf was added in the current Mender packaging ?
>> > Was it an old configuration file from previous Mender versions ?
>>
>> This was something that we did deploy in our Yocto recipes (which
>> might have been source of inspiration for the package in Buildroot),
>> but it was never actually used for anything. There is an option in
>> mender.conf for this, TenantToken.
>
> Which is set to ?
>
> tenant.conf was the target of a symlink, created in the systemd unit
> file:
>
> /bin/ln -sf /etc/mender/tenant.conf /var/lib/mender/authtentoken
>
> How does it work now ?

Example:

/etc/mender/mender.conf
{
    TenantToken: "very long base64 encoded string"
}

This is a configuration option that has to do with Hosted Mender,
where you you need to set this for the devices to connect to the
correct organization in a multi-tenant system.

I also looked up some details, the removal of tenant.conf usage (and
/var/lib/mender/authtentoken) was in version 1.2.0, where it was
switched to be an mender.conf option instead as the example above
demonstrates. As the first version that was integrated in Buildroot
was 1.4.0, the inclusion of tenant.conf and the creation of the
symlink was not necessary.

>> > The installation path has changed from /var/share, to /usr/share. Why ?
>>
>> /var/share was incorrect, it has always been /usr/share.
>
> So in its current state, the mender package in Buildroot doesn't work ?

We need to define works. If we define works as that the mender.service
is started successfully and the daemon is running, currently this does
not work. And the path change from /var/share -> /usr/share is one of
the fixes. The other one is a "sane" mender.conf file, currently there
are only "template" values in the file installed that are not replaced
with actually working values.

For Mender to actually be able to perform updates (works) it requires
integration with U-boot and a specific partition layout, as it is A &
B update solution. Will go in more detail on this in the other thread,
with similar questions.

> I'm trying to figure out if this is a bug, or just a preference. If
> it's a bug, we need to fix it in the master branch, and perhaps
> backport it to our LTS release.
>
> In your next iteration of the patches, could you please clearly
> separate the bug fixes as separate patches. They should come first in
> the series, before the improvements/cleanups.

Yes, I can do that.

-- 
Mirza Krak | Embedded Solutions Architect | https://mender.io

 Northern.tech AS | @northerntechHQ



More information about the buildroot mailing list