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

OCPBUGS-32141: Handle scenario when VIP does not belong to L2 #313

Merged
merged 1 commit into from
May 20, 2024

Conversation

mkowalski
Copy link
Contributor

Lately we were made aware that the current logic of maching interfaces to VIPs is broken in vSphere IPI scenarios when VIP does not belong to Machine Network. Usually such a combination would be forbidden, but for vSphere it is allowed.

As a result, we may have e.g. an interface 10.8.38.29, machine network 10.8.42.0/23 and VIP 10.8.0.83. As counterintuitively it looks for baremetal, with vSphere it is allowed.

This PR fixes the logic we introduced in January 2023 where we added a hard-check to make sure VIP belongs to a subnet of the NIC. With this new logic, if the scenario described above happens, we will fallback to the logic from years ago when we were simply choosing a NodeInternalIP of the matching IP stack.

Closes: OCPBUGS-32141

Lately we were made aware that the current logic of maching interfaces
to VIPs is broken in vSphere IPI scenarios when VIP does not belong to
Machine Network. Usually such a combination would be forbidden, but for
vSphere it is allowed.

As a result, we may have e.g. an interface 10.8.38.29, machine network
10.8.42.0/23 and VIP 10.8.0.83. As counterintuitively it looks for
baremetal, with vSphere it is allowed.

This PR fixes the logic we introduced in January 2023 where we added a
hard-check to make sure VIP belongs to a subnet of the NIC. With this
new logic, if the scenario described above happens, we will fallback to
the logic from years ago when we were simply choosing a NodeInternalIP
of the matching IP stack.

Closes: OCPBUGS-32141
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels May 15, 2024
@openshift-ci-robot
Copy link
Contributor

@mkowalski: This pull request references Jira Issue OCPBUGS-32141, which is invalid:

  • expected the bug to target either version "4.16." or "openshift-4.16.", but it targets "4.14.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Lately we were made aware that the current logic of maching interfaces to VIPs is broken in vSphere IPI scenarios when VIP does not belong to Machine Network. Usually such a combination would be forbidden, but for vSphere it is allowed.

As a result, we may have e.g. an interface 10.8.38.29, machine network 10.8.42.0/23 and VIP 10.8.0.83. As counterintuitively it looks for baremetal, with vSphere it is allowed.

This PR fixes the logic we introduced in January 2023 where we added a hard-check to make sure VIP belongs to a subnet of the NIC. With this new logic, if the scenario described above happens, we will fallback to the logic from years ago when we were simply choosing a NodeInternalIP of the matching IP stack.

Closes: OCPBUGS-32141

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 15, 2024
@openshift-cherrypick-robot

@mkowalski: once the present PR merges, I will cherry-pick it on top of release-4.15,release-4.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.15,release-4.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mkowalski
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 15, 2024
@openshift-ci-robot
Copy link
Contributor

@mkowalski: This pull request references Jira Issue OCPBUGS-32141, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2024
@cybertron
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 16, 2024
Copy link
Contributor

openshift-ci bot commented May 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cybertron, mkowalski

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 [cybertron,mkowalski]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-32141, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 17, 2024
@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-32141, which is invalid:

  • expected the bug to target either version "4.17." or "openshift-4.17.", but it targets "4.16.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@cybertron
Copy link
Member

/jira refresh
/label acknowledge-critical-fixes-only

This is a fix for a common use case on vsphere that is now being found in the field. We can't wait for 4.16 to ship before we get it in.

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label May 20, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 20, 2024
@openshift-ci-robot
Copy link
Contributor

@cybertron: This pull request references Jira Issue OCPBUGS-32141, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.17.0) matches configured target version for branch (4.17.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

/jira refresh
/label acknowledge-critical-fixes-only

This is a fix for a common use case on vsphere that is now being found in the field. We can't wait for 4.16 to ship before we get it in.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented May 20, 2024

@mkowalski: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit bc72f01 into openshift:master May 20, 2024
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@mkowalski: Jira Issue OCPBUGS-32141: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-32141 has been moved to the MODIFIED state.

In response to this:

Lately we were made aware that the current logic of maching interfaces to VIPs is broken in vSphere IPI scenarios when VIP does not belong to Machine Network. Usually such a combination would be forbidden, but for vSphere it is allowed.

As a result, we may have e.g. an interface 10.8.38.29, machine network 10.8.42.0/23 and VIP 10.8.0.83. As counterintuitively it looks for baremetal, with vSphere it is allowed.

This PR fixes the logic we introduced in January 2023 where we added a hard-check to make sure VIP belongs to a subnet of the NIC. With this new logic, if the scenario described above happens, we will fallback to the logic from years ago when we were simply choosing a NodeInternalIP of the matching IP stack.

Closes: OCPBUGS-32141

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-baremetal-runtimecfg-container-v4.17.0-202405210211.p0.gbc72f01.assembly.stream.el9 for distgit baremetal-runtimecfg.
All builds following this will include this PR.

@mkowalski mkowalski deleted the OCPBUGS-32141 branch May 27, 2024 11:34
mkowalski added a commit to mkowalski/baremetal-runtimecfg that referenced this pull request May 27, 2024
…for ingress)

In openshift#313 we have
fixed logic for topologies where VIP does not belong to the L2 of the
node. But this change was missing additional part of the code that had
the same flaw, i.e. generation of ingress config.

This PR is replicating the fix openshift#313.

Fixes: OCPBUGS-32141
mkowalski added a commit to mkowalski/baremetal-runtimecfg that referenced this pull request May 29, 2024
In openshift#313 we have
fixed some logic regarding to VIPs in ELB scenario, but we forgot to
handle the error. Because of this, even if we detected the IP correctly,
the function could stil return a non-empty error causing the
installation to fail.

This PR contains a simple fix to return `nil` instead of `err` in case
we managed to recover from the issue.

Fixes: OCPBUGS-32141
mkowalski added a commit to mkowalski/baremetal-runtimecfg that referenced this pull request Jun 3, 2024
…for ingress)

In openshift#313 we have
fixed logic for topologies where VIP does not belong to the L2 of the
node. But this change was missing additional part of the code that had
the same flaw, i.e. generation of ingress config.

This PR is replicating the fix openshift#313.

Fixes: OCPBUGS-32141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants