Skip to content

Revert "[ws-manager] do not overwrite failed state" #11427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/ws-manager/pkg/manager/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ func (m *Manager) extractStatusFromPod(result *api.WorkspaceStatus, wso workspac
result.Phase = api.WorkspacePhase_STOPPING

_, podFailedBeforeBeingStopped := pod.Annotations[workspaceFailedBeforeStoppingAnnotation]
if podFailedBeforeBeingStopped {
if !podFailedBeforeBeingStopped {
// While the pod is being deleted we do not care or want to know about any failure state.
// If the pod got stopped because it failed we will have sent out a Stopping status with a "failure"
result.Conditions.Failed = ""
} else {
if _, ok := pod.Annotations[workspaceNeverReadyAnnotation]; ok {
// The workspace is never ready, so there is no need for a stopping phase.
result.Phase = api.WorkspacePhase_STOPPED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"phase": 6,
"conditions": {
"failed": "container workspace completed; containers of a workspace pod are not supposed to do that. Reason: ",
"final_backup_complete": 1,
"volume_snapshot": {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"phase": 6,
"conditions": {
"failed": "ungraceful shutdown - teardown was unsuccessful: socket did not appear before context was canceled; last backup failed: testing the backup failure mode.",
"failed": "last backup failed: testing the backup failure mode.",
"final_backup_complete": 1,
"volume_snapshot": {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"phase": 6,
"conditions": {
"failed": "ungraceful shutdown - teardown was unsuccessful: socket did not appear before context was canceled",
"final_backup_complete": 1,
"volume_snapshot": {}
},
Expand Down