MGMT-20153: Fix ostree race between node-image-pull and installing to rootfs
ostree container unencapsulate panics if the image passed to it is already present in the repo. Use ostree container image pull instead. Additionally attempting to pull the same os image as the node-image-pull service at the same time also can lead to errors writing to the repo. So make startBootstrap run synchronously with the rest of InstallNode to ensure we are done applying the node image before attempting to pull the image for install.
Resolves https://issues.redhat.com/browse/MGMT-20153
@carbonin: This pull request references MGMT-20153 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 story to target the "4.19.0" version, but no target version was set.
In response to this:
ostree container unencapsulatepanics if the image passed to it is already present in the repo. Useostree container image pullinstead. Additionally attempting to pull the same os image as thenode-image-pullservice at the same time also can lead to errors writing to the repo. So makestartBootstraprun synchronously with the rest ofInstallNodeto ensure we are don applying the node image before attempting to pull the image for install.Resolves https://issues.redhat.com/browse/MGMT-20153
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.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
Related to https://github.com/openshift/installer/pull/9570
Codecov Report
Attention: Patch coverage is 61.11111% with 28 lines in your changes missing coverage. Please review.
Project coverage is 55.59%. Comparing base (
1076581) to head (4505593). Report is 2 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/ops/ops.go | 59.42% | 16 Missing and 12 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1076 +/- ##
==========================================
- Coverage 55.67% 55.59% -0.08%
==========================================
Files 15 15
Lines 3393 3421 +28
==========================================
+ Hits 1889 1902 +13
- Misses 1311 1317 +6
- Partials 193 202 +9
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/installer/installer.go | 68.37% <100.00%> (-0.21%) |
:arrow_down: |
| src/ops/ops.go | 45.62% <59.42%> (+0.37%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/test edge-e2e-ai-operator-ztp
/retest
@carbonin: This pull request references MGMT-20153 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 story to target the "4.19.0" version, but no target version was set.
In response to this:
ostree container unencapsulatepanics if the image passed to it is already present in the repo. Useostree container image pullinstead. Additionally attempting to pull the same os image as thenode-image-pullservice at the same time also can lead to errors writing to the repo. So makestartBootstraprun synchronously with the rest ofInstallNodeto ensure we are done applying the node image before attempting to pull the image for install.Resolves https://issues.redhat.com/browse/MGMT-20153
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.
I only skimmed this but FYI a lot of this I would consider internal implementation details subject to change, especically the ostree ref structures.
I'd like to have a good understanding of exactly what this is trying to do because it will need to be supported directly in bootc - and for bootc we have plans to switch to a new composefs-native store and stop doing the ostree-container flow, so directly invoking ostree will break when that happens.
Let's work on getting https://github.com/openshift/installer/pull/9570 tested and merged so we can clean up the ref manipulations here a bit.
Let's work on getting https://github.com/openshift/installer/pull/9570 tested and merged so we can clean up the ref manipulations here a bit.
I'll take a look at this after I get a reasonable general approach working. Once I have something that works and folks are happy with I'll test pulling out my addition to remove the node image ref in favor of the installer change.
I suspect if we want to test with 4.19 ec releases right after this is merged though I'll need to at least keep the touch in there then remove it after we get a build with your changes (or just after GA to ensure we're not using releases without the change)
This requires https://github.com/openshift/assisted-installer/pull/1076. Without it the cleanup service fails on the installed node.
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: carbonin, jlebon
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [carbonin]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/hold
until the assisted-service PR is merged.
@carbonin: 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.
/unhold
[ART PR BUILD NOTIFIER]
Distgit: ose-agent-installer-orchestrator This PR has been included in build ose-agent-installer-orchestrator-container-v4.19.0-202504021544.p0.g0e954b1.assembly.stream.el9. All builds following this will include this PR.
[ART PR BUILD NOTIFIER]
Distgit: ose-agent-installer-csr-approver This PR has been included in build ose-agent-installer-csr-approver-container-v4.20.0-202504021544.p0.g0e954b1.assembly.stream.el9. All builds following this will include this PR.