Skip to content

Commit

Permalink
Merge pull request #9137 from zaneb/validation-host-log-prefix
Browse files Browse the repository at this point in the history
OCPBUGS-43768: Log correct hostname for validation status
  • Loading branch information
openshift-merge-bot[bot] authored Oct 31, 2024
2 parents d23ce7c + 83de925 commit 57e78d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/agent/validations.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type validationResultHistory struct {
previousMessage string
}

func checkValidations(cluster *models.Cluster, validationResults *validationResults, log *logrus.Logger, hostLogPrefix string) error {
func checkValidations(cluster *models.Cluster, validationResults *validationResults, log *logrus.Logger, logPrefix string) error {
clusterLogPrefix := "Cluster validation: "
updatedClusterValidationHistory, err := updateValidationResultHistory(clusterLogPrefix, cluster.ValidationsInfo, validationResults.ClusterValidationHistory, log)
if err != nil {
Expand All @@ -43,6 +43,7 @@ func checkValidations(cluster *models.Cluster, validationResults *validationResu
validationResults.ClusterValidationHistory = updatedClusterValidationHistory

for _, h := range cluster.Hosts {
hostLogPrefix := logPrefix
if hostLogPrefix == "" {
hostLogPrefix = "Host " + h.RequestedHostname + " validation: "
}
Expand Down

0 comments on commit 57e78d0

Please sign in to comment.