-
Notifications
You must be signed in to change notification settings - Fork 3.4k
lxcmap: rollback previous updates on failure in WriteEndpoint #40677
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
lxcmap: rollback previous updates on failure in WriteEndpoint #40677
Conversation
@suchit07-git does an issue exist for this? If not could you create one? I think the change is reasonable, however I'm curious if we need a more generic method of doing this, for updating maps. I'd like to raise an issue to determine how wide spread this issue may be, and if it needs to be addressed globally, and not just here. |
@ldelossa I couldn't find one. So I'll create one. I should create it specific to this issue, correct?
I'm not sure actually. I think if there are similar issues in other places then we can create a generic solution. |
Yup, let's open an issue specific to this. I'm curious to pull in some others to see if this is more of a wide spread issue. |
@ldelossa I've created an issue as per your suggestion |
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.
Changes look good :)
Nice find, and thanks for the fix.
/test |
Looks like quite a few test failures here. Can you rebase this PR against HEAD and force push the changes? This will just ensure any test fixes are applied to your branch, I'll rerun tests after. |
WriteEndpoint previously updated all BPF map keys for an endpoint without handling partial failures during the update process. This commit fixes the issue by tracking successfully written keys, and rolling them back if any subsequent update fails. This ensures the LXC map remains consistent and avoids stale partial entries. Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
1eb2872
to
32cb3c2
Compare
@ldelossa I've rebased it. Could you please check now? |
/test |
WriteEndpoint() previously updated all BPF map keys for an endpoint without handling partial failures during the update process. This commit fixes the issue by tracking successfully written keys, and rolling them back if any subsequent update fails. This ensures the LXC map remains consistent and avoids stale partial entries.
Fixes #40829