From 00f5257a5b07694dd8d06ecc8cd4c060025f81bf Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 30 Apr 2024 15:27:44 +0200 Subject: [PATCH] cephadm: change loki/promtail default image tags This commit changes the default images for both loki and promtail containers. Also, to allow this update we need to update the configuration of loki in order to add a new storage schema configuration: ``` - from: 2024-05-03 store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h ``` This is because 3.0.0 uses new structured metadata. See [1][2]. [1] https://grafana.com/docs/loki/latest/operations/storage/schema/ [2] https://grafana.com/docs/loki/latest/get-started/labels/structured-metadata/#when-to-use-structured-metadata Fixes: https://tracker.ceph.com/issues/65784 Signed-off-by: Guillaume Abrioux --- src/cephadm/cephadmlib/constants.py | 4 ++-- src/pybind/mgr/cephadm/module.py | 4 ++-- src/pybind/mgr/cephadm/templates/services/loki.yml.j2 | 7 +++++++ src/pybind/mgr/cephadm/tests/test_services.py | 7 +++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/cephadm/cephadmlib/constants.py b/src/cephadm/cephadmlib/constants.py index 643271ae78a8..a6cf4389ff61 100644 --- a/src/cephadm/cephadmlib/constants.py +++ b/src/cephadm/cephadmlib/constants.py @@ -5,8 +5,8 @@ DEFAULT_IMAGE = 'quay.ceph.io/ceph-ci/ceph:main' DEFAULT_IMAGE_IS_MAIN = True DEFAULT_IMAGE_RELEASE = 'squid' DEFAULT_PROMETHEUS_IMAGE = 'quay.io/prometheus/prometheus:v2.43.0' -DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:2.4.0' -DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:2.4.0' +DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:3.0.0' +DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:3.0.0' DEFAULT_NODE_EXPORTER_IMAGE = 'quay.io/prometheus/node-exporter:v1.5.0' DEFAULT_ALERT_MANAGER_IMAGE = 'quay.io/prometheus/alertmanager:v0.25.0' DEFAULT_GRAFANA_IMAGE = 'quay.io/ceph/grafana:9.4.12' diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index e149f2514591..e8696ae20896 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -121,8 +121,8 @@ DEFAULT_IMAGE = 'quay.io/ceph/ceph' DEFAULT_PROMETHEUS_IMAGE = 'quay.io/prometheus/prometheus:v2.43.0' DEFAULT_NODE_EXPORTER_IMAGE = 'quay.io/prometheus/node-exporter:v1.5.0' DEFAULT_NVMEOF_IMAGE = 'quay.io/ceph/nvmeof:1.2.5' -DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:2.4.0' -DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:2.4.0' +DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:3.0.0' +DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:3.0.0' DEFAULT_ALERT_MANAGER_IMAGE = 'quay.io/prometheus/alertmanager:v0.25.0' DEFAULT_GRAFANA_IMAGE = 'quay.io/ceph/grafana:9.4.12' DEFAULT_HAPROXY_IMAGE = 'quay.io/ceph/haproxy:2.3' diff --git a/src/pybind/mgr/cephadm/templates/services/loki.yml.j2 b/src/pybind/mgr/cephadm/templates/services/loki.yml.j2 index 27143723113d..70ad46df66e3 100644 --- a/src/pybind/mgr/cephadm/templates/services/loki.yml.j2 +++ b/src/pybind/mgr/cephadm/templates/services/loki.yml.j2 @@ -26,3 +26,10 @@ schema_config: index: prefix: index_ period: 24h + - from: 2024-05-03 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 6a9b08afe3f9..0ef4ee1601be 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -1046,6 +1046,13 @@ class TestMonitoring: store: boltdb-shipper object_store: filesystem schema: v11 + index: + prefix: index_ + period: 24h + - from: 2024-05-03 + store: tsdb + object_store: filesystem + schema: v13 index: prefix: index_ period: 24h""").lstrip() -- 2.47.3