This conversation started as a way to provide useful metadata about the available/supported extensions that are shipped alongside the OS update in the machine-os-content. But it grew into providing more information like kernel version or glibc version.
We will likely pursue the idea of encoding the kernel version as an annotation to the machine-os-content, but let's continue to think about other useful metadata to machine-os-content consumers/users.
Pulling out some conversation from openshift/machine-config-operator#1850
@miabbott says:
Maybe we should be including a JSON file or the like in machine-os-content that provides the list of supported extensions? Since we are responsible for sticking the right RPMs and deps into the container, seems like we are in the best position to enumerate the supported extensions per oscontainer/release.
Could even go as far as providing a supported and unsupported list, if we were to ever decide to drop support for an extension.
@sinnykumari replies:
agree, if we want to extend this to supported/unsupported list then machine-os-content seems to be the right place to provide that detail.
For now I think it should be fine for MCO to consume extensions as it is because we ship only those extra packages in machine-os-content which we want users to install. #1766 makes things really flexible to update MCD behavior whenever neededd
@cgwalters replies:
The new v2 layout https://gitlab.cee.redhat.com/coreos/redhat-coreos/-/merge_requests/952 aims to have "enumerate extensions" simply use the filesystem. Basically:
List all sub-directories of extensions/
Skip dependencies/
If the directory has any .rpm files in it, it's an extension
Not opposed to a JSON list, but keep in mind the rpm-md repodata is already a "list of packages" (just in XML form). We'd be inventing "rpm metadata in JSON form"?
@jlebon replies:
I think this is fine to start, though IMO there's definitely an argument for having the flexibility that some metadata layer affords us. For example, if we want extension "foobar" to actually result in the installation of two related, but not necessarily dependent packages. Or if we want to change how extension "foobar" is implemented at the RPM level across an update.
I think actually this might help with the Recommends issue as well. If we solve that and turn it off by default both server-side and client-side, then we'll need a way to pull in recommended packages which no longer get pulled in when it makes sense (and without globally turning on weak deps again client-side).
Anything we change inside the container though isn't solving the issue that validating a MachineConfig fragment requires fetching and unpacking the container.
@miabbott revives the idea:
In a real-time meeting with @zvonkok @mrunalp @darkmuggle (re: openshift/enhancements#357) we discussed adding additional annotations to the machine-os-content about the kernel version (and possibly the glibc version) used by RHCOS. This would help the users doing out-of-tree module builds by providing the information in the metadata, rather than having to pull down the entire container image.
It was brought up that we could go a step further and also enumerate the available extensions in an annotation on the machine-os-content. This could provide similar benefits to allowing users (or tooling) to inspect the metadata of machine-os-content to determine which extensions are supported/available in a particular image.
This conversation started as a way to provide useful metadata about the available/supported extensions that are shipped alongside the OS update in the
machine-os-content. But it grew into providing more information like kernel version or glibc version.We will likely pursue the idea of encoding the kernel version as an annotation to the
machine-os-content, but let's continue to think about other useful metadata tomachine-os-contentconsumers/users.Pulling out some conversation from openshift/machine-config-operator#1850
@miabbott says:
@sinnykumari replies:
@cgwalters replies:
@jlebon replies:
@miabbott revives the idea: