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

[ws-daemon] Reduce messages log level #5789

Merged
merged 1 commit into from
Sep 22, 2021
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
2 changes: 1 addition & 1 deletion components/content-service/pkg/initializer/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (ws *GitInitializer) Run(ctx context.Context, mappings []archive.IDMapping)
log.WithError(err).Warn("error while updating submodules - continuing")
}

log.WithField("stage", "init").WithField("location", ws.Location).Info("Git operations complete")
log.WithField("stage", "init").WithField("location", ws.Location).Debug("Git operations complete")
return
}

Expand Down
2 changes: 1 addition & 1 deletion components/ws-daemon/pkg/content/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (s *WorkspaceService) InitWorkspace(ctx context.Context, req *api.InitWorks
owi := log.OWI(req.Metadata.Owner, req.Metadata.MetaId, req.Id)
tracing.ApplyOWI(span, owi)
log := log.WithFields(owi)
log.Info("InitWorkspace called")
log.Debug("InitWorkspace called")

var (
wsloc string
Expand Down
5 changes: 3 additions & 2 deletions components/ws-daemon/pkg/dispatch/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package dispatch

import (
"context"
"errors"
"sync"
"time"

Expand Down Expand Up @@ -206,7 +207,7 @@ func (d *Dispatch) handlePodUpdate(oldPod, newPod *corev1.Pod) {
if err != nil && err != context.Canceled {
log.WithError(err).WithFields(owi).Warn("cannot wait for container")
}
log.WithFields(owi).WithField("container", containerID).Info("dispatch found new workspace container")
log.WithFields(owi).WithField("container", containerID).Debug("dispatch found new workspace container")

d.mu.Lock()
s := d.ctxs[workspaceInstanceID]
Expand Down Expand Up @@ -235,7 +236,7 @@ func (d *Dispatch) handlePodUpdate(oldPod, newPod *corev1.Pod) {
// no matter if the container was deleted or not - we've lost our guard that was waiting for that to happen.
// Hence, we must stop listening for it to come into existence and cancel the context.
err := d.Runtime.WaitForContainerStop(waitForPodCtx, workspaceInstanceID)
if err != nil {
if err != nil && !errors.Is(err, context.DeadlineExceeded) {
log.WithError(err).WithFields(owi).Error("unexpected waiting for container to stop")
}

Expand Down
4 changes: 2 additions & 2 deletions components/ws-daemon/pkg/iws/iws.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func ServeWorkspace(uidmapper *Uidmapper, fsshift api.FSShiftMethod) func(ctx co
return xerrors.Errorf("cannot start in-workspace-helper server: %w", err)
}

log.WithFields(ws.OWI()).Info("established IWS server")
log.WithFields(ws.OWI()).Debug("established IWS server")
ws.NonPersistentAttrs[session.AttrWorkspaceServer] = helper.Stop

return nil
Expand All @@ -121,7 +121,7 @@ func StopServingWorkspace(ctx context.Context, ws *session.Workspace) (err error
}

stopFn()
log.WithFields(ws.OWI()).Info("stopped IWS server")
log.WithFields(ws.OWI()).Debug("stopped IWS server")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion components/ws-daemon/pkg/resources/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (d *DispatchListener) WorkspaceAdded(ctx context.Context, ws *dispatch.Work

d.governer[ws.ContainerID] = g
go g.Start(ctx)
log.Info("started new resource governer")
log.Debug("started new resource governer")

return nil
}
Expand Down