OCPBUGS-77924: cleanup orphaned boot entries in IPC#6054
Conversation
|
@danmanor: This pull request references Jira Issue OCPBUGS-77924, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this: 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. |
|
@danmanor: This pull request references Jira Issue OCPBUGS-77924, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
de372b7 to
3ff99d4
Compare
|
/hold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jc-rh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
removeOrphanedBootEntries()to the IPC idle handler cleanup flow, which removes/boot/ostree/directories that don't match any stateroot listed inrpm-ostree deployments
/bootcaused by stale boot entries (e.g. from the seed image or IBI) that have no corresponding deployed staterootipc_idle_handlers_test.goby overriding theosReadDirpackage variable for tests that exerciseCleanupUnbootedStaterootsDetails
On RHCOS formatted disks there is only room for 2 boot entries at the same time. We observed cases where an old boot entry from the seed image (dated 2022)
persisted in
/boot/ostree/with no matching stateroot inostree admin status. This left no space for the IP Configuration flow to create its targetstateroot, causing failures in the pre-pivot phase.
The existing
removeBootDirsByStaterootPrefixes()only cleans up boot entries for stateroots that appear as unbooted deployments in rpm-ostree. It doesnot handle entries whose stateroot was already fully removed from all deployments (i.e. truly orphaned entries). The new
removeOrphanedBootEntries()function complements it by querying all deployed stateroots and removing any
/boot/ostree/directory that doesn't match any of them.Test plan
removeOrphanedBootEntries: basic removal, missing/boot/ostree/dir, multiple deploymentsQueryStatus/ReadDircallsTestIPCIdleStageHandler_Handlesubtests passmake golangci-lint)