From 0bf7c0956964c3213d9ae5a5c02349b6d7f36f01 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Wed, 6 Apr 2022 14:08:08 -0700 Subject: [PATCH] Don't print password conversion rate Avoids divide-by-zero when the password file is empty Signed-off-by: Brad Davidson --- pkg/nodepassword/nodepassword.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/nodepassword/nodepassword.go b/pkg/nodepassword/nodepassword.go index a9c93543a1..a2f3abf156 100644 --- a/pkg/nodepassword/nodepassword.go +++ b/pkg/nodepassword/nodepassword.go @@ -110,7 +110,6 @@ func MigrateFile(secretClient coreclient.SecretClient, nodeClient coreclient.Nod } } } - ms := time.Since(start).Milliseconds() - logrus.Infof("Migrated %d node password entries in %d milliseconds, average %d ms", ensured, ms, ms/ensured) + logrus.Infof("Migrated %d node password entries in %s", ensured, time.Since(start)) return os.Remove(passwordFile) }