From 0a81ce2251699faf0f174e7f58a4cbb9ac149bc8 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Wed, 10 Mar 2021 11:30:50 +0530 Subject: [PATCH] ceph: disable CSI GRPC metrics by default The GRPC metrics exposed by both the provisioner pod and the node plugin pod on some port. Provisioner pod is running on the pod network and the daemonset pods run on the host network. sometimes starting the GRPC metrics by default can lead to node plugin pods crashloopback state this is due to the port conflict. Moreover, the GRPC metrics are not for the user it's for the one which will help to debug the time taken by cephcsi to serve each GRPC call. Enabling it by default won't be a good idea. So the plan is to disable it by default, If someone faces any issue it can be enabled later at some point in time. closes #7378 Signed-off-by: Madhu Rajanna --- Documentation/helm-operator.md | 2 +- PendingReleaseNotes.md | 1 + cluster/charts/rook-ceph/values.yaml | 2 +- cluster/examples/kubernetes/ceph/operator-openshift.yaml | 2 +- cluster/examples/kubernetes/ceph/operator.yaml | 2 +- pkg/operator/ceph/csi/csi.go | 2 +- tests/framework/installer/ceph_manifests.go | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/helm-operator.md b/Documentation/helm-operator.md index d9eeb85c2..f3584d304 100644 --- a/Documentation/helm-operator.md +++ b/Documentation/helm-operator.md @@ -109,7 +109,7 @@ The following tables lists the configurable parameters of the rook-operator char | `csi.rbdFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the RBD PVC is being mounted | ReadWriteOnceWithFSType | | `csi.cephFSFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted | ReadWriteOnceWithFSType | | `csi.logLevel` | Set logging level for csi containers. Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity. | `0` | -| `csi.enableGrpcMetrics` | Enable Ceph CSI GRPC Metrics. | `true` | +| `csi.enableGrpcMetrics` | Enable Ceph CSI GRPC Metrics. | `false` | | `csi.provisionerTolerations` | Array of tolerations in YAML format which will be added to CSI provisioner deployment. | | | `csi.provisionerNodeAffinity` | The node labels for affinity of the CSI provisioner deployment (***) | | | `csi.pluginTolerations` | Array of tolerations in YAML format which will be added to Ceph CSI plugin DaemonSet | | diff --git a/PendingReleaseNotes.md b/PendingReleaseNotes.md index b95ef12fa..c119e6bf7 100644 --- a/PendingReleaseNotes.md +++ b/PendingReleaseNotes.md @@ -27,3 +27,4 @@ v1.6... * Enable disruption budgets (PDBs) by default for Mon, RGW, MDS, and OSD daemons * Add CephFilesystemMirror CRD to deploy cephfs-mirror daemon * Ceph OSD: as of Nautilus 14.2.14 and Octopus 15.2.9 if the OSD scenario is simple (one OSD per disk) we won't use LVM to prepare the disk anymore +* Disable CSI GRPC metrics by default diff --git a/cluster/charts/rook-ceph/values.yaml b/cluster/charts/rook-ceph/values.yaml index 42ed87977..197434acf 100644 --- a/cluster/charts/rook-ceph/values.yaml +++ b/cluster/charts/rook-ceph/values.yaml @@ -55,7 +55,7 @@ pspEnable: true csi: enableRbdDriver: true enableCephfsDriver: true - enableGrpcMetrics: true + enableGrpcMetrics: false # set to false to disable deployment of snapshotter container in CephFS provisioner pod. enableCephfsSnapshotter: true # set to false to disable deployment of snapshotter container in RBD provisioner pod. diff --git a/cluster/examples/kubernetes/ceph/operator-openshift.yaml b/cluster/examples/kubernetes/ceph/operator-openshift.yaml index ec5589c64..6f9cfe267 100644 --- a/cluster/examples/kubernetes/ceph/operator-openshift.yaml +++ b/cluster/examples/kubernetes/ceph/operator-openshift.yaml @@ -103,7 +103,7 @@ data: ROOK_CSI_ENABLE_CEPHFS: "true" # Enable the default version of the CSI RBD driver. To start another version of the CSI driver, see image properties below. ROOK_CSI_ENABLE_RBD: "true" - ROOK_CSI_ENABLE_GRPC_METRICS: "true" + ROOK_CSI_ENABLE_GRPC_METRICS: "false" # Set logging level for csi containers. # Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity. diff --git a/cluster/examples/kubernetes/ceph/operator.yaml b/cluster/examples/kubernetes/ceph/operator.yaml index 06cea6446..e69486c43 100644 --- a/cluster/examples/kubernetes/ceph/operator.yaml +++ b/cluster/examples/kubernetes/ceph/operator.yaml @@ -27,7 +27,7 @@ data: ROOK_CSI_ENABLE_CEPHFS: "true" # Enable the default version of the CSI RBD driver. To start another version of the CSI driver, see image properties below. ROOK_CSI_ENABLE_RBD: "true" - ROOK_CSI_ENABLE_GRPC_METRICS: "true" + ROOK_CSI_ENABLE_GRPC_METRICS: "false" # Set logging level for csi containers. # Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity. diff --git a/pkg/operator/ceph/csi/csi.go b/pkg/operator/ceph/csi/csi.go index e42ff59fa..cd138c390 100644 --- a/pkg/operator/ceph/csi/csi.go +++ b/pkg/operator/ceph/csi/csi.go @@ -77,7 +77,7 @@ func SetParams(clientset kubernetes.Interface) error { return errors.Wrap(err, "unable to parse value for 'ROOK_CSI_ALLOW_UNSUPPORTED_VERSION'") } - csiEnableCSIGRPCMetrics, err := k8sutil.GetOperatorSetting(clientset, controllerutil.OperatorSettingConfigMapName, "ROOK_CSI_ENABLE_GRPC_METRICS", "true") + csiEnableCSIGRPCMetrics, err := k8sutil.GetOperatorSetting(clientset, controllerutil.OperatorSettingConfigMapName, "ROOK_CSI_ENABLE_GRPC_METRICS", "false") if err != nil { return errors.Wrap(err, "unable to determine if CSI GRPC metrics is enabled") } diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 6f40153dd..aa5cdad04 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -1004,7 +1004,7 @@ metadata: data: ROOK_CSI_ENABLE_CEPHFS: "true" ROOK_CSI_ENABLE_RBD: "true" - ROOK_CSI_ENABLE_GRPC_METRICS: "true" + ROOK_CSI_ENABLE_GRPC_METRICS: "false" ROOK_OBC_WATCH_OPERATOR_NAMESPACE: "true" CSI_LOG_LEVEL: "5" `