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

[CNVM] Resume snapshot deletion #2218

Open
orouz opened this issue May 20, 2024 · 0 comments
Open

[CNVM] Resume snapshot deletion #2218

orouz opened this issue May 20, 2024 · 0 comments
Labels
8.16 candidate bug Something isn't working Team:Cloud Security Cloud Security team related

Comments

@orouz
Copy link
Collaborator

orouz commented May 20, 2024

Describe the bug

the CNVM pipeline has a final step that deletes the snapshot it creates:

f.cleaner.CleanSnapshots(ctx)

but if for some reason the context gets canceled, like on configuration changes, then the snapshot won't be deleted.

we need a mechanism to be able to resume deletion if it was not complete

To Reproduce
Steps to reproduce the behavior:

  1. Deploy CNVM integration and agent
  2. before the scanning is complete, change integration configuration or agent log level to trigger a re-config
  3. monitor logs to see logs like this:
[elastic_agent.cloudbeat][error] NewVulnerabilityCleaner.CleanSnapshots: error deleting snapshot: snap-0b1e394cc735f9d13, error deleting snapshot snap-0b1e394cc735f9d13: operation error EC2: DeleteSnapshot, context canceled

Expected behavior

CNVM is able to delete snapshots even if cycle was inturpeted

Additional context

@orouz orouz added bug Something isn't working Team:Cloud Security Cloud Security team related labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.16 candidate bug Something isn't working Team:Cloud Security Cloud Security team related
Projects
None yet
Development

No branches or pull requests

2 participants