Skip to content

OCPBUGS-65847: vsphere: enable DHCP4/DHCP6 based on machine network I… - #10123

Open
rbbratta wants to merge 1 commit into
openshift:mainfrom
rbbratta:vsphere-dhcp6-fix
Open

OCPBUGS-65847: vsphere: enable DHCP4/DHCP6 based on machine network I…#10123
rbbratta wants to merge 1 commit into
openshift:mainfrom
rbbratta:vsphere-dhcp6-fix

Conversation

@rbbratta

Copy link
Copy Markdown
Contributor

…P families

This commit fixes the vSphere CAPI machine generation to correctly set DHCP4 and DHCP6 flags based on the InstallConfig's machine network configuration. Previously, DHCP4 was always enabled and DHCP6 was only enabled when IPv6 was detected, which caused issues for IPv6-only clusters.

Changes:

  • Replace hasIPv6MachineNetwork() with detectMachineNetworkIPFamilies() that returns both hasIPv4 and hasIPv6 by checking MachineNetwork and deprecated MachineCIDR fields
  • Update GenerateMachines() to set DHCP4=hasIPv4 and DHCP6=hasIPv6 instead of hard-coding DHCP4=true
  • Add comprehensive tests covering IPv4-only, IPv6-only, and dual-stack scenarios

This ensures:

  • IPv4-only: DHCP4=true, DHCP6=false
  • IPv6-only: DHCP4=false, DHCP6=true
  • Dual-stack: DHCP4=true, DHCP6=true

This prevents WaitingForIPAllocation failures for control-plane VMs in all network configurations by ensuring the VSphereMachine network devices match the machineconfig expectations.

Generated-by: GPT-5.1

…P families

This commit fixes the vSphere CAPI machine generation to correctly set
DHCP4 and DHCP6 flags based on the InstallConfig's machine network
configuration. Previously, DHCP4 was always enabled and DHCP6 was only
enabled when IPv6 was detected, which caused issues for IPv6-only
clusters.

Changes:
- Replace hasIPv6MachineNetwork() with detectMachineNetworkIPFamilies()
  that returns both hasIPv4 and hasIPv6 by checking MachineNetwork and
  deprecated MachineCIDR fields
- Update GenerateMachines() to set DHCP4=hasIPv4 and DHCP6=hasIPv6
  instead of hard-coding DHCP4=true
- Add comprehensive tests covering IPv4-only, IPv6-only, and dual-stack
  scenarios

This ensures:
- IPv4-only: DHCP4=true, DHCP6=false
- IPv6-only: DHCP4=false, DHCP6=true
- Dual-stack: DHCP4=true, DHCP6=true

This prevents WaitingForIPAllocation failures for control-plane VMs in
all network configurations by ensuring the VSphereMachine network
devices match the machineconfig expectations.

Generated-by: GPT-5.1
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 24, 2025
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rbbratta: This pull request references Jira Issue OCPBUGS-65847, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

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.

Details

In response to this:

…P families

This commit fixes the vSphere CAPI machine generation to correctly set DHCP4 and DHCP6 flags based on the InstallConfig's machine network configuration. Previously, DHCP4 was always enabled and DHCP6 was only enabled when IPv6 was detected, which caused issues for IPv6-only clusters.

Changes:

  • Replace hasIPv6MachineNetwork() with detectMachineNetworkIPFamilies() that returns both hasIPv4 and hasIPv6 by checking MachineNetwork and deprecated MachineCIDR fields
  • Update GenerateMachines() to set DHCP4=hasIPv4 and DHCP6=hasIPv6 instead of hard-coding DHCP4=true
  • Add comprehensive tests covering IPv4-only, IPv6-only, and dual-stack scenarios

This ensures:

  • IPv4-only: DHCP4=true, DHCP6=false
  • IPv6-only: DHCP4=false, DHCP6=true
  • Dual-stack: DHCP4=true, DHCP6=true

This prevents WaitingForIPAllocation failures for control-plane VMs in all network configurations by ensuring the VSphereMachine network devices match the machineconfig expectations.

Generated-by: GPT-5.1

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 commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rvanderp3 for approval. For more information see the Code Review Process.

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

Details Needs approval from an approver in each of these files:

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

@rbbratta

Copy link
Copy Markdown
Contributor Author

/hold

building for test on dualstack-primaryv6.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2025
@openshift-ci

openshift-ci Bot commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

@rbbratta: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/golint ca3b307 link true /test golint
ci/prow/okd-scos-e2e-vsphere-ovn ca3b307 link false /test okd-scos-e2e-vsphere-ovn
ci/prow/e2e-aws-ovn ca3b307 link true /test e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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-bot

Copy link
Copy Markdown
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 23, 2026
@openshift-bot

Copy link
Copy Markdown
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci Bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 25, 2026
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 88cad03c-3570-4313-83b2-4679a9e17912

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-bot

Copy link
Copy Markdown
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close not-planned

@openshift-ci

openshift-ci Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

@openshift-bot: PRs cannot be closed as Not Planned.

Details

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close not-planned

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.

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants