-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add an integration test for systemd in a container #3728
Add an integration test for systemd in a container #3728
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I fully expect this is failing right now. Will merge once master is fixed. |
LGTM |
LGTM once tests are happy |
LGTM, PR to fix the issue here: #3731 |
test/e2e/systemd_test.go
Outdated
Expect(pull.ExitCode()).To(Equal(0)) | ||
|
||
ctrName := "testSystemd" | ||
run := podmanTest.Podman([]string{"run", "--name", ctrName, "-d", systemdImage, "init", "--log-level", "debug"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, this line requires oci-systemd-hook
to be instalelld on system.
What do you think about another test-case with without that hook? (or with env oci-systemd-hook=disabled
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman should not require oci-systemd-hook at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok; tahnk you for explanation.
38cd916
to
65d789c
Compare
Rebased. Hopefully will go green now. |
@mheon Could you rebase this and see if we can get it merged. |
bd51b7a
to
1d5ed6d
Compare
Alright, should be getting actual logs out of the tests now - so we should know where this is failing. I suspect it's CGroups related but not 100%. |
1d5ed6d
to
39afba2
Compare
Some broken characters - encoding on our CI logs seems a bit messed up? - but it looks like a CGroup error setting up systemd on every test that isn't remote and actually uses CGroups. |
I think this might be a legitimate issue on Podman's side? |
39afba2
to
4100102
Compare
|
Well, damn. It's the container manage CGroups SEBool. For everything that's not ubuntu. |
@cevich PTAL at the last commit - that look like a good place for SELinux config for the tests? |
8add937
to
45aa084
Compare
Squashed everything down. Hopefully will go green now. |
Everything is passing except CGroups v2 |
I feel like this is an actual error with our V2 support |
Can we tell the tests to not run with cgroupsV2 and get this merged and then open an issue for @giuseppe to fix the cgroupsV2 issue. |
I'll look into it - should be possible |
|
Done. Let's see if things go green now. |
if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then | ||
bash "$SCRIPT_BASE/add_second_partition.sh"; fi | ||
;; | ||
centos-7) # Current VM is an image-builder-image no local podman/testing | ||
echo "No further setup required for VM image building" | ||
# All SELinux distros need this for systemd-in-a-container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave original comment or update to clarify: CentOS-7 is never used for testing (we would use RHEL instead). This condition is needed because the cache-image building VM shares setup_environment.sh
(hence the comment) and 'exit 0' to avoid doing any actual setup for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, I'll restore the original
@@ -44,11 +44,13 @@ case "${OS_REL_VER}" in | |||
;; | |||
fedora-30) ;& # continue to next item | |||
fedora-29) | |||
# All SELinux distros need this for systemd-in-a-container | |||
setsebool container_manage_cgroup true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this is perfectly fine place to do this.
when performing an image build over a varlink connection, we should clean up tmp files that are a result of sending the file to the host and untarring it for the build. Fixes: containers#3869 Signed-off-by: baude <[email protected]>
Signed-off-by: Matthew Heon <[email protected]>
Revert this one CGroups V2 support for systemd containers is added. Signed-off-by: Matthew Heon <[email protected]>
f7dfc59
to
ca0dfca
Compare
/retest |
LGTM and all green test buttons. |
/lgtm |
We regressed really badly here. Add a test so we don't do it again.