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

Implemented hooks #187

Merged
merged 24 commits into from
Aug 15, 2021
Merged

Implemented hooks #187

merged 24 commits into from
Aug 15, 2021

Conversation

yihuaf
Copy link
Collaborator

@yihuaf yihuaf commented Aug 5, 2021

Fix #13 Fix #201
Note: I left PreStart hooks out since the spec mentioned that it is deprecated. Adding it takes no effort in the future.
Edit: I have to add this since integration and docker seems to use this.
Note2: I disabled preserve-fds for exec due to #185, so at least this code can be tested manually. This will be fixed immediatly afterwards.
Note3: We may have to do a refactor to re-org the code a little bit, but probably should do it in a different PR.

@utam0k
Copy link
Member

utam0k commented Aug 6, 2021

@yihuaf Could you add the hooks-related integration tests for runtime-tools?

@yihuaf yihuaf marked this pull request as draft August 6, 2021 16:23
@yihuaf yihuaf marked this pull request as ready for review August 14, 2021 06:25
@yihuaf
Copy link
Collaborator Author

yihuaf commented Aug 14, 2021

@utam0k PTAL

@@ -35,6 +35,7 @@ systemd = { version = "0.8", default-features = false, optional = true }
dbus = "0.9.2"
tabwriter = "1"
fastrand = "1.4.1"
crossbeam-channel = "0.5"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we already do. If I understand how this crate works, there is crossbeam with feature ("crossbeam-channel/std" for example), or use crossbeam-channel directly. crossbeam with feature "crossbeam-channel/std" seems to point to crossbeam-channel underneath.

For context, to be honest, I only used crossbeam because std::sync::mpsc documentation here mentioned this unfixed issue where it mentioned crossbeam being a potential replacement for the std::sync::mpsc,

src/process/init.rs Outdated Show resolved Hide resolved
src/hooks.rs Outdated Show resolved Hide resolved
src/hooks.rs Outdated Show resolved Hide resolved
@utam0k
Copy link
Member

utam0k commented Aug 15, 2021

@yihuaf Thanks!

@utam0k utam0k merged commit 5637326 into youki-dev:main Aug 15, 2021
@yihuaf yihuaf deleted the yihuaf/13 branch August 15, 2021 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle annotations correctly for the container state impl: hooks
2 participants