Description
After upgrading to containerd 2.0, the runtime name provided to NRI plugins and potentially other components is now "v2" instead of "containerd".
In containerd 1.7, the name variable was derived from:
source
import (
"path"
"github.com/containerd/containerd/version"
)
var name = path.Base(version.Package) // name == "containerd"
With containerd 2.0:
source
import (
"path"
"github.com/containerd/containerd/v2/version"
)
var name = path.Base(version.Package) // name == "v2"
This leads to "v2" being used as the runtime name instead of "containerd".
Breaking changes commit
Steps to reproduce the issue
- Use containerd 2.0
- Implement an NRI plugin with the following
Configure() method example
- Print value of
runtime variable:
func (p *plugin) Configure(_ context.Context, config, runtime, version string) (stub.EventMask, error) {
fmt.Printf("Runtime name: %s\n", runtime) // <-- should be "containerd" instead of "v2"
...
}
Describe the results you received and expected
Expected:
- The
runtime name passed to components like NRI should be "containerd".
Received:
- The
runtime name is now "v2".
What version of containerd are you using?
v2.0.2
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Description
After upgrading to containerd 2.0, the runtime name provided to NRI plugins and potentially other components is now
"v2"instead of"containerd".In containerd 1.7, the name variable was derived from:
source
With containerd 2.0:
source
This leads to "v2" being used as the runtime name instead of "containerd".
Breaking changes commit
Steps to reproduce the issue
Configure()method exampleruntimevariable:Describe the results you received and expected
Expected:
runtimename passed to components like NRI should be "containerd".Received:
runtimename is now "v2".What version of containerd are you using?
v2.0.2
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response