Browse Source

Don't print password conversion rate

Avoids divide-by-zero when the password file is empty

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/5391/head
Brad Davidson 3 years ago committed by Brad Davidson
parent
commit
0bf7c09569
  1. 3
      pkg/nodepassword/nodepassword.go

3
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)
}

Loading…
Cancel
Save