-
Notifications
You must be signed in to change notification settings - Fork 337
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
fix(libcontainer) no_pivot args is not used #2923
base: main
Are you sure you want to change the base?
Conversation
972e813
to
fb2a3d9
Compare
@udzura This PR addresses the issue where the no_pivot argument is not recognized. This argument is crucial in environments where the pivot_root syscall is not permitted, such as when running containers within containers. |
I understand what this PR aim to do 👍 But I have no privilege to merge this. I guess you've mistaken me for someone! |
@udzura sorry for bother you, could you help to involve someone that is able to have a look at this PR? Really appreciate. |
I'll check this PR. Thanks for your first contribution! |
@xujihui1985 May I ask you to add an integration test for this PR? |
sure, I'd like to learn how to add integrate test |
I can help you if you need ;) |
Hey @xujihui1985 Thanks for your contribution! May I ask you to also take a look at #2597 , which also deals with |
Hi @YJDoc2 I just noticed a similar pull request that addresses this issue and is almost identical to my approach. However, the only problem is that the chroot implementation is incorrect. I can build upon his PR, fix the chroot issue, and include credit for his work. |
Signed-off-by: Vanient <[email protected]>
Move the rootfs to the root of the host filesystem before chrooting, this is equivalent to pivot_root, if don't move mount first, we will not see the new rootfs when exec into the container Signed-off-by: xujihui1985 <[email protected]>
fb2a3d9
to
65d6b54
Compare
fix the problem that no_pivot args is not used when create container when we prepare rootfs with chroot, we should move_mount the rootfs before chroot, otherwise we will not able to use the new rootfs when exec into the container