Limits on Mender Inventory Size

Hello,

Are there any limits on the size of inventories that can be sent to the Mender server?

On one particular device, I encountered an issue where an inventory with tens of thousands of characters could not be sent. For example:

key_name=AAAAAAAAAA...AAA (tens of thousands of characters)

I would like to confirm if there are any specifications regarding inventory size.

I reviewed the Inventory document, but we did not find any information about inventory size limits.

Any guidance on this matter would be greatly appreciated. Thank you very much.

Hi @nomtor0204,

The scope of a key-value pair is currently limited to 1024 characters. Is there a specific use case that you want to tackle?

Greetz,
Josef

Hi @TheYoctoJester ,

Upon investigation, it appears that in Mender-client 3, the buffer size used for parsing inventories is set to 64KB, effectively limiting the size of inventory data that can be sent to 64KB.

The following source code shows that the buffer created by bufio.NewScanner is 64KB:

When calling the Mender API’s Assign Attributes directly or using Mender-client 4, it was possible to send inventories larger than 64KB. This suggests that the 64KB restriction applies only to Mender-client 3.

In our case, we needed to send inventories exceeding 64KB using Mender-client 3. We addressed this by patching the Mender-client to increase the allowable inventory size.

Just wanted to let you know as a quick update.

Best Regards,
Ryo

1 Like