From: Guillaume Abrioux Date: Tue, 30 Apr 2024 13:27:44 +0000 (+0200) Subject: cephadm: change loki/promtail default image tags X-Git-Tag: v20.0.0~1943^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F57164%2Fhead;p=ceph.git 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 --- 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()