From d3845e7f7598d154a7ab39d4b35090ec7c3e4c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 20 Jun 2019 11:27:44 +0200 Subject: [PATCH] ceph: stop enforcing crush tunable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This requirement is long gone and was reported in 2017. Clients should have been updated by then, so there is no reason to set the CRUSH tunable to such an old client. Actually, we should let Ceph run its own tunable. They can always be changed later. Also, this was really restrictive and applied on every orchestration and thus would override any other config done by an administrator. Even worse, this will trigger data movement back and forth... Closes: https://github.com/rook/rook/issues/3138 Signed-off-by: Sébastien Han --- PendingReleaseNotes.md | 1 + pkg/daemon/ceph/client/crush.go | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/PendingReleaseNotes.md b/PendingReleaseNotes.md index 833049bcf..859b63cc2 100644 --- a/PendingReleaseNotes.md +++ b/PendingReleaseNotes.md @@ -15,6 +15,7 @@ an example usage - OSD: newly updated cluster from 0.9 to 1.0.3 and thus Ceph Nautilus will have their OSDs allowing new features for Nautilus - Rgw instances have their own key and thus are properly reflected in the Ceph status - The Rook Agent pods are now started when the CephCluster is created rather than immediately when the operator is started. +- Ceph CRUSH tunable are not enforced to "firefly" anymore, Ceph picks the right tunable for its own version, to read more about tunable [see the Ceph documentation](http://docs.ceph.com/docs/master/rados/operations/crush-map/#tunables) ## Breaking Changes diff --git a/pkg/daemon/ceph/client/crush.go b/pkg/daemon/ceph/client/crush.go index 7243744e5..81d91d9d9 100644 --- a/pkg/daemon/ceph/client/crush.go +++ b/pkg/daemon/ceph/client/crush.go @@ -205,17 +205,6 @@ func GetCrushHostName(context *clusterd.Context, clusterName string, osdID int) } func CreateDefaultCrushMap(context *clusterd.Context, clusterName string) (string, error) { - // first set crush tunables to a firefly profile in order to support older clients - // (e.g., hyperkube uses a firefly rbd tool) - crushTunablesProfile := "firefly" - logger.Infof("setting crush tunables to %s", crushTunablesProfile) - output, err := SetCrushTunables(context, clusterName, crushTunablesProfile) - if err != nil { - return output, fmt.Errorf("failed to set crush tunables to profile %s: %+v", crushTunablesProfile, err) - } else { - logger.Infof("succeeded setting crush tunables to profile %s: %s", crushTunablesProfile, output) - } - // create a temp file that we will use to write the default decompiled crush map to decompiledMap, err := ioutil.TempFile("", "") if err != nil { @@ -240,7 +229,7 @@ func CreateDefaultCrushMap(context *clusterd.Context, clusterName string) (strin // compile the crush map to an output file args := []string{"-c", decompiledMap.Name(), "-o", compiledMap.Name()} - output, err = context.Executor.ExecuteCommandWithOutput(false, "", CrushTool, args...) + output, err := context.Executor.ExecuteCommandWithOutput(false, "", CrushTool, args...) if err != nil { return output, fmt.Errorf("failed to compile crushmap from %s: %+v", decompiledMap.Name(), err) }