From abe1a0eadb6fbca0b871667ed7cb729244c0be85 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Tue, 4 May 2021 20:14:15 +0200 Subject: [PATCH] UPSTREAM: 620: Fix migration metric registration Don't register process_start_time_seconds metric in migration metrics manager to prevent double registration, resulting in this error: gathered metric family process_start_time_seconds has help "[ALPHA] Start time of the process since unix epoch in seconds." but should have "Start time of the process since unix epoch in seconds." --- cmd/csi-provisioner/csi-provisioner.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/csi-provisioner/csi-provisioner.go b/cmd/csi-provisioner/csi-provisioner.go index 5631a531b8..9fb8ca36ff 100644 --- a/cmd/csi-provisioner/csi-provisioner.go +++ b/cmd/csi-provisioner/csi-provisioner.go @@ -222,7 +222,10 @@ func main() { klog.V(2).Infof("Supports migration from in-tree plugin: %s", supportsMigrationFromInTreePluginName) // Create a new connection with the metrics manager with migrated label - metricsManager = metrics.NewCSIMetricsManagerWithOptions(provisionerName, metrics.WithMigration()) + metricsManager = metrics.NewCSIMetricsManagerWithOptions(provisionerName, + // Will be provided via default gatherer. + metrics.WithProcessStartTime(false), + metrics.WithMigration()) migratedGrpcClient, err := ctrl.Connect(*csiEndpoint, metricsManager) if err != nil { klog.Error(err.Error())