Skip to content
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

Move from hardcoded extensions to using extensions.json #2445

Closed
jlebon opened this issue Mar 1, 2021 · 7 comments
Closed

Move from hardcoded extensions to using extensions.json #2445

jlebon opened this issue Mar 1, 2021 · 7 comments
Labels
jira lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@jlebon
Copy link
Member

jlebon commented Mar 1, 2021

In coreos/coreos-assembler#2028, we now include an extensions.json in the m-o-c which details extensions available in the embedded yumrepo, as well as the corresponding RPMs, e.g.:

{
  "extensions": {
    "kernel-devel": {
      "packages": [
        "kernel-devel-4.18.0-240.15.1.el8_3",
        "kernel-headers-4.18.0-240.15.1.el8_3"
      ],
      "match-base-evr": "kernel",
      "kind": "os-extension"
    },
    "kernel": {
      "packages": [
        "kernel-4.18.0-240.15.1.el8_3",
        "kernel-core-4.18.0-240.15.1.el8_3",
        "kernel-modules-4.18.0-240.15.1.el8_3",
        "kernel-modules-extra-4.18.0-240.15.1.el8_3"
      ],
      "match-base-evr": "kernel",
      "kind": "development"
    },
    "kernel-rt": {
      "packages": [
        "kernel-rt-core",
        "kernel-rt-kvm",
        "kernel-rt-modules",
        "kernel-rt-modules-extra",
        "kernel-rt-devel"
      ],
      "architectures": [
        "x86_64"
      ],
      "kind": "os-extension"
    },
    "usbguard": {
      "packages": [
        "usbguard"
      ],
      "kind": "os-extension"
    }
  },
  "repos": [
    "rhel-8-nfv"
  ]
}

(The MCO should only look at extensions with kind: os-extension; the development ones are not meant for layering.)

Rather than hardcoding the list of supported extensions, the MCO could now read them from this JSON file and feed the package list to rpm-ostree.

For validation, there is also a com.coreos.os-extensions label on the m-o-c which lists the available extensions (see e.g. coreos/coreos-assembler#2028 (comment)).

jkyros pushed a commit to jkyros/machine-config-operator that referenced this issue Mar 15, 2021
Per issue 2445:

openshift#2445

Added extensions.json parsing and propagated a few errors since now
extension processing can fail.
Added a test for extensions.json parsing and filtering.

I don't know that I like this. If I understand the workflow right, this
feels like something that should maybe be done as part of a validation
step when extract the image so we only have to do it once and can check
the extensions against the container labels.

The package doesn't really "keep state" though (well, aside from the
filesystem), it just extracts the image where it's told so this would
require additional team conversations.
@cgwalters
Copy link
Member

I think part of the idea behind the hardcoded list in the MCO is that because it can be part of the CRD it can be validated at oc create time.

But that said probably simplest for now is to have a script that machine edits the CRD openapi validation from the current RHCOS build - we aren't going to need to run that very often.

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 8, 2021
@sinnykumari sinnykumari removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 9, 2021
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 7, 2021
@jlebon jlebon removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 7, 2021
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 5, 2022
@openshift-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 4, 2022
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Mar 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2022

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants