From 202375e4be75d5be7a8d828fede3b05a0802cf9a Mon Sep 17 00:00:00 2001 From: avanthakkar Date: Tue, 8 Aug 2023 23:23:43 +0530 Subject: [PATCH] monitoring: enable exporter for downstream 4.14 All regression for ceph-exporter are fixed in downstream Ceph v6.1z2, so enabling the exporter again. (cherry picked from commit c5e35cdb110afbe3066a471238c819ee12946208) Signed-off-by: sp98 --- pkg/operator/ceph/cluster/nodedaemon/exporter.go | 4 +--- pkg/operator/ceph/cluster/nodedaemon/exporter_test.go | 2 +- pkg/operator/ceph/cluster/nodedaemon/reconcile.go | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter.go b/pkg/operator/ceph/cluster/nodedaemon/exporter.go index f0a196384eb6..b7edfd0ba4c7 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter.go @@ -51,13 +51,11 @@ const ( ) var ( - MinVersionForCephExporter = cephver.CephVersion{Major: 18, Minor: 0, Extra: 0} + MinVersionForCephExporter = cephver.CephVersion{Major: 17, Minor: 2, Extra: 6} ) // createOrUpdateCephExporter is a wrapper around controllerutil.CreateOrUpdate func (r *ReconcileNode) createOrUpdateCephExporter(node corev1.Node, tolerations []corev1.Toleration, cephCluster cephv1.CephCluster, cephVersion *cephver.CephVersion) (controllerutil.OperationResult, error) { - // CephVersion change is done temporarily, as some regression was detected in Ceph version 17.2.6 which is summarised here https://github.com/ceph/ceph/pull/50718#issuecomment-1505608312. - // Thus, disabling ceph-exporter for now until all the regression are fixed. if !cephVersion.IsAtLeast(MinVersionForCephExporter) { logger.Infof("Skipping exporter reconcile on ceph version %q", cephVersion.String()) return controllerutil.OperationResultNone, nil diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go b/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go index fa3e635a0d35..27e69095c1d4 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go @@ -68,7 +68,7 @@ func TestCreateOrUpdateCephExporter(t *testing.T) { } cephCluster.Spec.Labels = cephv1.LabelsSpec{} cephCluster.Spec.PriorityClassNames = cephv1.PriorityClassNamesSpec{} - cephVersion := &cephver.CephVersion{Major: 18, Minor: 0, Extra: 0} + cephVersion := &cephver.CephVersion{Major: 17, Minor: 2, Extra: 6} ctx := context.TODO() context := &clusterd.Context{ Clientset: test.New(t, 1), diff --git a/pkg/operator/ceph/cluster/nodedaemon/reconcile.go b/pkg/operator/ceph/cluster/nodedaemon/reconcile.go index af714bcd7f51..efb53bfa6847 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/reconcile.go +++ b/pkg/operator/ceph/cluster/nodedaemon/reconcile.go @@ -257,8 +257,6 @@ func (r *ReconcileNode) createOrUpdateNodeDaemons(node corev1.Node, tolerations return errors.Wrapf(err, "ceph exporter reconcile failed on op %q", op) } } else { - // CephVersion change is done temporarily, as some regression was detected in Ceph version 17.2.6 which is summarised here https://github.com/ceph/ceph/pull/50718#issuecomment-1505608312. - // Thus, disabling ceph-exporter for now until all the regression are fixed. if cephVersion.IsAtLeast(MinVersionForCephExporter) { logger.Debugf("ceph exporter successfully reconciled for node %q. operation: %q", node.Name, op) // create the metrics service