-
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
test/e2e/systemd_activate_test.go: simplify test #18056
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg 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 |
@@ -111,14 +85,14 @@ var _ = Describe("Systemd activate", func() { | |||
} | |||
|
|||
podman := func(args ...string) *testUtils.PodmanSession { |
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.
Should you need to repush for any reason, I think future maintainers might welcome a comment here explaining that we can't use the usual podmanTest.Podman()
because we need to ensure that we invoke local-podman.
Or, on further thought, WDYT of using podmanTest.Podman()
, and adding SkipIfRemote()
?
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.
Nice idea(s)!
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.
@vrothberg, #18083 has merged, so it's safe to proceed with this. I have a moderate preference for following up on my suggestion above (use Podman
, add SkipIfRemote
) but will not block on it.
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.
Done. Note that the test already skips remote. I moved it up a bit to make it easier to spot.
Bless my beard ... no flake. @edsantiago what does your PR say? |
Nevermind, I can/should check myself :) |
Nah, it's very easy for me: my |
Oh. Duhhhhh, this is a NOP, because it's not running with sqlite. I've just cherry-picked your PR onto #17954, and will check again in an hour. |
OK, with this PR the test really ran with sqlite (see https://api.cirrus-ci.com/v1/task/5951745612840960/logs/main.log). I restarted the int test to get some more data points. |
Yes, but via command-line, not via containers.conf. I haven't yet dismissed the possibility that there's a stray podman process out there somewhere, getting run outside of the usual e2e mechanisms, that might be causing collisions. Or that the |
Repush to have some more data points. I am surprised it does not flake yet. Nothing makes sense in my head. |
LGTM but let's wait until #18057 is resolved. This is causing too many flakes. /hold |
Is this still a WIP? Ready to be merged? |
Please do not merge until #18083 (or equivalent). Without that, we will be pressing Re-run for even more hours than we do already. |
I'm blocking this with every
or
See results of #17954, in which I cherry-picked this PR. All I am blocking to prevent some well-intentioned person from merging this without rebasing on main. That would result in CI failing for everyone. @vrothberg the problem reproduces reliably on my f37 laptop, you should be able to just rebase this on main, use whatever |
The following diff will "fix" the issue (note the diff --git a/test/e2e/systemd_activate_test.go b/test/e2e/systemd_activate_test.go
index be161fd76b4d..6400d69ba6da 100644
--- a/test/e2e/systemd_activate_test.go
+++ b/test/e2e/systemd_activate_test.go
@@ -66,6 +66,19 @@ var _ = Describe("Systemd activate", func() {
podmanOptions := podmanTest.makeOptions(nil, false, false)
+ podman := func(args ...string) *testUtils.PodmanSession {
+ args = append(podmanOptions, args...)
+ return testUtils.SystemExec(podmanTest.PodmanBinary, args)
+ }
+
+ podmanRemote := func(args ...string) *testUtils.PodmanSession {
+ args = append([]string{"--url", "tcp://" + addr}, args...)
+ return testUtils.SystemExec(podmanTest.RemotePodmanBinary, args)
+ }
+
+ reset := podman("system", "reset", "-f")
+ Expect(reset).Should(Exit(0))
+
systemdArgs := []string{
"-E", "http_proxy", "-E", "https_proxy", "-E", "no_proxy",
"-E", "HTTP_PROXY", "-E", "HTTPS_PROXY", "-E", "NO_PROXY",
@@ -78,17 +91,6 @@ var _ = Describe("Systemd activate", func() {
Expect(activateSession.Exited).ShouldNot(Receive(), "Failed to start podman service")
defer activateSession.Signal(syscall.SIGTERM)
- // Curried functions for specialized podman calls
- podmanRemote := func(args ...string) *testUtils.PodmanSession {
- args = append([]string{"--url", "tcp://" + addr}, args...)
- return testUtils.SystemExec(podmanTest.RemotePodmanBinary, args)
- }
-
- podman := func(args ...string) *testUtils.PodmanSession {
- args = append(podmanOptions, args...)
- return testUtils.SystemExec(podmanTest.PodmanBinary, args)
- }
-
containerName := "top_" + testUtils.RandomString(8)
apiSession := podmanRemote(
"create", "--tty", "--name", containerName, "--entrypoint", "top", To me it looks like |
@Luap99 WDYT? |
Environment of the
Environment from local podman process of the same test:
|
I need to take a closer look but please do not run system reset or migrate to stop the pause process in e2e tests. Doing this in parallel is not safe! Unless I am missing something #17903 is caused by system reset running in parallel. |
I agree. It was not my plan to do so but to dig deeper. It turns out that setting the XDG_RUNTIME_DIR for systemd-active sessions resolves the issue. But there still seems to be some interference between the latest changes and adding all the |
27a8302
to
848962e
Compare
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.
LGTM
@vrothberg, needs |
While debugging containers#17904 we found the test to be missing the common podman flags. Add them to the podman invocations and remove some clutter. Signed-off-by: Valentin Rothberg <[email protected]>
Cheers! My tab didn´t refresh so it looked good over here :^) |
Awesome! Shall we put #17904 to bed? |
Once this merges, I'm OK with closing that. It's unfortunate that we don't understand it, though. |
I share that feeling, @edsantiago. Not satisfying but I feel more comfortable going ahead after all the investigations. Green, feel free to merge. |
/lgtm (hold still in place) |
/hold cancel Let's do this :) |
While debugging #17904 we found the test to be missing the common podman flags. Add them to the podman invocations and remove some clutter.
Does this PR introduce a user-facing change?
@edsantiago @Luap99 PTAL
Note that the test will now also run with sqlite (even without the containers.conf PR).