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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/MachineConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ spec:
**Note:** The RT kernel lowers throughput (performance) in return for improved worst-case latency bounds. This feature is intended only for use cases that require consistent low latency. For more information, see the [Linux Foundation wiki](https://wiki.linuxfoundation.org/realtime/start) and the [RHEL RT portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/8/).

### RHCOS Extensions
RHCOS is a minimal OCP focused OS which provides capabilities common across all the platforms. With extensions support, OCP 4.6 and onward users can enable a limited set of additional functionality on the RHCOS nodes. In OCP 4.6 the supported extensions is `usbguard`.
RHCOS is a minimal OCP focused OS which provides capabilities common across all the platforms. With extensions support, OCP 4.6 and onward users can enable a limited set of additional functionality on the RHCOS nodes. In OCP 4.6 the supported extensions is `usbguard`. In OCP 4.8 the supported extensions are `usbguard` and `qemu-kiwi`.

Extensions can be installed by creating a MachineConfig object. Extensions can be enabled as both day1 and day2. Check [installer guide](https://github.com/openshift/installer/blob/master/docs/user/customization.md#Enabling-RHCOS-Extensions) to enable extensions during cluster install.

Expand Down
1 change: 1 addition & 0 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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"},
        }
 }

}
}

Expand Down
10 changes: 5 additions & 5 deletions test/e2e/mcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func TestExtensions(t *testing.T) {
Config: runtime.RawExtension{
Raw: helpers.MarshalOrDie(ctrlcommon.NewIgnConfig()),
},
Extensions: []string{"usbguard", "kernel-devel"},
Extensions: []string{"usbguard", "kernel-devel", "qemu-kiwi"},
},
}

Expand All @@ -286,8 +286,8 @@ func TestExtensions(t *testing.T) {
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-q", "usbguard", "kernel-devel")
expectedPackages = []string{"usbguard", "kernel-devel"}
} else {
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-q", "usbguard", "kernel-devel", "kernel-headers")
expectedPackages = []string{"usbguard", "kernel-devel", "kernel-headers"}
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-q", "usbguard", "kernel-devel", "kernel-headers", "ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin")
expectedPackages = []string{"usbguard", "kernel-devel", "kernel-headers", "ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin"}
}
for _, v := range expectedPackages {
if !strings.Contains(installedPackages, v) {
Expand Down Expand Up @@ -317,9 +317,9 @@ func TestExtensions(t *testing.T) {

if isOKD {
// OKD does not support grouped extensions yet, so installing kernel-devel will not also pull in kernel-headers
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "usbguard", "kernel-devel")
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "usbguard", "kernel-devel", "ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin")
} else {
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "usbguard", "kernel-devel", "kernel-headers")
installedPackages = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "usbguard", "kernel-devel", "kernel-headers", "ipxe-roms-qemu", "libpmem", "pixman", "qemu-kiwi", "qemu-kvm-common", "seabios-bin", "seavgabios-bin", "sgabios-bin")
}
for _, v := range expectedPackages {
if strings.Contains(installedPackages, v) {
Expand Down