Bug 1882723

Summary: [vsphere]Suggested mimimum value for providerspec not working
Product: OpenShift Container Platform Reporter: Milind Yadav <miyadav>
Component: Cloud ComputeAssignee: Alexander Demicev <ademicev>
Cloud Compute sub component: Other Providers QA Contact: Milind Yadav <miyadav>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: mimccune
Version: 4.6Keywords: UpcomingSprint
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The disk size must be greater than the initial image size, but this was not reported. Consequence: Machines failed to boot without warning when the disk size was low Fix: Warn users when creating or updating disks with low disk size Result: If a user creates or updates a Machine/MachineSet with the disk size below the recommended minimum, they will be warned that their disk size is low and may cause machines to not start
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:21:16 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 Milind Yadav 2020-09-25 12:51:59 UTC
Description of problem:Hint value not correct - providerSpec.memoryMiB: minimum value 2048 is needed

Version-Release number of selected component (if applicable):
Cluster version is 4.6.0-0.nightly-2020-09-24-235241

How reproducible:


Steps to Reproduce:
1.Created machineset with default values  refer - https://gist.github.com/miyadav/ab17954c1075db1533eee13f0ffda58c

[miyadav@miyadav vsphere]$ oc create -f defaultvsp.yaml --config vsp
Flag --config has been deprecated, use --kubeconfig instead
W0925 14:49:48.285805 24972 warnings.go:67] providerSpec.numCPUs: 0 is less than the minimum value (2): the minimum value will be used instead
W0925 14:49:48.285861 24972 warnings.go:67] providerSpec.memoryMiB: 0 is less than the recommended minimum value (2048): nodes may not boot correctly
W0925 14:49:48.285865 24972 warnings.go:67] providerSpec.diskGiB: 0 is less than the recommended minimum (120): nodes may fail to start if disk size is too low
machineset.machine.openshift.io/zhsunvs-r7cfl-worker-default created

 

but machine failed to provision with below event:

Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedCreate 5m33s vspherecontroller zhsunvs-r7cfl-worker-default-5bqs9: reconciler failed to Create machine: error getting disk spec for "": can't resize template disk down, initial capacity is larger: 16777216KiB > 0KiB

2.Change values as suggested in warnings 
Actual results:
Machines stuck in provisioned phase due to memoryMiB value not working 


Expected results:
Machine should be in Running status with nodes attached to it 


Additional info:

Comment 1 Joel Speed 2020-09-25 12:59:57 UTC
The reported error there is because you have a disk size set to zero, I would suggest a zero disk size is not valid and that we should probably return an error if no disk size is given.

Do people agree with this:
- DiskGiB == 0: Machine/MachineSet creation rejected with invalid disk size
- 0 < DiskGiB < 120: Machine/MachineSet creation accepted with warning 'x is less than the recommended minimum (120): nodes may fail to start if disk size is too low'
- DiskGiB > 0 : Machine/MachineSet creation accepted without warning

Comment 2 Joel Speed 2020-09-30 11:11:08 UTC
We will try to resolve this issue during the next sprint, we need to discuss the above suggestions and verify that the recommendations we are providing for users are valid

Comment 4 Michael McCune 2020-12-04 21:35:55 UTC
the PR associated with this issue is under review

Comment 6 Milind Yadav 2020-12-09 14:09:51 UTC
Validation info below : 

[miyadav@miyadav vsphere]$ oc create -f 47_ms.yaml 

W1209 19:33:27.685736   60677 warnings.go:67] providerSpec.numCPUs: 0 is missing or less than the minimum value (2): nodes may not boot correctly
W1209 19:33:27.685782   60677 warnings.go:67] providerSpec.memoryMiB: 0 is missing or less than the recommended minimum value (2048): nodes may not boot correctly
W1209 19:33:27.685789   60677 warnings.go:67] providerSpec.diskGiB: 0 is missing or less than the recommended minimum (120): nodes may fail to start if disk size is too low
machineset.machine.openshift.io/miyadav1209vs-s9ldk-worker-p created


[miyadav@miyadav vsphere]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2020-12-09-093341   True        False         25m     Cluster version is 4.7.0-0.nightly-2020-12-09-093341


[miyadav@miyadav vsphere]$ oc get machines
NAME                                 PHASE     TYPE   REGION   ZONE   AGE
miyadav1209vs-s9ldk-master-0         Running                          52m
miyadav1209vs-s9ldk-master-1         Running                          52m
miyadav1209vs-s9ldk-master-2         Running                          52m
miyadav1209vs-s9ldk-worker-mqtqv     Running                          47m
miyadav1209vs-s9ldk-worker-p-745kf   Failed                           3m57s
miyadav1209vs-s9ldk-worker-sm86b     Running                          47m
[miyadav@miyadav vsphere]$ 



Additional Info:
Moved to VERIFIED 

spec used - 
 spec:
      metadata: {}
      providerSpec:
        value:
          network:
            devices:
            - networkName: qe-segment
          template: <template>
          workspace:
            datacenter: SDDC-Datacenter
            datastore: WorkloadDatastore
            folder: <Folder>
            resourcePool: <REsourcePool>
            server: <server>

Comment 9 errata-xmlrpc 2021-02-24 15:21:16 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.7.0 security, bug fix, and enhancement 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-2020:5633