Hi, auto-configuration of memory for Prometheus is properly detecting resources available but is incorrectly evaluating what the memory allocation for Prometheus should be. The comparison operator < doesn't work as expected, which leads to METRICS_MEMORY_MULTIPLIED evaluating to 128MB.
For example I am hard-coding a host with 32GB of RAM TOTAL_MEMORY and also a very high MEMORY_LIMIT. Here is the failing test using current logic from https://github.com/percona/pmm-server/blob/master/entrypoint.sh#L24-L32 :
I believe the issue is because of the use of square brackets, if instead we use double-parentheses we see a correct evaluation:
The other option might be to use instead -lt as the comparison operator and stick with square brackets:
|[QA] verify memory on small instances||Done||