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

When the VMAgent CR is deleted, the corresponding StatefulSet is left behind. #835

Open
glidea opened this issue Dec 28, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@glidea
Copy link
Contributor

glidea commented Dec 28, 2023

Problem

When a VMAgent CR is deleted, the expected behavior is that the deletion of the CR will be blocked until the associated StatefulSet is deleted. However, there's a chance that the CR gets deleted while the StatefulSet is still being blocked by the finalizer.

Reproduction Steps

  1. Create a VMAgent CR.
  2. Quickly delete the VMAgent CR.

Root Cause Analysis

  1. Once the StatefulSet corresponding to the CR is created, the operator's informer has not yet received the StatefulSet creation event.
  2. If the CR is deleted at this point, the operator's cache client is unable to retrieve the StatefulSet, leading to the assumption that the finalizer has already been removed, as seen in the code from vmagent.go
  3. This results in the removal of the CR's finalizer, as indicated by the code from common.go
@f41gh7 f41gh7 added the bug Something isn't working label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants