Skip to content

Commit

Permalink
address recent runtimes config confusion
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Brown <[email protected]>
  • Loading branch information
mikebrow committed Apr 12, 2021
1 parent e96d2a5 commit 8a04bd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cri/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func ValidatePluginConfig(ctx context.Context, c *PluginConfig) error {
return errors.New("`default_runtime_name` is empty")
}
if _, ok := c.ContainerdConfig.Runtimes[c.ContainerdConfig.DefaultRuntimeName]; !ok {
return errors.New("no corresponding runtime configured in `runtimes` for `default_runtime_name`")
return errors.Errorf("no corresponding runtime configured in `containerd.runtimes` for `containerd` `default_runtime_name = \"%s\"", c.ContainerdConfig.DefaultRuntimeName)
}

// Validation for deprecated runtime options.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestValidateConfig(t *testing.T) {
DefaultRuntimeName: RuntimeDefault,
},
},
expectedErr: "no corresponding runtime configured in `runtimes` for `default_runtime_name`",
expectedErr: "no corresponding runtime configured in `containerd.runtimes` for `containerd` `default_runtime_name = \"default\"",
},
"deprecated systemd_cgroup for v1 runtime": {
config: &PluginConfig{
Expand Down

0 comments on commit 8a04bd0

Please sign in to comment.