youki icon indicating copy to clipboard operation
youki copied to clipboard

Enhancing Compatibility with runc

Open saku3 opened this issue 6 months ago • 11 comments

I’m interested in improving the compatibility between youki and runc. Here are a few areas I’d like to focus on:

CLI Command Compatibility

  • The exec command in youki does not yet support some arguments available in runc, such as --preserve-fds and --ignore-paused .
  • The update command seems to support only --pids-limit and -r.
  • I haven’t conducted an exhaustive review, so there may be differences in other commands as well.
  • One point to consider is that commands like exec are not defined in the OCI runtime-spec.
  • I plan to identify and implement the missing CLI options to align more closely with runc.

Testing

  • While youki already has integration tests using oci-runtime-tools test, runc has its own integration tests using bats.
  • I’d like to make it possible to run these bats-based tests on youki.
  • Running these tests and analyzing failures could help improve compatibility.

If the maintainers are okay with this direction, I’d like to proceed with these efforts. This may involve creating multiple PRs or sub-issues to track the work incrementally.

Related Issue

Updated on 8/31

Known issues, as well as any new issues I create, will be tracked here. Here is the list of issues related to this one.

  • Support idmapped mount
    • https://github.com/youki-dev/youki/issues/2307
  • udpate command
    • https://github.com/youki-dev/youki/issues/147
  • exec command
    • https://github.com/youki-dev/youki/issues/3209
    • https://github.com/youki-dev/youki/issues/3207
  • run command
    • https://github.com/youki-dev/youki/issues/3208
  • linux personality
    • https://github.com/youki-dev/youki/issues/3199
  • version command
    • https://github.com/youki-dev/youki/issues/3197
  • frozen cgroup
    • https://github.com/youki-dev/youki/issues/3233
  • support time namespace
    • https://github.com/youki-dev/youki/issues/3259
  • The default filemode for device creation are different from runc’s.
    • https://github.com/youki-dev/youki/issues/3266

saku3 avatar Jun 03 '25 22:06 saku3

I would love to help with this.

CheatCodeSam avatar Jun 04 '25 00:06 CheatCodeSam

Hey @saku3 @CheatCodeSam Thanks for your interest in doing this. This would be quite helpful. I'd suggest the following approach for this now -

  1. I have some changes for update command locally but they are not usable. Let me open a draft PR, and maybe you can use it as a starting point to fix the update command.
  2. We have https://github.com/youki-dev/youki/issues/1305 opened for the runc tests. What I'll suggest is @saku3 should create a CI to run runc tests , but make it only manually triggered for now, not part of CI on PR. Once that is done, we can check what tests are failing, and you can divide the tests between yourselves and fix.
  3. I remember something related to exec's preserve fds being discussed in past. Let me investigate more, but wait for that before starting work on it.

wdyt?

YJDoc2 avatar Jun 04 '25 04:06 YJDoc2

@YJDoc2 Thank you for your comment.

I apologize for overlooking issue #1305. I’d like to proceed with the approach you suggested.

@CheatCodeSam

I’m planning to first look into whether I can set up a CI that runs runc's integration tests. If you're interested in working on the update fix, feel free to proceed.

saku3 avatar Jun 04 '25 10:06 saku3

Hey @CheatCodeSam , if you are interested in working on the update command, I have opened https://github.com/youki-dev/youki/pull/3179 with the changes I had once started working on. However, I don't think those can be used anymore, so look at runc code and runtime spec, and maybe use my PR as ref to create new PR.

Also thanks @saku3 for picking up runc CI :)

YJDoc2 avatar Jun 04 '25 11:06 YJDoc2

@YJDoc2 Sounds great, I'll definitely take a crack at that. From what I understand, youki only implements the --pids-limit and -r flags, while it needs the other flags such as --memory, --blkio-weight and etc?

CheatCodeSam avatar Jun 04 '25 12:06 CheatCodeSam

From what I understand, youki only implements the --pids-limit and -r flags, while it needs the other flags such as --memory, --blkio-weight and etc?

Yep. Basically check what runc/crun supports, and we need to do the same.

YJDoc2 avatar Jun 05 '25 08:06 YJDoc2

I vote for incorporating runc testing into CI first.

utam0k avatar Jun 05 '25 12:06 utam0k

Thank you all for your cooperation! Now we have a strong ally, contest. Let's make it work.

utam0k avatar Jun 05 '25 12:06 utam0k

Existing issue

  • Support idmapped mount
    • https://github.com/youki-dev/youki/issues/2307
  • udpate command
    • https://github.com/youki-dev/youki/issues/147
  • exec command
    • https://github.com/youki-dev/youki/issues/3209
    • https://github.com/youki-dev/youki/issues/3207
  • run command
    • https://github.com/youki-dev/youki/issues/3208
  • linux personality
    • https://github.com/youki-dev/youki/issues/3199
  • version command
    • https://github.com/youki-dev/youki/issues/3197

saku3 avatar Jul 26 '25 09:07 saku3

@saku3 May I ask you to organize the related issue? e.g., adding them as an existing issues on this issue.

utam0k avatar Aug 05 '25 10:08 utam0k

Thank you. I’ll link the related issues in the description of this issue.

saku3 avatar Aug 09 '25 06:08 saku3