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

Add new extension for qemu-kiwi #2376

Closed
wants to merge 1 commit into from

Conversation

jensfr
Copy link

@jensfr jensfr commented Feb 1, 2021

- What I did
This adds support for a new RHCOS extension called
"qemu-kiwi". It will install qemu-kiwi and its
dependencies, 8 RPMs with a total size of 20MB when installed.

It will allow users to run lightweight virtual machines using QEMU.

- How to verify it
We tested it by building MCO and building a machine-os-content image with the new RPMs included.

oc image extract -a ~/.openshift/pull-secret --path /:/extracted-oscontent quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ecfac365596289b8474e6a0f0bffea996e04b0bdd1379e8fb4776b8e3ef2af1b

Then we build the image with this Dockerfile:

FROM quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ecfac365596289b8474e6a0f0bffea996e04b0bdd1379e8fb4776b8e3ef2af1b
RUN dnf install -y createrepo
RUN dnf install -y --downloadonly --downloaddir=/extensions/qemu-img qemu-img
RUN createrepo /extensions
ENTRYPOINT ["bin/bash"]

Create a new release image:

oc adm release new -n origin  --from-release=quay.io/openshift-release-dev/ocp-release-nightly@sha256:d1a968a86cf04a0e621c8ed265d932f365c5a3bc7977a8c0b1c6679d79f3b864  --to-image=docker.io/bpradipt/ocp-release:v4.7.1 machine-config-operator=quay.io/bpradipt/machine-config-operator:latest machine-os-content=quay.io/bpradipt/extension-test@sha256:83aae59f986b376813916807e3d19716e9df8f06b56661fce327c9e27c3e5896

Do an update:

oc adm upgrade --force --to-image  docker.io/bpradipt/ocp-release:v4.7.1 --allow-explicit-upgrade

Verify osImage URL points to overridden machine-os-content:

oc -n openshift-machine-config-operator edit configmap/machine-config-osimageurl


apiVersion: v1
data:
  osImageURL: quay.io/bpradipt/extension-test@sha256:83aae59f986b376813916807e3d19716e9df8f06b56661fce327c9e27c3e5896
  releaseVersion: 4.7.0-0.nightly-2021-01-19-083458
kind: ConfigMap
metadata:
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2021-01-19T10:12:44Z"
  name: machine-config-osimageurl
  namespace: openshift-machine-config-operator
  resourceVersion: "44890"
  selfLink: /api/v1/namespaces/openshift-machine-config-operator/configmaps/machine-config-osimageurl
  uid: ff1ed7b1-bf9c-414d-8384-42d66633d0e7

Create a machine config and apply it.

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 80-worker-extensions
spec:
  config:
    ignition:
      version: 3.1.0
  extensions:
    - qemu-img

Wait until machine config pool is updated. Then log into one of the nodes and, chroot to host filesystem and check if the qemu-kiwi RPM is installed with rpm -qa|grep qemu-kiwi

- Description for the changelog
Added support for a new RHCOS extension to install qemu-kiwi.

Signed-off-by: Jens Freimann [email protected]

This adds support for a new RHCOS extension called
"qemu-kiwi". It will install qemu-kiwi and its
dependencies, 8 RPMs with a total size of 20MB when installed.

It will allow users to run lightweight virtual machines using QEMU.

Signed-off-by: Jens Freimann <[email protected]>
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jensfr
To complete the pull request process, please assign sinnykumari after the PR has been reviewed.
You can assign the PR to them by writing /assign @sinnykumari in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sinnykumari sinnykumari added the 4.8 Work deferred for 4.8 label Feb 1, 2021
@sinnykumari
Copy link
Contributor

Since this is a new extension addition, added 4.8 label.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 1, 2021

@jensfr: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/verify 6b4bb9b link /test verify
ci/prow/okd-e2e-aws 6b4bb9b link /test okd-e2e-aws
ci/prow/e2e-aws-workers-rhel7 6b4bb9b link /test e2e-aws-workers-rhel7
ci/prow/e2e-gcp-op 6b4bb9b link /test e2e-gcp-op

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/test-infra repository. I understand the commands that are listed here.

@darkmuggle darkmuggle requested review from darkmuggle and removed request for runcom and yuqi-zhang February 4, 2021 17:37
@darkmuggle
Copy link
Contributor

/hold

Before we can ack this PR, we'll need to see a corresponding PR land at https://github.com/openshift/os/blob/master/extensions.yaml for the extension work.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 4, 2021
@sinnykumari sinnykumari self-requested a review February 5, 2021 09:21
jensfr added a commit to jensfr/os that referenced this pull request Feb 5, 2021
This adds another extension to the list. 
The qemu-kiwi extension is added to MCO with this PR openshift/machine-config-operator#2376
qemu-kiwi is a shrunk-down version of the qemu-kvm package with fewer dependencies. 8 rpms and ~20MB in size when installed.
jensfr added a commit to jensfr/os that referenced this pull request Feb 5, 2021
This adds another extension to the list. 
The qemu-kiwi extension is added to MCO with this PR openshift/machine-config-operator#2376
qemu-kiwi is a shrunk-down version of the qemu-kvm package with fewer dependencies. 8 rpms and ~20MB in size when installed.
jensfr added a commit to jensfr/os that referenced this pull request Feb 5, 2021
This adds qemu-kiwi as another extension to the list. 
The qemu-kiwi extension is added to MCO with this PR openshift/machine-config-operator#2376
qemu-kiwi is a shrunk-down version of the qemu-kvm package with fewer dependencies. 8 rpms and ~20MB in size when installed
miabbott pushed a commit to miabbott/os that referenced this pull request Feb 24, 2021
This adds qemu-kiwi as another extension to the list. 
The qemu-kiwi extension is added to MCO with this PR openshift/machine-config-operator#2376
qemu-kiwi is a shrunk-down version of the qemu-kvm package with fewer dependencies. 8 rpms and ~20MB in size when installed
jensfr added a commit to jensfr/os that referenced this pull request Feb 25, 2021
This adds qemu-kiwi as another extension to the list. qemu-kiwi and its
dependencies are in the rhel-8-advanced-virt repository, so we have to
add this as well.

The qemu-kiwi extension is added to MCO with this PR
openshift/machine-config-operator#2376

qemu-kiwi is a shrunk-down version of the qemu-kvm package with fewer
dependencies. 8 rpms and ~20MB in size when installed
@miabbott
Copy link
Member

miabbott commented Mar 5, 2021

See: openshift/os#497 for the upstream visible change

RHCOS 48.83.202103050218-0 was the first build to include the qemu-kiwi extenison

That build was included in the OCP 4.8.0-0.nightly-2021-03-05-114907 payload

Since @jensfr is on paternity leave, going to tag @fidencio for visibility

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2021
Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the RHCOS PR, openshift/enhancements#366 is still open, so preferably that is merged before the MCO acks the extension.

Deferring to @sinnykumari for final review once we're good on that end

@@ -1101,6 +1101,7 @@ func getSupportedExtensions() map[string][]string {
return map[string][]string{
"usbguard": {"usbguard"},
"kernel-devel": {"kernel-devel", "kernel-headers"},
"qemu-kiwi": {"ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line isn't formatted properly and is getting caught by the linter

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the RHCOS PR, openshift/enhancements#366 is still open, so preferably that is merged before the MCO acks the extension.

openshift/enhancements#366 is gone.

I've opened openshift/enhancements#677 in order to proceed with the work as Jens is out. Regardless, 677 still needs work.

@@ -1101,6 +1101,7 @@ func getSupportedExtensions() map[string][]string {
return map[string][]string{
"usbguard": {"usbguard"},
"kernel-devel": {"kernel-devel", "kernel-headers"},
"qemu-kiwi": {"ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin"},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fidencio@machado /tmp/machine-config-operator $ git diff
diff --git a/pkg/daemon/update.go b/pkg/daemon/update.go
index aa4ab880..f916f161 100644
--- a/pkg/daemon/update.go
+++ b/pkg/daemon/update.go
@@ -1101,7 +1101,7 @@ func getSupportedExtensions() map[string][]string {
        return map[string][]string{
                "usbguard":     {"usbguard"},
                "kernel-devel": {"kernel-devel", "kernel-headers"},
-               "qemu-kiwi": {"ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin"},
+               "qemu-kiwi":    {"ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin"},
        }
 }

@jensfr
Copy link
Author

jensfr commented Mar 25, 2021

Closing this as it is superseded by #2456

@jensfr jensfr closed this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.8 Work deferred for 4.8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants