Skip to content

Commit

Permalink
MGMT-12398: Regression fix: Move host stage to "Done" only when not i…
Browse files Browse the repository at this point in the history
…n KubeAPI mode. (openshift#4587)

A recent regression caused the host stage to be prematurely moved to "Done" when the installation is in KubeAPI mode.
This change aims to fix that by setting the correct status.
  • Loading branch information
paul-maidment authored and danielerez committed Oct 15, 2023
1 parent 2b3d81f commit fbc213a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,11 @@ func (m *Manager) UpdateInstallProgress(ctx context.Context, h *models.Host, pro
swag.StringValue(h.Status), models.HostStatusError, statusInfo)
case models.HostStageRebooting:
if swag.StringValue(h.Kind) == models.HostKindAddToExistingClusterHost {
infoMessage := statusInfo
infoMessage := statusInfoRebootingDay2
stage := models.HostStageDone
if !m.kubeApiEnabled {
if m.kubeApiEnabled {
// in case kubeApiEnabled the agent controller will keep updating the host stage until the installation is complete
infoMessage = statusInfoRebootingDay2
infoMessage = statusInfo
stage = models.HostStageRebooting
}
_, err = hostutil.UpdateHostProgress(ctx, logutil.FromContext(ctx, m.log), m.db, m.eventsHandler, h.InfraEnvID, *h.ID,
Expand Down

0 comments on commit fbc213a

Please sign in to comment.