Skip to content

OCPBUGS-143026: Skip NetworkManager-clean-initrd-state on iSCSI roots - #1993

Open
bfournie wants to merge 1 commit into
openshift-metal3:masterfrom
bfournie:iscsi-skip-nm-clean-initrd-state
Open

bfournie wants to merge 1 commit into
openshift-metal3:masterfrom
bfournie:iscsi-skip-nm-clean-initrd-state

Conversation

@bfournie

Copy link
Copy Markdown
Contributor

Workaround for OCPBUGS-143026, needed by the ISCSI boot mode with static networking (#1992).

With root on iSCSI and static networking, nodes lose their root disk on every boot after firstboot. On those boots the initramfs activates the iSCSI NIC with a profile that nm-initrd-generator builds from ip=<mac>:ibft. MCO's NetworkManager-clean-initrd-state (opted in for baremetal) then finds the user's static keyfile for the same NIC in /etc and runs ip addr flush on it, which cuts the iSCSI session. Once recovery_tmo (120s) expires, the root disk fails with I/O errors. In agent installs this hits the boot after machine-config-daemon-firstboot pivots to the payload OS, so the install fails.

This adds a MachineConfig drop-in for the master and worker roles that skips the unit when rd.iscsi.firmware or netroot is on the kernel command line. That is the same check coreos-teardown-initramfs uses to keep iSCSI networking up, and the same change proposed for MCO. It applies only with AGENT_E2E_TEST_BOOT_MODE=ISCSI, and AGENT_ISCSI_SKIP_NM_CLEAN_INITRD_STATE=false disables it to reproduce the bug.

Tested together with #1992: a compact (3-node) install with AGENT_E2E_TEST_BOOT_MODE=ISCSI and AGENT_E2E_TEST_SCENARIO=COMPACT_IPV4 completed, with all nodes Ready on their static IPs, and a node rebooted after installation came back Ready. On the nodes:

NetworkManager-clean-initrd-state.service - Cleans NetworkManager state generated by dracut was skipped because of an unmet condition check (ConditionKernelCommandLine=!rd.iscsi.firmware)

This is a temporary workaround. If the MCO fix for OCPBUGS-143026 merges first, this PR can be closed.

🤖 Generated with Claude Code

With static networking and root on iSCSI, nodes lose their root disk on the
second boot, after machine-config-daemon-firstboot has pivoted to the payload
OS. On that boot the initramfs activates the iSCSI NIC with a profile that
nm-initrd-generator builds from ip=<mac>:ibft. MCO's
NetworkManager-clean-initrd-state, opted in for baremetal, then finds a
different profile for that NIC in /etc (the user's static keyfile) and runs
"ip addr flush" on it. That cuts the iSCSI session, and the root disk fails
with EIO once recovery_tmo expires. Confirmed with a dry run of the script on a
live node.

The boot-image OS escapes this only because nothing pulls in
network-online.target there, which the unit is WantedBy.

Until MCO handles it (OCPBUGS-143026), add a drop-in that skips the unit when rd.iscsi.firmware
or netroot is on the kernel command line, the same check
coreos-teardown-initramfs uses to keep iSCSI networking up.
AGENT_ISCSI_SKIP_NM_CLEAN_INITRD_STATE=false reproduces the bug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from lranjbar and zaneb November 20, 2026 01:42
@openshift-ci

openshift-ci Bot commented Nov 20, 2026

Copy link
Copy Markdown

@bfournie: 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/e2e-agent-5control-ipv4 f97ba6a link false /test e2e-agent-5control-ipv4
ci/prow/e2e-agent-compact-ipv4-iso-no-registry f97ba6a 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.

@andfasano

Copy link
Copy Markdown
Member

/approve
/lgtm
/hold

@bfournie please check if it's really needed

@openshift-ci openshift-ci Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 23, 2026
@openshift-ci

openshift-ci Bot commented Nov 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

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 Nov 23, 2026
@bfournie

Copy link
Copy Markdown
Contributor Author

/approve /lgtm /hold

@bfournie please check if it's really needed
Let's wait. I asked the MCO team to review openshift/machine-config-operator#6776.
When that merges we won't need this fix.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants