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

Replace jail command fork with libjail-rs #594

Closed
wants to merge 2 commits into from
Closed

Conversation

gronke
Copy link
Member

@gronke gronke commented Dec 30, 2018

A work in progress branch of libjail-rs is providing Python bindings for its interfaces:

fubarnetes/libjail-rs#14

With this bindings libiocage gains more control over jail interaction and also boosts performance.

passthru: bool
) -> None:

running_jail = self._launch_jail()

Choose a reason for hiding this comment

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

It might make more sense to do this the other way around, and call self._launch_persistent_jail() from _launch_jail(), as libjail-rs jails are by default persistent, and you can drop persistence after spawning the command using jail.RunningJail.defer_cleanup.

)
if returncode > 0:
try:
return jail.start()

Choose a reason for hiding this comment

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

this should be stopped_jail.start()

@gronke
Copy link
Member Author

gronke commented Feb 24, 2019

Although it was tempting to use a well designed rust library, the idea was hold back in favor of py-freebsd_sysctl and py-jail that are native Python implementations. The close relation to libjail-rs gives us the ability to share unit tests of those projects, so that either the Python and Rust bindings can benefit.

@gronke gronke closed this Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants