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

Fix nil pointer dereference when trying to find the nodes of a PV that don't have affinity #48

Merged
merged 3 commits into from
Nov 24, 2023

Conversation

geobeau
Copy link
Contributor

@geobeau geobeau commented Nov 23, 2023

Previously, we expected a PV with remote storage to have an empty set of selector but actually all the NodeAffinity section is missing. Now, we check if the pointer is nil.

Added 2 others commits:

  • refactor of test in order to add the new tests for the fix
  • fix flaky tests that could fail this PR

geobeau and others added 3 commits November 23, 2023 18:05
Kubernetes state is not reset by gingko so the
state managent needs to be managed manually.

It does not support deletion well (things stay
terminating forever). So now we follow the
recommandation from the doc to spawn a new
namespace everytime:
https://book.kubebuilder.io/reference/envtest.html#namespace-usage-limitation
Previously, we expected a PV with remote storage to have
an empty set of selector but actually all the NodeAffinity section
is missing. Now, we check if the pointer is nil

Co-authored-by: Thomas Langé <t.lange@criteo.com>
between test, the reconciler is stopped and started again.
Stop is not instant but we started a new instance right away.
Since it bind a port, the new one crashed because the old
one didn't release it yet. Instead we wait for the manager to
be properly down before starting a new one
@geobeau geobeau requested a review from Lqp1 November 23, 2023 17:30
@geobeau geobeau merged commit 7b330a0 into criteo:main Nov 24, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants