-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overlay node image before bootstrapping if necessary #899
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
23f9c3f
to
48c6cc1
Compare
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale Now that openshift/enhancements#1637 has merged, we will need this. I'll leave it in draft for now until I can rebase and retest it, but feel free to start reviewing. |
Because that's effectively what it is. Also use that in another case that was manually calling `stat`.
As per openshift/enhancements#1637, we're trying to get rid of all OpenShift-versioned components from the bootimages. This means that there will no longer be oc, kubelet, or crio binaries for example, which bootstrapping obviously relies on. To adapt to this, the OpenShift installer now ships a new `node-image-overlay.service` in its bootstrap Ignition config. This service takes care of pulling down the node image and overlaying it, effectively updating the system to the node image version. Here, we accordingly also adapt assisted-installer so that we run `node-image-overlay.service` before starting e.g. `kubelet.service` and `bootkube.service`. See also: openshift/installer#8742
48c6cc1
to
33d9f10
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jlebon The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Rebased and verified this still works! Requires openshift/installer#8742. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #899 +/- ##
==========================================
- Coverage 55.20% 52.35% -2.85%
==========================================
Files 15 14 -1
Lines 3286 2695 -591
==========================================
- Hits 1814 1411 -403
+ Misses 1292 1159 -133
+ Partials 180 125 -55
|
@jlebon: The following tests failed, say
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. |
@@ -669,6 +685,25 @@ func (i *installer) waitForBootkube(ctx context.Context) { | |||
} | |||
} | |||
|
|||
func (i *installer) waitForNodeImageOverlay(ctx context.Context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it can be change to just call utils.WaitForPredicate with
i.ops.SystemctlAction("is-active", "node-image-overlay.service")
WDYT?
// DryRebootHappened checks if a reboot happened according to a particular reboot marker path | ||
// The dry run installer creates this file on "Reboot" (instead of actually rebooting) | ||
// We use this function to check whether the given node in the cluster have already rebooted | ||
func (o *ops) DryRebootHappened(markerPath string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO lets leave this one as it helps to understand that we are looking for dry reboot logic, it can though call for FileExists
|
||
i.waitForNodeImageOverlay(context.Background()) | ||
|
||
if !i.ops.FileExists("/usr/bin/oc") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make /usr/bin/oc to be a const?
// If we're in a pure RHEL/CentOS environment, we need to overlay the node image | ||
// first to have access to e.g. oc, kubelet, cri-o, etc... | ||
// https://github.com/openshift/enhancements/pull/1637 | ||
if !i.ops.FileExists("/usr/bin/oc") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we pull overlay the node image as a first thing? I mean we already applied bootstrap ignition at this point and this can be a little bit late for us to pull another image layer, we probably should do it before
As per openshift/enhancements#1637, we're trying
to get rid of all OpenShift-versioned components from the bootimages.
This means that there will no longer be oc, kubelet, or crio
binaries for example, which bootstrapping obviously relies on.
To adapt to this, the OpenShift installer now ships a new
node-image-overlay.service
in its bootstrap Ignition config. Thisservice takes care of pulling down the node image and overlaying it,
effectively updating the system to the node image version.
Here, we accordingly also adapt assisted-installer so that we run
node-image-overlay.service
before starting e.g.kubelet.service
andbootkube.service
.See also: openshift/installer#8742