EPMOSDU-1434 Get minIO version from metrics

Description:

Issue: The minIO version is missing in the response from the API point /info. For minIO versions starting from 2024, there is no response to the API point /api/v1/check-version, which leads to empty values ​​in the responses of the point /info in services that use the OBM library.

Solution: Get the version from the minIO metrics API point. (http://host:9000/minio/v2/metrics/cluster) Documentation link: https://min.io/docs/minio/kubernetes/upstream/operations/monitoring/metrics-v2.html Property: minio_software_version_info

To get metrics, you need first open the /metrics API point by setting the MINIO_PROMETHEUS_AUTH_TYPE=public property. To set the variable in Docker:

  1. Stop the container: docker stop <container_name_or_id>
  2. Delete it (without deleting the image): docker rm <container_name_or_id>
  3. Restart the container with the environment variable: docker run -p 9000:9000 -p 9001:9001 --name minio -e MINIO_PROMETHEUS_AUTH_TYPE=public minio/minio server /data --console-address ":9001"

Also, I would recommend closing this point from external access but leaving it accessible to OSDU services.

How to test:

To get the version from the metrics

  1. Run minIo with property MINIO_PROMETHEUS_AUTH_TYPE
  2. Run the service that uses the new OBM library
  3. Get the response from the API point /info

To get the version from /api/v1/check-version

  1. Run minIo to version 2023
  2. Run the service that uses the new OBM library
  3. Get a response from the API point /info

Changes include:

  • Bug.

Changes in:

  • GCP
Edited by Yurii Ruban [EPAM / GCP]

Merge request reports

Loading