nmstate / kubernetes-nmstate

Declarative node network configuration driven through Kubernetes API.
GNU General Public License v2.0
176 stars 87 forks source link

probe: Add support for systems without IPv4 gateway #1192

Closed mkowalski closed 1 year ago

mkowalski commented 1 year ago

Is this a BUG FIX or a FEATURE ?:

/kind enhancement

What this PR does / why we need it:

The current code assumes that there is always a default gateway using IPv4 stack. Because of this, ping check will never succeed on a system without one, e.g. single-stack IPv6.

This patch changes the behaviour so that we will use either of IPv4 or IPv6 gateways effectively enabling IPv6-only systems.

Special notes for your reviewer:

Release note:

Fix the probe check when running on a system without IPv4 default gateway (e.g. IPv6-only).
kubevirt-bot commented 1 year ago

Hi @mkowalski. Thanks for your PR.

I'm waiting for a nmstate member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
phoracek commented 1 year ago

/ok-to-test

qinqon commented 1 year ago

/ok-to-test

mkowalski commented 1 year ago

/retest

mkowalski commented 1 year ago

/retest

mkowalski commented 1 year ago

/cc @cybertron

mkowalski commented 1 year ago

/test pull-kubernetes-nmstate-e2e-upgrade-k8s

mkowalski commented 1 year ago

/retest

mkowalski commented 1 year ago

/retest

cybertron commented 1 year ago

/lgtm

qinqon commented 1 year ago

/approve

kubevirt-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/nmstate/kubernetes-nmstate/blob/main/OWNERS)~~ [qinqon] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment