Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit a601166

Browse files
committed
Update go-cni to 40bcf8ec8acd7372be1d77031d585d5d8e561c90.
Signed-off-by: Lantao Liu <[email protected]>
1 parent f73ae0e commit a601166

8 files changed

Lines changed: 143 additions & 122 deletions

File tree

pkg/server/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi
148148

149149
// Try to load the config if it exists. Just log the error if load fails
150150
// This is not disruptive for containerd to panic
151-
if err := c.netPlugin.Load(cni.WithLoNetwork(), cni.WithDefaultConf()); err != nil {
151+
if err := c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err != nil {
152152
logrus.WithError(err).Error("Failed to load cni during init, please check CRI plugin status before setting up network for pods")
153153
}
154154
// prepare streaming server

pkg/server/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (c *criService) Status(ctx context.Context, r *runtime.StatusRequest) (*run
4444
// Check the status of the cni initialization
4545
if err := c.netPlugin.Status(); err != nil {
4646
// If it is not initialized, then load the config and retry
47-
if err = c.netPlugin.Load(cni.WithLoNetwork(), cni.WithDefaultConf()); err != nil {
47+
if err = c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err != nil {
4848
networkCondition.Status = false
4949
networkCondition.Reason = networkNotReadyReason
5050
networkCondition.Message = fmt.Sprintf("Network plugin returns error: %v", err)

pkg/server/testing/fake_cni_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ func (f *FakeCNIPlugin) Status() error {
4747
}
4848

4949
// Load loads the network config.
50-
func (f *FakeCNIPlugin) Load(opts ...cni.LoadOption) error {
50+
func (f *FakeCNIPlugin) Load(opts ...cni.CNIOpt) error {
5151
return f.LoadErr
5252
}

pkg/server/update_runtime_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (c *criService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateR
5252
if err := c.netPlugin.Status(); err == nil {
5353
logrus.Infof("Network plugin is ready, skip generating cni config from template %q", confTemplate)
5454
return &runtime.UpdateRuntimeConfigResponse{}, nil
55-
} else if err := c.netPlugin.Load(cni.WithLoNetwork(), cni.WithDefaultConf()); err == nil {
55+
} else if err := c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err == nil {
5656
logrus.Infof("CNI config is successfully loaded, skip generating cni config from template %q", confTemplate)
5757
return &runtime.UpdateRuntimeConfigResponse{}, nil
5858
}

vendor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ github.com/containerd/console 4d8a41f4ce5b9bae77c41786ea2458330f43f081
77
github.com/containerd/containerd 57508dcb0b5776efaacd0828ed42f819fab5ba07
88
github.com/containerd/continuity a60600ad77f38aaa70165825f61e2ea72e51c9b1
99
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
10-
github.com/containerd/go-cni f2d7272f12d045b16ed924f50e91f9f9cecc55a7
10+
github.com/containerd/go-cni 40bcf8ec8acd7372be1d77031d585d5d8e561c90
1111
github.com/containerd/go-runc bcb223a061a3dd7de1a89c0b402a60f4dd9bd307
1212
github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788
1313
github.com/containernetworking/cni v0.6.0

vendor/github.com/containerd/go-cni/README.md

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/go-cni/cni.go

Lines changed: 33 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)