Skip to content

Commit 2b00f89

Browse files
committed
ocpbugs-14869: Add timezone info in installer logs
- Add timezone info - until <time> <timezone> Fixes: ocpbugs-14869
1 parent 49c544b commit 2b00f89

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

cmd/openshift-install/create.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ func waitForBootstrapComplete(ctx context.Context, config *rest.Config) *cluster
365365
apiTimeout := 20 * time.Minute
366366

367367
untilTime := time.Now().Add(apiTimeout)
368-
logrus.Infof("Waiting up to %v (until %v) for the Kubernetes API at %s...",
369-
apiTimeout, untilTime.Format(time.Kitchen), config.Host)
368+
timezone, _ := untilTime.Zone()
369+
logrus.Infof("Waiting up to %v (until %v %s) for the Kubernetes API at %s...",
370+
apiTimeout, untilTime.Format(time.Kitchen), timezone, config.Host)
370371

371372
apiContext, cancel := context.WithTimeout(ctx, apiTimeout)
372373
defer cancel()
@@ -431,8 +432,9 @@ func waitForBootstrapConfigMap(ctx context.Context, client *kubernetes.Clientset
431432
}
432433

433434
untilTime := time.Now().Add(timeout)
434-
logrus.Infof("Waiting up to %v (until %v) for bootstrapping to complete...",
435-
timeout, untilTime.Format(time.Kitchen))
435+
timezone, _ := untilTime.Zone()
436+
logrus.Infof("Waiting up to %v (until %v %s) for bootstrapping to complete...",
437+
timeout, untilTime.Format(time.Kitchen), timezone)
436438

437439
waitCtx, cancel := context.WithTimeout(ctx, timeout)
438440
defer cancel()
@@ -486,8 +488,9 @@ func waitForInitializedCluster(ctx context.Context, config *rest.Config) error {
486488
}
487489

488490
untilTime := time.Now().Add(timeout)
489-
logrus.Infof("Waiting up to %v (until %v) for the cluster at %s to initialize...",
490-
timeout, untilTime.Format(time.Kitchen), config.Host)
491+
timezone, _ := untilTime.Zone()
492+
logrus.Infof("Waiting up to %v (until %v %s) for the cluster at %s to initialize...",
493+
timeout, untilTime.Format(time.Kitchen), timezone, config.Host)
491494
cc, err := configclient.NewForConfig(config)
492495
if err != nil {
493496
return errors.Wrap(err, "failed to create a config client")

0 commit comments

Comments
 (0)