forked from youki-dev/youki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cgroups determination in exec implementation (youki-dev#2720)
* Set cgroups path for tenant containers from main container Signed-off-by: Yashodhan Joshi <[email protected]> * Ignore new_user_ns for creating cgroups path Signed-off-by: Yashodhan Joshi <[email protected]> * Remove user_ns param completely Signed-off-by: Yashodhan Joshi <[email protected]> * Add tests in podman rootless for exec Signed-off-by: Yashodhan Joshi <[email protected]> * Fix add_task implementation for cgroups v2 and systemd Signed-off-by: Yashodhan Joshi <[email protected]> * minor refactor in tenant builder Signed-off-by: Yashodhan Joshi <[email protected]> * Add unit test for systemd add_task function Signed-off-by: Yashodhan Joshi <[email protected]> * Fix task addition to properly add tasks via dbus api Signed-off-by: Yashodhan Joshi <[email protected]> * Fix cross cotainers for tests running Signed-off-by: Yashodhan Joshi <[email protected]> --------- Signed-off-by: Yashodhan Joshi <[email protected]>
- Loading branch information
Showing
17 changed files
with
153 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
# This hack script is the dummy busctl command used when running tests with cross containers. | ||
|
||
# The issue is that we cannot run systemd or dbus inside the test container without a lot | ||
# of hacks. For one specific test - test_task_addition, we need to check that the task | ||
# addition via systemd manager works. We mount the host dbus socket in the test container, so | ||
# dbus calls work, but for the initial authentication, we use busctl which needs dbus and systemd | ||
# to be present and running. So instead of doing all that, we simply run the container with the | ||
# actual test running user's uid/gid and here we echo the only relevant line from busctl's | ||
# output, using id to get the uid. This is a hack, but less complex than actually setting up | ||
# and running the systemd+dbus inside the container. | ||
|
||
echo "OwnerUID=$(id -u)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters