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

Remove unnecessary chdir #2780

Merged
merged 7 commits into from May 15, 2024
Merged

Remove unnecessary chdir #2780

merged 7 commits into from May 15, 2024

Conversation

utam0k
Copy link
Member

@utam0k utam0k commented May 3, 2024

Fix: #2772

These chdir are unexpected for libcontainer's users.

@utam0k utam0k requested a review from Furisto May 3, 2024 13:03
@utam0k
Copy link
Member Author

utam0k commented May 3, 2024

I've checked the relevant tests that came from containerd were passed.
#2777 (comment)

@utam0k utam0k added the kind/bug label May 3, 2024
@@ -44,8 +44,7 @@ Vagrant.configure("2") do |config|
./script/setup/install-cni
./script/setup/install-critools
rm -rf /bin/runc /sbin/runc /usr/sbin/runc /usr/bin/runc

cp /vagrant/youki/youki /usr/bin/runc
ln -s /vagrant/youki/youki /usr/bin/runc
Copy link
Member Author

Choose a reason for hiding this comment

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

It'd be more beneficial because we don't need to copy again when we rebuild.

@utam0k
Copy link
Member Author

utam0k commented May 3, 2024

I'll check CI.

Co-authored-by: jiaxiao zhou <jiazho@microsoft.com>
Co-authored-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: utam0k <k0ma@utam0k.jp>
@utam0k
Copy link
Member Author

utam0k commented May 5, 2024

@Furisto Can you take a look at this PR?

Signed-off-by: utam0k <k0ma@utam0k.jp>
Signed-off-by: utam0k <k0ma@utam0k.jp>
@YJDoc2
Copy link
Collaborator

YJDoc2 commented May 10, 2024

@Mossaka can you confirm that this branch's youki build resolved the original perf issues you were facing? So that once this PR is checked from the our side, we can merge and make a release.

Signed-off-by: utam0k <k0ma@utam0k.jp>
@Mossaka
Copy link
Contributor

Mossaka commented May 10, 2024

@Mossaka can you confirm that this branch's youki build resolved the original perf issues you were facing? So that once this PR is checked from the our side, we can merge and make a release.

Just confirmed, it solved the original perf issue we are facing

Signed-off-by: utam0k <k0ma@utam0k.jp>
@utam0k utam0k requested review from YJDoc2 and jprendes May 11, 2024 06:31
Copy link
Collaborator

@YJDoc2 YJDoc2 left a comment

Choose a reason for hiding this comment

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

Hey, can you take a look at two comments I have? Apart from them, it is lgtm

crates/libcontainer/src/tty.rs Show resolved Hide resolved
crates/libcontainer/src/hooks.rs Outdated Show resolved Hide resolved
crates/libcontainer/src/hooks.rs Outdated Show resolved Hide resolved
crates/libcontainer/src/hooks.rs Outdated Show resolved Hide resolved
crates/libcontainer/src/hooks.rs Outdated Show resolved Hide resolved
Signed-off-by: utam0k <k0ma@utam0k.jp>
Copy link
Collaborator

@YJDoc2 YJDoc2 left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Not merging it in case you want to do something before release, or anyone else has a review comment

Thanks @utam0k !

Comment on lines +1 to +6
use std::{fs, io::Write, os::unix::prelude::RawFd, path::PathBuf, rc::Rc};

use libcgroups::common::CgroupManager;
use nix::unistd::Pid;
use oci_spec::runtime::Spec;

Copy link
Contributor

@jprendes jprendes May 15, 2024

Choose a reason for hiding this comment

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

thought: We should have a rustfmt.toml to standardize this.
I personally like the one that @Mossaka put together for runwasi.
https://github.com/containerd/runwasi/blob/main/rustfmt.toml

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't know that. It is what I want! Thanks for sharing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

Thanks @utam0k !
I left a minor comments.
Otherwise, LGTM.

crates/libcontainer/src/hooks.rs Outdated Show resolved Hide resolved
Signed-off-by: utam0k <k0ma@utam0k.jp>
@utam0k utam0k enabled auto-merge (squash) May 15, 2024 11:53
@utam0k utam0k merged commit 25edc95 into containers:main May 15, 2024
28 checks passed
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected chdir invoked on container init and start
4 participants