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: Watch sysctl changes to ensure expected values #426

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

jschwinger233
Copy link
Member

@jschwinger233 jschwinger233 commented Jan 13, 2024

Background

We noticed some process other than dae will change dae0's sysctl and break the connectivity from dae netns.
This PR fixes the issue by inotify watching the sysctl files and ensure expected values are set.

Checklist

Full Changelogs

  • [Implement ...]

Issue Reference

This PR proposes some optimization against #414

Test Result

@jschwinger233 jschwinger233 requested a review from mzz2017 January 13, 2024 10:04
@jschwinger233 jschwinger233 marked this pull request as ready for review January 13, 2024 10:05
@jschwinger233 jschwinger233 requested a review from a team as a code owner January 13, 2024 10:05
@mzz2017
Copy link
Contributor

mzz2017 commented Jan 14, 2024

A typical process is systemd-sysctl.

control/sysctl.go Outdated Show resolved Hide resolved
control/sysctl.go Outdated Show resolved Hide resolved
@mzz2017
Copy link
Contributor

mzz2017 commented Jan 22, 2024

Almost ready to merge. Thanks for your great work!

sumire88
sumire88 previously approved these changes Jan 22, 2024
mzz2017
mzz2017 previously approved these changes Jan 23, 2024
dae-prow[bot]
dae-prow bot previously approved these changes Jan 23, 2024
Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

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

🧪 Since the PR has been fully tested, please consider merging it.

@sumire88 sumire88 merged commit f47caad into daeuniverse:main Jan 23, 2024
27 checks passed
@douglarek
Copy link
Contributor

douglarek commented Jan 24, 2024

I have dae v0.5.1 installed, got: level=info msg="sysctl /proc/sys/net/ipv4/conf/dae0/rp_filter has unexpected value 2, expected 0".

@jschwinger233
Copy link
Member Author

@douglarek Did you see connectivity issues? If so, did you see warn or error log?

@douglarek
Copy link
Contributor

@douglarek Did you see connectivity issues? If so, did you see warn or error log?

This info log is printed only when starting the daemon (dae), with no other related warning or error logs.

@jschwinger233
Copy link
Member Author

@douglarek What kind of connectivity issue did you have?

@douglarek
Copy link
Contributor

@douglarek What kind of connectivity issue did you have?

Not yet.

@jschwinger233 jschwinger233 deleted the gray/dae0-sysctl branch January 24, 2024 11:16
@jschwinger233
Copy link
Member Author

@douglarek It's an info log, no worries, unless connectivity is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants