Skip to content

Commit

Permalink
UPSTREAM: 620: Fix migration metric registration
Browse files Browse the repository at this point in the history
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."
  • Loading branch information
jsafrane committed May 4, 2021
1 parent 95c5531 commit abe1a0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/csi-provisioner/csi-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit abe1a0e

Please sign in to comment.