Created attachment 1848059 [details]
HFS after scale down and schema
Description of problem:
On HPE setup. In HFS CR into Spec: Settings section added 3 parameters to change:
Admin Email: ""
Server Name: ""
Workload Profile: Virtualization-PowerEfficient
2 first are String parameters that was successfully set before one by one nad needed to be set back to previous value (empty string)
The 3rd parameter is of Enumeration type, the value set to the one of allowable_values
After scaling down the machine:
1. No changes is done for the 2 String parameters
2. Error reported for the Enumeration parameter
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ValidationFailed 177m metal3-hostfirmwaresettings-controller Invalid BIOS setting: Setting Workload Profile is not in the Status field
Version-Release number of selected component (if applicable):
Steps to Reproduce:
0. $ oc project openshift-machine-api
1. Set parameters as described above in one of workers HFS CRs:
$ oc edit hfs openshift-worker-1
2. Annotate the worker for deletion and scale down the machineset
$ oc annotate machine ocp-edge-5jqsr-worker-0-mk5m4 machine.openshift.io/cluster-api-delete-machine=yes
$ oc scale --replicas=1 machineset ocp-edge-5jqsr-worker-0
3. After bmh was in preparing state for a few minutes and become available, check the values are changed in the HFS CR and in machine's BIOS
$ oc describe hfs openshift-worker-1
The real Bios values check in ilo
Setting failed (see description)
All 3 parameters should be set
Lubov - the actual setting value is "WorkloadProfile" not "Workload Profile", you can see via the yaml by using "oc get hfs/openshift-worker-1 -o yaml". The "oc describe" command changes the formatting to split the name but that's not the actual name.
Can you retry it using "WorkloadProfile"? BTW, the error message is correct in this case.
(In reply to Bob Fournier from comment #3)
> Lubov - the actual setting value is "WorkloadProfile" not "Workload
> Profile", you can see via the yaml by using "oc get hfs/openshift-worker-1
> -o yaml". The "oc describe" command changes the formatting to split the name
> but that's not the actual name.
> Can you retry it using "WorkloadProfile"? BTW, the error message is correct
> in this case.
In the schema:
Is it bug in schema then?
Another problem: why other 2 parameters wasn't set?
> Another problem: why other 2 parameters wasn't set?
Now I see the names of 2 other parameters should be without spaces, but
1. they as well listed in the schema with space
2. no error message re: them (In reply to Lubov from comment #6)
The summary: the schema supposed to provide the parameter description, so it should be accurate containing the name of a parameter
(In reply to Lubov from comment #7)
> > Another problem: why other 2 parameters wasn't set?
> Now I see the names of 2 other parameters should be without spaces, but
> 1. they as well listed in the schema with space
> 2. no error message re: them (In reply to Lubov from comment #6)
> The summary: the schema supposed to provide the parameter description, so it
> should be accurate containing the name of a parameter
When using 'oc describe" the names are split if they just contain words, for example "SecureBootStatus" becomes "Secure Boot Status", while "SecureBootStatus1" stays as "SecureBootStatus1". The actual names can be seen in yaml when using, for example, "oc get hfs/openshift-worker-1 -o yaml" or "oc get firmwwareschema -o yaml". The actual BIOS settings do not contain spaces, this is true for both the hfs and the schema, so spaces shouldn't set in the spec.
So this isn't a bug, but its not entirely clear why "oc describe" splits the words, I'll do some research and update this before I close it.
As for why the other 2 parameters weren't set, is because their was an error with "Workload Profile" which was detected first so the validation failed.
Also it looks like "oc edit" shows the names properly, i.e. not split into separate words for the status. These are the names that should be set in the spec.
Since the "Workload Profile" was an incorrect names setting and not a bug, changing this to just be the issue in which events were only generated for one of the invalid spec settings.
verified on 4.10.0-0.nightly-2022-01-24-070025
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.10.3 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.