File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
components/ws-daemon/pkg/daemon Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
16
16
"k8s.io/client-go/rest"
17
17
"k8s.io/client-go/tools/clientcmd"
18
18
19
+ "github.com/gitpod-io/gitpod/common-go/log"
19
20
"github.com/gitpod-io/gitpod/ws-daemon/api"
20
21
"github.com/gitpod-io/gitpod/ws-daemon/pkg/cgroup"
21
22
"github.com/gitpod-io/gitpod/ws-daemon/pkg/container"
@@ -202,16 +203,21 @@ func (d *Daemon) Stop() error {
202
203
func (d * Daemon ) ReadinessProbe () func () error {
203
204
return func () error {
204
205
if d .hosts != nil && ! d .hosts .DidUpdate () {
205
- return fmt .Errorf ("host controller not ready yet" )
206
+ err := fmt .Errorf ("host controller not ready yet" )
207
+ log .WithError (err ).Errorf ("readiness probe failure" )
208
+ return err
206
209
}
207
210
208
211
isContainerdReady , err := d .dispatch .Runtime .IsContainerdReady (context .Background ())
209
212
if err != nil {
213
+ log .WithError (err ).Errorf ("readiness probe failure: containerd error" )
210
214
return fmt .Errorf ("containerd error: %v" , err )
211
215
}
212
216
213
217
if ! isContainerdReady {
214
- return fmt .Errorf ("containerd is not ready" )
218
+ err := fmt .Errorf ("containerd is not ready" )
219
+ log .WithError (err ).Error ("readiness probe failure" )
220
+ return err
215
221
}
216
222
217
223
return nil
You can’t perform that action at this time.
0 commit comments