-
Notifications
You must be signed in to change notification settings - Fork 410
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
MCO-289: OCPBUGS-1324: Teach the MCO to use new format image #3317
MCO-289: OCPBUGS-1324: Teach the MCO to use new format image #3317
Commits on Sep 27, 2022
-
Rename BaseOperatingSystem... to BaseOSContainer..
We decided baseOSContainerImage was clearer than baseOperatingSystemContainer (and the same for the extensions container) so this renames all of this throughout to match. I'm doing this first before all of the rest of the "new image by default" code so if we have to revert one of those commits, we don't have to worry about the names. This just renames all instances of the BaseOperatingSystem variables througout to BaseOS and favors the more clear "ContainerImage" suffix rather than the less clear "Container", as "Container" typically signifies something that's running.
Configuration menu - View commit details
-
Copy full SHA for 489fe37 - Browse repository at this point
Copy the full SHA 489fe37View commit details -
Kernel/Exetensions support for new image format
Now that we have the extensions container, we can apply extensions and switch kernels again. This just re-enables that functionality for the 'new image' path during daemon updates, and removes the "not supported" messages.
Configuration menu - View commit details
-
Copy full SHA for 16ac486 - Browse repository at this point
Copy the full SHA 16ac486View commit details -
Initialize NodeUpdaterClient with kubelet secrets
Both rpm-ostree rebase and update require access to the pull secrets in order to pull manifests and images. This changes the behavior such that we symlink the kubelet config.json secrets to /run/ostree/auth.json when we initialize our "NodeUpdaterClient" (rather than only in rebase) so any of our rpm-ostree calls can use it.
Configuration menu - View commit details
-
Copy full SHA for 4802b34 - Browse repository at this point
Copy the full SHA 4802b34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2106a44 - Browse repository at this point
Copy the full SHA 2106a44View commit details -
Plumbing for extensions container in machineconfig
Until we figure out if/how we want to use the extensions container as a service, we're going to have to extract it to disk to use it. In order for that to happen, the daemon needs to know where to get it, so it needs to be present in machineconfig. This adds the extensions container to the machineconfig type, the crd, and the resourcemerge library.
Configuration menu - View commit details
-
Copy full SHA for ed7c119 - Browse repository at this point
Copy the full SHA ed7c119View commit details -
Pass extensions container through to machineconfig
This passes the extensions container from controller config through to machineconfig.
Configuration menu - View commit details
-
Copy full SHA for 588386f - Browse repository at this point
Copy the full SHA 588386fView commit details -
Extract the os extensions container to disk
Since we can't use the extensions container as a service right now due to boostrap/dns/complexity, for now, we're going to extract them to disk like we did the extensions in machine-os-contanet. This pulls and extracts the extensions container to /run and adds it as a yum repo if we are on a new format image and there are extensions present in MachineConfig.
Configuration menu - View commit details
-
Copy full SHA for b35936e - Browse repository at this point
Copy the full SHA b35936eView commit details -
Allow operator to skip the OSImageURL check
Currently if someone overrides OSImageURL on their master pool, the required pools sync in the operator will fail because it checks to make sure the OSImageURL matches, and when it's overridden it doesn't. (This results in degradation and timeouts). The check was originally put in to fix a bug around proper update completion reporting. This allows the check to be skipped if the user has "taken the wheel" by overriding OSImageURL.
Configuration menu - View commit details
-
Copy full SHA for 6317747 - Browse repository at this point
Copy the full SHA 6317747View commit details -
Gate "new image format by default" on boolean var
This adds an "image selection function" to the controller helpers and a boolean variable in helpers.go that determines which image it will use by default. The intent is that it is that it be set to false by default here, rendering the "new image format by default" functionality inert, but that a later commit will enable it. This logic can be taken out later once we get rid of machine-os-content.
Configuration menu - View commit details
-
Copy full SHA for da2228f - Browse repository at this point
Copy the full SHA da2228fView commit details -
Enable "use new format image by default"
This just flips our "gating boolean" to true so that the MCO will use the new format image by default.
Configuration menu - View commit details
-
Copy full SHA for e505cb7 - Browse repository at this point
Copy the full SHA e505cb7View commit details -
Exclude extensions container for FCOS
This excludes all non-base (right now, only extensions) images from image-references if the build is using fcos, because we currently don't ship fcos extensions images, and including them would break the payload. This also removes the baseOSExtensionsContainerImage from the osimagurl configmap so the placeholder value doesn't get passed through. (oc won't rewrite it if it's not in image-references).
Configuration menu - View commit details
-
Copy full SHA for e26e51e - Browse repository at this point
Copy the full SHA e26e51eView commit details -
MCO-356: daemon/firstboot: Do a secondary in-place update if rpm-ostr…
…ee is too old xref coreos/rpm-ostree@89f5802 Change the logic for firstboot OS updates to detect if rpm-ostree is too old to natively fetch a container image on its own. If so, we use `ex deploy-from-self` via podman. Introduce a new `/etc/machine-config-daemon-force-once` file that will cause us to skip validation, and hence we should re-reconcile and attempt to apply the OS upgrade again, this time natively via rpm-ostree. This is needed for scaleup of old nodes, as well as temporarily for 4.11 upgrades.
Configuration menu - View commit details
-
Copy full SHA for b63b319 - Browse repository at this point
Copy the full SHA b63b319View commit details -
Make verification pass if commit hashes match
rpm-ostree deploy-from-self does get us to the right image, but the MCO doesn't know that because the OSImageURL/Container Name/Custom Deployment name doesn't get set when it rebases, it just uses the commit hash. This tells the MCO to: - inspect the current image specified by OSImageURL, - grab its commit hash from the labels - compare it to the base commit of what we have on-disk. If they match, we know we are on the correct image, even if we did not get there the usual way.
Configuration menu - View commit details
-
Copy full SHA for 9c6b021 - Browse repository at this point
Copy the full SHA 9c6b021View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7a1c7b - Browse repository at this point
Copy the full SHA f7a1c7bView commit details -
daemon: Remove more leftover cruft from double-reboot attempt
Not needed anymore.
Configuration menu - View commit details
-
Copy full SHA for 52f0cf0 - Browse repository at this point
Copy the full SHA 52f0cf0View commit details