Skip to content

Commit

Permalink
MGMT-6584 Add host progress stages while waiting for control plane (#…
Browse files Browse the repository at this point in the history
…1797)

Added:
 - HostStageWaitingForBootkube
 - HostStageWaitingForController

Removed:
 - HostStageStartWaitingForControlPlane - obsolete
  • Loading branch information
eranco74 authored May 24, 2021
1 parent d7484ff commit 7060ae6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
25 changes: 13 additions & 12 deletions internal/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,28 @@ var manualRebootStages = []models.HostStage{
}

var InstallationProgressTimeout = map[models.HostStage]time.Duration{
models.HostStageStartingInstallation: 30 * time.Minute,
models.HostStageWaitingForControlPlane: 60 * time.Minute,
models.HostStageStartWaitingForControlPlane: 60 * time.Minute,
models.HostStageInstalling: 60 * time.Minute,
models.HostStageJoined: 60 * time.Minute,
models.HostStageWritingImageToDisk: 30 * time.Minute,
models.HostStageRebooting: 70 * time.Minute,
models.HostStageConfiguring: 60 * time.Minute,
models.HostStageWaitingForIgnition: 24 * time.Hour,
"DEFAULT": 60 * time.Minute,
models.HostStageStartingInstallation: 30 * time.Minute,
models.HostStageWaitingForControlPlane: 60 * time.Minute,
models.HostStageWaitingForController: 60 * time.Minute,
models.HostStageWaitingForBootkube: 60 * time.Minute,
models.HostStageInstalling: 60 * time.Minute,
models.HostStageJoined: 60 * time.Minute,
models.HostStageWritingImageToDisk: 30 * time.Minute,
models.HostStageRebooting: 70 * time.Minute,
models.HostStageConfiguring: 60 * time.Minute,
models.HostStageWaitingForIgnition: 24 * time.Hour,
"DEFAULT": 60 * time.Minute,
}

var disconnectionValidationStages = []models.HostStage{
models.HostStageWritingImageToDisk,
models.HostStageInstalling,
models.HostStageStartWaitingForControlPlane,
}

var WrongBootOrderIgnoreTimeoutStages = []models.HostStage{
models.HostStageStartWaitingForControlPlane,
models.HostStageWaitingForControlPlane,
models.HostStageWaitingForController,
models.HostStageWaitingForBootkube,
models.HostStageRebooting,
}

Expand Down
6 changes: 3 additions & 3 deletions internal/host/transition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,9 @@ var _ = Describe("Refresh Host", func() {
expectTimeout bool
}{
{models.HostStageRebooting, false},
{models.HostStageStartWaitingForControlPlane, false},
{models.HostStageWaitingForControlPlane, false},
{models.HostStageWaitingForController, false},
{models.HostStageWaitingForBootkube, false},
{models.HostStageStartingInstallation, true},
{models.HostStageInstalling, true},
{models.HostStageWritingImageToDisk, true},
Expand Down Expand Up @@ -1354,7 +1355,6 @@ var _ = Describe("Refresh Host", func() {
installationStages := []models.HostStage{
models.HostStageInstalling,
models.HostStageWritingImageToDisk,
models.HostStageStartWaitingForControlPlane,
}

for j := range installationStages {
Expand Down Expand Up @@ -3820,7 +3820,7 @@ var _ = Describe("Refresh Host", func() {
for _, installationStage := range []models.HostStage{
models.HostStageStartingInstallation,
models.HostStageWaitingForControlPlane,
models.HostStageStartWaitingForControlPlane,
models.HostStageWaitingForController,
models.HostStageInstalling,
models.HostStageWritingImageToDisk,
models.HostStageRebooting,
Expand Down
9 changes: 6 additions & 3 deletions models/host_stage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4624,7 +4624,8 @@ definitions:
enum:
- Starting installation
- Waiting for control plane
- Start waiting for control plane
- Waiting for bootkube
- Waiting for controller
- Installing
- Writing image to disk
- Rebooting
Expand Down

0 comments on commit 7060ae6

Please sign in to comment.