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

chore(preflights): replace run collector with host sysctl for ip_forwarding #1507

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

JGAntunes
Copy link
Member

What this PR does / why we need it:

Follow up to #1500 we should use the already existing sysctl collector for the ip_forwarding check

Which issue(s) this PR fixes:

Does this PR require a test?

NONE

I run a manual test locally, however it's hard to reproduce with the recent changes introduced in - #1484. Instead I cherry picked the analyzer and collector and run them separately using the preflight binary:

image

After sysctl net.ipv4.ip_forward=0

image

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@JGAntunes JGAntunes requested a review from ajp-io November 15, 2024 19:32
@JGAntunes JGAntunes self-assigned this Nov 15, 2024
when: 'net.ipv4.ip_forward == 0'
message: "IP forwarding must be enabled. To enable it, edit /etc/sysctl.conf, add or uncomment the line 'net.ipv4.ip_forward=1', and run 'sudo sysctl -p'."
- pass:
when: 'net.ipv4.ip_forward > 0'
Copy link
Member Author

Choose a reason for hiding this comment

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

According to the docs - https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html:

ip_forward - BOOLEAN

   0 - disabled (default)

   not 0 - enabled

@JGAntunes JGAntunes enabled auto-merge (squash) November 15, 2024 19:34
Copy link

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-82548d9" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-82548d9?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@JGAntunes JGAntunes disabled auto-merge November 15, 2024 20:29
@JGAntunes JGAntunes merged commit ba8dd69 into main Nov 18, 2024
65 checks passed
@JGAntunes JGAntunes deleted the chore/host-preflight-ip-forward branch November 18, 2024 11:17
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.

2 participants