Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup shim manager configuration #10243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented May 18, 2024

Keep platforms configuration on task manager and add environment config for shims. The sched_core config is very runtime specific and does not need to be a top level configuration, rather just being able to add environment variables is much more useful. Renamed the shim manager plugin to io.containerd.shim.v1.manager rather than io.containerd.shim.v1.shim, which was a recent change after config version 2.

ctr plugins ls now shows

...
io.containerd.shim.v1                  manager                  -              ok
io.containerd.runtime.v2               task                     linux/amd64    ok
...

@dmcgowan dmcgowan force-pushed the update-shim-manager-config branch 2 times, most recently from 389e06d to 28bc851 Compare May 18, 2024 00:58
switch vv := v.(type) {
case bool:
schedCore = vv
case string:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If sched_core is not a boolean type, containerd can not run in v1.7.12 and v2.0.0-rc.2. Do we need to handle the situation where sched_core is not a boolean type?

version = 2
[plugins."io.containerd.runtime.v2.task"]
  platforms = ["linux/amd64"]
  sched_core = "true"
  • containerd v1.7.12
containerd: (4, 3): Can't convert true(string) to bool
  • containerd v2.0.0-rc.2
containerd: toml: cannot decode TOML string into struct field v2.Config.SchedCore of type bool

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks for checking on this. I simplified to just check for boolean and warn if not boolean.

Keep platforms configuration on task manager and add environment config
for shims.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan force-pushed the update-shim-manager-config branch from 40d4466 to ca59fb0 Compare May 22, 2024 18:07
@dmcgowan dmcgowan added this to the 2.0 milestone May 26, 2024
@ZhangShuaiyi
Copy link
Contributor

LGTM

@AkihiroSuda AkihiroSuda added this pull request to the merge queue Jun 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

6 participants