Skip to content
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

Retry doFinalize if gRPC status code is Unavailable #11873

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Conversation

jenting
Copy link
Contributor

@jenting jenting commented Aug 4, 2022

Description

Retry doFinalize if gRPC status code is Unavailable

Related Issue(s)

Fixes #11861

How to test

None

Release Notes

None

Documentation

None

Werft options:

  • /werft with-preview

@jenting jenting requested a review from a team August 4, 2022 09:31
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Aug 4, 2022
@kylos101
Copy link
Contributor

kylos101 commented Aug 4, 2022

@jenting can you share in #11861 why this PR is related to but does not fix the issue, and maybe next steps for #11861, after this PR is merged?

@jenting
Copy link
Contributor Author

jenting commented Aug 4, 2022

@jenting can you share in #11861 why this PR is related to but does not fix the issue, and maybe next steps for #11861, after this PR is merged?

Well, I was thinking that should we handle a case that the backup thru. ws-daemon keeps failure

if backupError != nil {
tracing.LogError(span, backupError)
log.WithError(backupError).Warn("internal error while disposing workspace content")
m.manager.metrics.totalBackupFailureCounterVec.WithLabelValues(wsType, strconv.FormatBool(pvcFeatureEnabled), wso.Pod.Labels[workspaceClassLabel]).Inc()
if dataloss {
disposalStatus.BackupFailure = backupError.Error()
}
}
, should we remove the annotation gitpod.io/startedDisposal to make the ws-manager be able to call finalizerWorkspaceContent again?
_, startedDisposal := wso.Pod.Annotations[startedDisposalAnnotation]
span.LogKV("startedDisposal", startedDisposal)
if terminated && !startedDisposal {

But it has a drawback that it keeps calling ws-daemon APIs even if the ws-daemon is gone.

@sagor999
Copy link
Contributor

sagor999 commented Aug 4, 2022

, should we remove the annotation gitpod.io/startedDisposal to make the ws-manager be able to call finalizerWorkspaceContent again?

Keep in mind, that ws-manager will act ONLY if there was some sort of an update to the pod. If there was none, then actOnPodEvent will not be called, and so ws-manager will not do anything.

@jenting
Copy link
Contributor Author

jenting commented Aug 4, 2022

/werft run with-preview

👍 started the job as gitpod-build-jenting-11861.4
(with .werft/ from main)

@jenting
Copy link
Contributor Author

jenting commented Aug 4, 2022

/werft run with-preview with-clean-slate-deployment

👍 started the job as gitpod-build-jenting-11861.5
(with .werft/ from main)

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
@roboquat roboquat merged commit e6f1734 into main Aug 5, 2022
@roboquat roboquat deleted the jenting/11861 branch August 5, 2022 17:19
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/M team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If we failed within finalizeWorkspaceContent, the pod keeps in Terminating state
4 participants