Conflict Servers Array in mender.json with MENDER_SERVER_URL

Hi,

I’m building mender-client using Yocto and I would like to set 2 mender servers using the Servers array json:
https://docs.mender.io/2.4/client-configuration/configuration-file/configuration-options#servers

So i have specified a mender.conf in the SOURCE_URI with the following conf:

{
“Servers”: [{“ServerURL”: “https://my-serverA.com”}, {“ServerURL”: “https://my-fallback.com”}],
}

Unfortunately the MENDER_SERVER_URL is automatically set to a value:

As said in the recipe:

# If a mender.conf has been provided in SRC_URI, merge this with the
# settings we generate. The settings specified by variables take precedence.

So the mender.conf output will look like this :

{
“UpdatePollIntervalSeconds”: 1800,
“InventoryPollIntervalSeconds”: 28800,
“Servers”: [{“ServerURL”: “https://my-serverA.com”}, {“ServerURL”: “https://my-fallback.com”}],
“ServerURL”: “https://docker.mender.io
}

Which will result in an ERROR as it’s forbidden to specify both Servers and ServerURL.
Is there a way to avoid setting the ServerURL in the Yocto Mender recipe ?

Thanks for your help,
Clement

Hi @clementp, I think you can just set MENDER_SERVER_URL to “” in your local.conf file and then add the multiple servers with your custom conf file.

Drew