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

Revert "Fix errors during envtest teardown" #307

Merged
merged 1 commit into from May 15, 2023

Conversation

gkurz
Copy link
Member

@gkurz gkurz commented May 15, 2023

make test is leaking the kube-apiserver and etcd processes. When unoticed, this causes make test to fail with weird errors like failing to open a file because of rlimit.

Investigation leads to commit 053f866 which was added to work around the very same problems at the time according to Pradipta. Reverting this commit fixes the issue.

It seems that updates to the controller-runtime and deps might have changed something and we no longer need the workaround.

Let's just revert 053f866.

Fixes https://issues.redhat.com/browse/KATA-2168

- Description of the problem which is fixed/What is the use case

- What I did

- How to verify it

- Description for the changelog

`make test` is leaking the kube-apiserver and etcd processes.
When unoticed, this causes `make test` to fail with weird
errors like failing to open a file because of rlimit.

Investigation leads to commit 053f866 which was added
to work around the very same problems at the time according to
Pradipta. Reverting this commit fixes the issue.

It seems that updates to the controller-runtime and deps might
have changed something and we no longer need the workaround.

Let's just revert 053f866.

Fixes https://issues.redhat.com/browse/KATA-2168

Signed-off-by: Greg Kurz <groug@kaod.org>
@gkurz gkurz requested a review from bpradipt May 15, 2023 15:40
@openshift-ci openshift-ci bot requested review from littlejawa and pmores May 15, 2023 15:40
Copy link
Contributor

@littlejawa littlejawa left a comment

Choose a reason for hiding this comment

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

lgtm
Thanks @gkurz

Copy link
Member

@beraldoleal beraldoleal left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@pmores pmores left a comment

Choose a reason for hiding this comment

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

I won't pretend to understand exactly what's happening here but if you tested the revert and it worked that's enough for me, and the state we're reverting to does look more natural to me, too. :-)

Copy link
Contributor

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2023
@gkurz gkurz merged commit f8965c6 into openshift:devel May 15, 2023
@gkurz gkurz mentioned this pull request May 16, 2023
gkurz added a commit to gkurz/sandboxed-containers-operator that referenced this pull request May 17, 2023
PR openshift#307 was too optimistic. The original issue worked around
by 053f866 still exists actually ; `make test` is now
failing with :

  [FAILED] Unexpected error:
      <errors.aggregate | len:1, cap:1>: [
          <*errors.errorString | 0xc0005ebf80>{
              s: "timeout waiting for process kube-apiserver to stop",
          },
      ]
      timeout waiting for process kube-apiserver to stop
  occurred

This is caused by a missing cancellation of the certwatcher in the
controller-runtime. The fix, as documented in [1], is to create
a cancellable context, pass it to envtest and cancel it just before
tearing down the test.

[1] kubernetes-sigs/kubebuilder#2379

Signed-off-by: Greg Kurz <groug@kaod.org>
@gkurz gkurz mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants