Skip to content

Commit

Permalink
Use preset to show info message
Browse files Browse the repository at this point in the history
This PR makes sure that in case of openshift preset message would be
```
INFO Creating CRC VM for openshift <version_of_openshift>
```

and for okd preset
```
INFO Creating CRC VM for okd <version_of_openshift>
```
  • Loading branch information
praveenkumar authored and anjannath committed Aug 1, 2022
1 parent 658e605 commit 2cef5e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}

if crcBundleMetadata.IsOpenShift() {
logging.Infof("Creating CRC VM for OpenShift %s...", crcBundleMetadata.GetOpenshiftVersion())
logging.Infof("Creating CRC VM for %s %s...", startConfig.Preset, crcBundleMetadata.GetOpenshiftVersion())
} else {
logging.Infof("Creating CRC VM for Podman %s...", crcBundleMetadata.GetPodmanVersion())
}
Expand Down Expand Up @@ -242,7 +242,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}

if vm.bundle.IsOpenShift() {
logging.Infof("Starting CRC VM for OpenShift %s...", vm.bundle.GetOpenshiftVersion())
logging.Infof("Starting CRC VM for %s %s...", startConfig.Preset, vm.bundle.GetOpenshiftVersion())
}

if client.useVSock() {
Expand Down Expand Up @@ -401,7 +401,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Failed to check certificate validity")
}

logging.Info("Starting OpenShift kubelet service")
logging.Info("Starting kubelet service")
sd := systemd.NewInstanceSystemdCommander(sshRunner)
if err := sd.Start("kubelet"); err != nil {
return nil, errors.Wrap(err, "Error starting kubelet")
Expand Down Expand Up @@ -486,7 +486,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Failed to update kubeconfig file")
}

logging.Info("Starting OpenShift cluster... [waiting for the cluster to stabilize]")
logging.Infof("Starting %s instance... [waiting for the cluster to stabilize]", startConfig.Preset)
if err := cluster.WaitForClusterStable(ctx, instanceIP, constants.KubeconfigFilePath, proxyConfig); err != nil {
logging.Errorf("Cluster is not ready: %v", err)
}
Expand Down

0 comments on commit 2cef5e6

Please sign in to comment.