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 (
2323 "io"
2424 "os/exec"
2525 "runtime"
26+ "strings"
2627 "sync"
2728 "syscall"
2829 "time"
2930
31+ "github.com/containerd/plugin"
32+
3033 . "github.com/containerd/containerd/v2/client"
3134)
3235
@@ -79,6 +82,21 @@ func (d *daemon) waitForStart(ctx context.Context) (*Client, error) {
7982 }
8083 continue
8184 }
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+
82100 return client , err
83101 case <- ctx .Done ():
84102 return nil , fmt .Errorf ("context deadline exceeded: %w" , err )
You can’t perform that action at this time.
0 commit comments