Skip to content

Commit

Permalink
[ws-daemon] Increase messages log level
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Sep 21, 2021
1 parent 1a91123 commit a982271
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
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

0 comments on commit a982271

Please sign in to comment.