Skip to content

[ws-manager] Remove req logs #13424

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
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
8 changes: 4 additions & 4 deletions components/ws-manager/pkg/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,23 +328,23 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
safePod, _ := log.RedactJSON(m)

if k8serr.IsAlreadyExists(err) {
clog.WithError(err).WithField("req", req).WithField("pod", string(safePod)).Warn("was unable to start workspace which already exists")
clog.WithError(err).WithField("pod", string(safePod)).Warn("was unable to start workspace which already exists")
return nil, status.Error(codes.AlreadyExists, "workspace instance already exists")
}

clog.WithError(err).WithField("req", req).WithField("pod", string(safePod)).Warn("was unable to start workspace")
clog.WithError(err).WithField("pod", string(safePod)).Warn("was unable to start workspace")
return nil, err
}

// if we reach this point the pod is created
err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, 7*time.Minute, podRunning(m.Clientset, pod.Name, pod.Namespace))
if err != nil {
clog.WithError(err).WithField("req", req).WithField("pod", pod.Name).Warn("was unable to start workspace")
clog.WithError(err).WithField("pod", pod.Name).Warn("was unable to start workspace")
if err == wait.ErrWaitTimeout && isPodUnschedulable(m.Clientset, pod.Name, pod.Namespace) {
// this could be an error due to a scale-up event
delErr := deleteWorkspacePodForce(m.Clientset, pod.Name, pod.Namespace)
if delErr != nil {
clog.WithError(delErr).WithField("req", req).WithField("pod", pod.Name).Warn("was unable to delete workspace pod")
clog.WithError(delErr).WithField("pod", pod.Name).Warn("was unable to delete workspace pod")
return nil, xerrors.Errorf("workspace pod never reached Running state: %w", err)
}

Expand Down