Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1979009

Summary: Change log message about EFI not being supported in assisted-installer
Product: OpenShift Container Platform Reporter: Osher De Paz <odepaz>
Component: assisted-installerAssignee: Sagi Dayan <sdayan>
assisted-installer sub component: Installer QA Contact: Udi Kalifon <ukalifon>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: aos-bugs, sdayan, ukalifon
Version: 4.9Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Core
Fixed In Version: OCP-Metal-v1.0.23.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:38:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Osher De Paz 2021-07-04 08:57:36 UTC
Description of problem:

While running any kind of happy-flow scenario with efi booting mode, assisted-installer writes an info log stating that "efi not supported".
The log actually indicating that it's not possible to set boot order in this kind of mode, and that it's skipping this action.

Change log to something along the lines "Setting boot order on efi is not supported. Skipping..."

https://github.com/openshift/assisted-installer/blob/3de759809c810b83d82f9a6745915415b275f922/src/ops/ops.go#L225

How reproducible: 100%


Steps to Reproduce:
1. Start any kind of deployment (SNO, multi-node, nevermind)
2. Check out last lines of the installer logs. This log line should appear there

Comment 1 Osher De Paz 2021-07-06 08:35:21 UTC
Also log of the test command is super confusing (failed executing nsenter...)

Comment 3 Udi Kalifon 2021-07-12 09:04:39 UTC
Verified. The log shows:
level=info msg="Install complete.\n"
level=info msg="Done writing image to disk"
level=info msg="Setting efibootmgr to boot from disk"

Comment 4 Osher De Paz 2021-07-12 13:13:44 UTC
@ukalifon shouldn't we see the new message "Setting boot order on efi is not supported. Skipping..."?

Comment 5 Udi Kalifon 2021-07-12 14:28:12 UTC
It's not what we see, but the old misleading message is gone.
Do you think that the new message we see is wrong? It looks like it succeeded to set the boot order (in our environments the boot order is already set correctly so it doesn't need to do anything).

Comment 6 Osher De Paz 2021-07-12 15:07:51 UTC
I think your environment is not EFI boot mode, making you skip this specific message.
Showing the code will probably explain better what's happening: https://github.com/openshift/assisted-installer/blob/master/src/ops/ops.go#L222-L229

As you can see, your environment shows "Setting efibootmgr to boot from disk"

Comment 7 Udi Kalifon 2021-07-12 16:27:42 UTC
Re-opening the bug. I tested on an EFI system, and I got the correct log message.

In the case of BIOS systems - the message should still be fixed:

func (o *ops) SetBootOrder(device string) error {
	_, err := o.ExecPrivilegeCommand(nil, "test", "-d", "/sys/firmware/efi")
	if err != nil {
		o.log.Info("Setting boot order on efi is not supported. Skipping...")   // FIX "EFI" TO "BIOS" !!!!
		return nil
	}
    ...

Note in the above code that if we got err != nil it should be interpreted as this being a BIOS system, so the message should say that "setting the boot order on BIOS systems is not supported". We actually do support efi - with the efibootmgr tool.

This needs to be tested on non-EFI machines, and we need to make sure that the logged message is not confusing.

Comment 8 Osher De Paz 2021-07-12 16:50:42 UTC
right
sorry @sdayan, I just missed the more problematic aspect about this message so we need to do this change as well

Comment 9 Sagi Dayan 2021-07-13 06:24:41 UTC
@

Comment 10 Sagi Dayan 2021-07-13 06:26:08 UTC
Sure thing - Will fix this today.

Comment 11 Udi Kalifon 2021-07-29 10:04:01 UTC
Verified. I tested on a BIOS system (VMs) and got this in installer.logs:
Jul 28 11:01:24 master-0-1 installer[5804]: time="2021-07-28T11:01:24Z" level=info msg="setting the boot order on BIOS systems is not supported. Skipping..."

Comment 15 errata-xmlrpc 2021-10-18 17:38:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759