You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Design for osImageURL updates - integration with CVO/release payload #183
I wanted to elaborate here on the current status of this. We have a PR in #363 which will finally close the loop and inject machine-os-content from the release payload all the way into the MachineConfig objects, which will result in the MCD updating.
The final architecture will be:
New kernel errata, turns into RPM, converted into ostree then oscontainer. A bit more information on the build system side here. The oscontainer makes it into a new release payload published on quay.io.
At some point the release payload pulled down by CVO, which includes a osimageurl ConfigMap that references that container (same thing as the machine-os-content ImageStream). The CVO updates the ConfigMap, which you can see via
oc -n openshift-machine-config-operator get configmap/machine-config-osimageurl
The operator notices the change to the configmap and updates the "controllerconfig" which is an internal CRD that is used as the primary input to the MCC. See oc get -o yaml controllerconfig.
The "template" sub-controller of the MCC then updates machineconfigs/00-master and machineconfigs/00-worker.
The "render" sub-controller of the MCC generates new "rendered" MCs that look like machineconfigs/master-<hash> and machineconfigs/worker-<hash> and updates the MachineConfigPools to target them. For more information on this, see the MCC docs.
On each node the MCD will get the new osimageurl, and if it's different than what's booted, it will pull down the container and rebase to it and reboot. This is also the same as any other config change.
For completeness, one alternative is to make it a MachineConfig object instead, which is then used as the base config containing the osImageURL in which all other (Ignition) configs are merged into. I think this maps slightly more closely to what's currently done today.
That said, using a separate ConfigMap allows us to have richer metadata. E.g. pkg lists & diffs, OSTree commits & versions, etc... The idea being that an "Update available" button can show all that stuff without having to hunt down the osImage.
Remember, this data will need to flow one way or another down into a MachineConfig. If it's easier we could add some more information to MCs themselves.
Remember, this data will need to flow one way or another down into a MachineConfig. If it's easier we could add some more information to MCs themselves.
I think it shouldn't be too hard to adapt the MCC either way so we shouldn't constrain ourselves too much on what's easier.
Basically, we can include a subset of what coreos-assembler already outputs.
Do we need anything other than the "registry.svc.ci.openshift.org/rhcos/os-maipo@sha256:4efb36f476405f8e30256733ac900e11b70833dc6a6b54179db60a501fa47124", string?
EDIT: Ah sorry I missed this:
The idea being that an "Update available" button can show all that stuff without having to hunt down the osImage.
Yeah, though...a tricky part about this is that the pkgdiff is against the previous version, which may not be the one they're updating to...
Mmm. I'm OK stuffing the whole meta.json in there for now, but I suspect we're going to need to add something smarter later.
Yeah, though...a tricky part about this is that the pkgdiff is against the previous version, which may not be the one they're updating to...
Yeah, I think to do this correctly, the pkg diff would have to be done from the pkg lists instead rather than precomputed. Anyway, those are things that could easily come later. We just have to make sure we leave the door open for it.
Mmm. I'm OK stuffing the whole meta.json in there for now, but I suspect we're going to need to add something smarter later.
Be aware you’re going to eventually need to have a distinction between “the config says this is the latest” and “I’m ready to roll that out to the nodes”. Design with that in mind because new kubeelts are going to happen ~ 1/week
Pkgdiff is useless. There is no guarantee it has any relevance. Think package manifest instead of diffs. Our errata and higher level tools will calculate the diff
Be aware you’re going to eventually need to have a distinction between “the config says this is the latest” and “I’m ready to roll that out to the nodes”. Design with that in mind because new kubeelts are going to happen ~ 1/week
Can you elaborate on that? Do you mean making sure we actually upgrade to the selected release instead of whatever happens to now be the latest at the time we're actually ready to upgrade? I think that should be covered yeah. The metadata includes the full sha256 of the oscontainer.
Pkgdiff is useless. There is no guarantee it has any relevance. Think package manifest instead of diffs. Our errata and higher level tools will calculate the diff
We don't decide on version 4.0.6 until the last moment. So the goal of automation is to continuously have a set of 4.0.6 candidates that we then pick one and ship it. The "train" mindset, not the "artisanal release payload".
Expectation is that you will build an image and push it to the openshift origin integration image stream, then reference the component “os” from this operator and have the dummy value substituted.
In OCP, we do something similar where the OS content gets built via whatever process and shows up in the prerelease list, and is processed the same way.
You can build anywhere - we just need you to push/be imported to the right place
Note the dummy value can be real - but since we need to mirror the content you have to be referenced in the operator list which means you need to be sucked into the right place.
Push vs scheduled import is also possible, but if we do scheduled import the source location has to be appropriately gated like a push would (only changes if you test against latest in an install)
... but if we do scheduled import the source location has to be appropriately gated like a push would (only changes if you test against latest in an install)
That breaks the sceduled-import model, doesn't it? How do you know the "latest" test used for the gate hadn't been surpassed by further release-payload work? Or will errors there be caught by post-testing?
My notes from playing around with MCD state so far;
I am still a bit confused as to the current flow of the osImageURL; should oc edit machineconfig/00-worker work to render or a new one? Currently I edit the generated one.
Next, currently our oscontainers are uploaded to api.ci under the rhcos/ namespace and they require a separate pull secret, and we don't have a defined way to upload that to nodes. Actually I am a bit confused by pull secrets today, there is openshift/installer#775 which merged but I don't see /root/.docker being created on my master/worker?
For some reason it's not working to podman login manually, need to trace that.
Activity
jlebon commentedon Nov 19, 2018
For completeness, one alternative is to make it a
MachineConfigobject instead, which is then used as the base config containing theosImageURLin which all other (Ignition) configs are merged into. I think this maps slightly more closely to what's currently done today.That said, using a separate
ConfigMapallows us to have richer metadata. E.g. pkg lists & diffs, OSTree commits & versions, etc... The idea being that an "Update available" button can show all that stuff without having to hunt down the osImage.ashcrow commentedon Nov 19, 2018
Remember, this data will need to flow one way or another down into a
MachineConfig. If it's easier we could add some more information to MCs themselves.jlebon commentedon Nov 19, 2018
Strawman:
Basically, we can include a subset of what coreos-assembler already outputs. Or maybe just a link to that
meta.jsoninstead?jlebon commentedon Nov 19, 2018
I think it shouldn't be too hard to adapt the MCC either way so we shouldn't constrain ourselves too much on what's easier.
ashcrow commentedon Nov 19, 2018
Fair. Rephrased: what's doable and consumable within specific constraints 😃
cgwalters commentedon Nov 19, 2018
Do we need anything other than the
"registry.svc.ci.openshift.org/rhcos/os-maipo@sha256:4efb36f476405f8e30256733ac900e11b70833dc6a6b54179db60a501fa47124",string?EDIT: Ah sorry I missed this:
Yeah, though...a tricky part about this is that the pkgdiff is against the previous version, which may not be the one they're updating to...
Mmm. I'm OK stuffing the whole
meta.jsonin there for now, but I suspect we're going to need to add something smarter later.jlebon commentedon Nov 20, 2018
Yeah, I think to do this correctly, the pkg diff would have to be done from the pkg lists instead rather than precomputed. Anyway, those are things that could easily come later. We just have to make sure we leave the door open for it.
Yeah, that sounds fine to me.
smarterclayton commentedon Nov 20, 2018
Be aware you’re going to eventually need to have a distinction between “the config says this is the latest” and “I’m ready to roll that out to the nodes”. Design with that in mind because new kubeelts are going to happen ~ 1/week
smarterclayton commentedon Nov 20, 2018
Pkgdiff is useless. There is no guarantee it has any relevance. Think package manifest instead of diffs. Our errata and higher level tools will calculate the diff
jlebon commentedon Nov 21, 2018
Can you elaborate on that? Do you mean making sure we actually upgrade to the selected release instead of whatever happens to now be the latest at the time we're actually ready to upgrade? I think that should be covered yeah. The metadata includes the full sha256 of the oscontainer.
Yup, see coreos/coreos-assembler#226.
smarterclayton commentedon Nov 26, 2018
We don't decide on version 4.0.6 until the last moment. So the goal of automation is to continuously have a set of 4.0.6 candidates that we then pick one and ship it. The "train" mindset, not the "artisanal release payload".
smarterclayton commentedon Nov 30, 2018
Expectation is that you will build an image and push it to the openshift origin integration image stream, then reference the component “os” from this operator and have the dummy value substituted.
In OCP, we do something similar where the OS content gets built via whatever process and shows up in the prerelease list, and is processed the same way.
You can build anywhere - we just need you to push/be imported to the right place
smarterclayton commentedon Nov 30, 2018
Note the dummy value can be real - but since we need to mirror the content you have to be referenced in the operator list which means you need to be sucked into the right place.
Push vs scheduled import is also possible, but if we do scheduled import the source location has to be appropriately gated like a push would (only changes if you test against latest in an install)
wking commentedon Nov 30, 2018
That breaks the sceduled-import model, doesn't it? How do you know the "latest" test used for the gate hadn't been surpassed by further release-payload work? Or will errors there be caught by post-testing?
cgwalters commentedon Dec 6, 2018
My notes from playing around with MCD state so far;
I am still a bit confused as to the current flow of the
osImageURL; shouldoc edit machineconfig/00-workerwork to render or a new one? Currently I edit the generated one.Next, currently our oscontainers are uploaded to api.ci under the
rhcos/namespace and they require a separate pull secret, and we don't have a defined way to upload that to nodes. Actually I am a bit confused by pull secrets today, there is openshift/installer#775 which merged but I don't see/root/.dockerbeing created on my master/worker?For some reason it's not working to
podman loginmanually, need to trace that.40 remaining items
kikisdeliveryservice commentedon Jan 16, 2019
Gotcha will try again with proper order for 2nd test MC to see if that was the cause of errors.
kikisdeliveryservice commentedon Jan 16, 2019
Ok tried the second config with name:
00-0valters-worker-osimageurl🤣 to land in the first spot and it updated as I expected.WIP: add --coreos-url to `oc adm release new`
adm/release-new: Add --coreos-url to override machine-os-content
cgwalters commentedon Feb 14, 2019
If today one wants to test an os update, here's an object you can
oc create:cgwalters commentedon Feb 18, 2019
This finally landed in #426