Skip to content

MGMT-22849: Remove the nmconnection that the openshift-installer writes for the bootstrap.#10086

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
giladravid16:MGMT-22849
Apr 12, 2026
Merged

MGMT-22849: Remove the nmconnection that the openshift-installer writes for the bootstrap.#10086
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
giladravid16:MGMT-22849

Conversation

@giladravid16
Copy link
Copy Markdown
Contributor

The openshift-installer includes an nmconnection in the bootstrap.ign in order to configure static networking, but we have our own way to do it, so this file is always empty.
If static networking is configured for the bootstrap, and that static networking actually just requests dhcp, then this empty nmconnection makes the bootstrap fail to reboot.

I tested this on an environment that used ACM with siteconfig to deploy a 3+2 spoke cluster.
The ClusterInstance had node network configuration for each node, and they all requested dhcp.
Without this fix all nodes were installed successfully except for the bootstrap which was stuck after the reboot because it didn't have networking, manually deleting the empty nmconnection and rebooting fixed the issue.
With this fix the spoke cluster finishes the installation successfully without manual intervention.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

…es for the bootstrap.

The openshift-installer includes an nmconnection in the bootstrap.ign in order to configure static networking, but we have our own way to do it, so this file is always empty.
If static networking is configured for the bootstrap, and that static networking actually just requests dhcp, then this empty nmconnection makes the bootstrap fail to reboot.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Mar 29, 2026

@giladravid16: This pull request references MGMT-22849 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

The openshift-installer includes an nmconnection in the bootstrap.ign in order to configure static networking, but we have our own way to do it, so this file is always empty.
If static networking is configured for the bootstrap, and that static networking actually just requests dhcp, then this empty nmconnection makes the bootstrap fail to reboot.

I tested this on an environment that used ACM with siteconfig to deploy a 3+2 spoke cluster.
The ClusterInstance had node network configuration for each node, and they all requested dhcp.
Without this fix all nodes were installed successfully except for the bootstrap which was stuck after the reboot because it didn't have networking, manually deleting the empty nmconnection and rebooting fixed the issue.
With this fix the spoke cluster finishes the installation successfully without manual intervention.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 29, 2026

Walkthrough

This PR adds a helper function to detect NetworkManager connection files and updates the updateBootstrap function to explicitly skip these files during bootstrap manifest processing, ensuring they are excluded from the regenerated bootstrap file set.

Changes

Cohort / File(s) Summary
NetworkManager connection file exclusion
internal/ignition/installmanifests.go, internal/ignition/installmanifests_test.go
Added isNMConnection helper to identify NM connection files at /etc/NetworkManager/system-connections/nmconnection and updated updateBootstrap to skip them. Test fixture updated to include NM connection file and test logic verified that the file is excluded from the resulting bootstrap ignition manifest.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

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

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

@openshift-ci openshift-ci Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 29, 2026
@openshift-ci openshift-ci Bot requested review from danielerez and eliorerz March 29, 2026 11:38
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giladravid16

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 29, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
internal/ignition/installmanifests_test.go (1)

176-190: Assert the path directly instead of reusing isNMConnection.

The test currently shares the same predicate as updateBootstrap, so a bad helper change can make both the filter and the assertion fail in the same way and still pass. Check the literal path here so the regression is actually pinned.

♻️ Suggested test hardening
 		var file *config_32_types.File
 		foundNMConfig := false
-		foundNMConncetion := false
+		foundNMConnection := false
 		for i := range config.Storage.Files {
 			if isBMHFile(&config.Storage.Files[i]) {
 				file = &config.Storage.Files[i]
 			}
 			if config.Storage.Files[i].Node.Path == "/etc/NetworkManager/conf.d/99-kni.conf" {
 				foundNMConfig = true
 			}
-			if isNMConnection(&config.Storage.Files[i]) {
-				foundNMConncetion = true
+			if config.Storage.Files[i].Node.Path == "/etc/NetworkManager/system-connections/nmconnection" {
+				foundNMConnection = true
 			}
 		}
 		bmh, _ = fileToBMH(file)
 		Expect(foundNMConfig).To(BeTrue(), "file /etc/NetworkManager/conf.d/99-kni.conf not present in bootstrap.ign")
-		Expect(foundNMConncetion).To(BeFalse())
+		Expect(foundNMConnection).To(BeFalse(), "file /etc/NetworkManager/system-connections/nmconnection should be removed from bootstrap.ign")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/ignition/installmanifests_test.go` around lines 176 - 190, Replace
the test's use of the helper isNMConnection when checking for network connection
files: instead of setting foundNMConncetion via
isNMConnection(&config.Storage.Files[i]), explicitly compare
config.Storage.Files[i].Node.Path to the concrete NM connection path used by
updateBootstrap (locate the expected path in the updateBootstrap implementation)
and set foundNMConncetion based on that literal string comparison; then assert
Expect(foundNMConncetion).To(BeFalse()). This pins the test to the actual path
rather than the same predicate the production code uses (isNMConnection).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/ignition/installmanifests_test.go`:
- Around line 176-190: Replace the test's use of the helper isNMConnection when
checking for network connection files: instead of setting foundNMConncetion via
isNMConnection(&config.Storage.Files[i]), explicitly compare
config.Storage.Files[i].Node.Path to the concrete NM connection path used by
updateBootstrap (locate the expected path in the updateBootstrap implementation)
and set foundNMConncetion based on that literal string comparison; then assert
Expect(foundNMConncetion).To(BeFalse()). This pins the test to the actual path
rather than the same predicate the production code uses (isNMConnection).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7692acb-6c4f-43ac-bdd9-a344dd0bf994

📥 Commits

Reviewing files that changed from the base of the PR and between d59c041 and 3545b2b.

📒 Files selected for processing (2)
  • internal/ignition/installmanifests.go
  • internal/ignition/installmanifests_test.go

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.95%. Comparing base (acc8646) to head (3545b2b).
⚠️ Report is 51 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10086      +/-   ##
==========================================
+ Coverage   44.17%   45.95%   +1.77%     
==========================================
  Files         416      416              
  Lines       72404    77812    +5408     
==========================================
+ Hits        31985    35757    +3772     
- Misses      37522    38983    +1461     
- Partials     2897     3072     +175     
Files with missing lines Coverage Δ
internal/ignition/installmanifests.go 55.49% <100.00%> (+0.19%) ⬆️

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@giladravid16
Copy link
Copy Markdown
Contributor Author

/retest-required

@linoyaslan
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 86cd2ee and 2 for PR HEAD 3545b2b in total

@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 6030b77 and 1 for PR HEAD 3545b2b in total

@giladravid16
Copy link
Copy Markdown
Contributor Author

/retest-required

1 similar comment
@giladravid16
Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 31, 2026

@giladravid16: The following test 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/e2e-agent-compact-ipv4-iso-no-registry 3545b2b link false /test e2e-agent-compact-ipv4-iso-no-registry

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-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD ba89549 and 0 for PR HEAD 3545b2b in total

@giladravid16
Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 866e3ab and 2 for PR HEAD 3545b2b in total

@openshift-merge-bot openshift-merge-bot Bot merged commit 3281224 into openshift:master Apr 12, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants