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

[client] Cleanup firewall state on startup #2768

Merged
merged 33 commits into from
Oct 24, 2024
Merged

[client] Cleanup firewall state on startup #2768

merged 33 commits into from
Oct 24, 2024

Conversation

lixmal
Copy link
Contributor

@lixmal lixmal commented Oct 22, 2024

Describe your changes

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

client/firewall/create.go Outdated Show resolved Hide resolved
@@ -58,6 +59,12 @@ func NewFirewall(context context.Context, iface IFaceMapper) (firewall.Manager,
log.Info("no firewall manager found, trying to use userspace packet filtering firewall")
}

if fm != nil {
if err := fm.Init(stateManager); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

What will be if the iface.IsUserspaceBind() scope happens an error? Should not we revert this initialization?

Copy link
Contributor Author

@lixmal lixmal Oct 23, 2024

Choose a reason for hiding this comment

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

Probably, but this is out of scope for the PR. I just split out the init logic in the Create functions so it is not run when cleaning up only.

Base automatically changed from cleanup-saved-state to main October 24, 2024 08:53
Copy link

@lixmal lixmal merged commit 8016710 into main Oct 24, 2024
21 checks passed
@lixmal lixmal deleted the cleanup-firewall branch October 24, 2024 12:46
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.

2 participants