File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,13 @@ import (
23
23
"io"
24
24
"os/exec"
25
25
"runtime"
26
+ "strings"
26
27
"sync"
27
28
"syscall"
28
29
"time"
29
30
31
+ "github.com/containerd/plugin"
32
+
30
33
. "github.com/containerd/containerd/v2/client"
31
34
)
32
35
@@ -79,6 +82,21 @@ func (d *daemon) waitForStart(ctx context.Context) (*Client, error) {
79
82
}
80
83
continue
81
84
}
85
+ resp , perr := client .IntrospectionService ().Plugins (ctx )
86
+ if perr != nil {
87
+ return nil , fmt .Errorf ("failed to get plugin list: %w" , perr )
88
+ }
89
+ var loadErr error
90
+ for _ , p := range resp .Plugins {
91
+ if p .InitErr != nil && ! strings .Contains (p .InitErr .Message , plugin .ErrSkipPlugin .Error ()) {
92
+ pluginErr := fmt .Errorf ("failed to load %s.%s: %s" , p .Type , p .ID , p .InitErr .Message )
93
+ loadErr = errors .Join (loadErr , pluginErr )
94
+ }
95
+ }
96
+ if loadErr != nil {
97
+ return nil , loadErr
98
+ }
99
+
82
100
return client , err
83
101
case <- ctx .Done ():
84
102
return nil , fmt .Errorf ("context deadline exceeded: %w" , err )
You can’t perform that action at this time.
0 commit comments