Bug 1949231

Summary: [OCPonRHV]-when create machineset with empty osDisk - machine created successfully without any validation error
Product: OpenShift Container Platform Reporter: michal <mgold>
Component: Cloud ComputeAssignee: OCP on RHV Team <ocprhvteam>
Cloud Compute sub component: oVirt Provider QA Contact: Michael Burman <mburman>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: low CC: bretm, jpasztor, lleistne, mburman, mengel
Version: 4.8   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-14 15:27:07 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 michal 2021-04-13 18:22:10 UTC
Description of problem:
when create machineset with empty osDisk - machine created successfully without any validation error


Version-Release number of selected component (if applicable):
ocp version: 
4.8.0-0.nightly-2021-04-09-222447 

steps: 


How reproducible:
100%

Steps to Reproduce:
1) create machineset with empty osDisk value
2.
3.

Actual results:

when create machineset with empty osDisk - machine created successfully without any validation error



Expected results:


Additional info:
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  name: primary-m6qrv-worker-38
  labels:
    machine.openshift.io/cluster-api-cluster: primary-m6qrv
    machine.openshift.io/cluster-api-machine-role: worker-38
    machine.openshift.io/cluster-api-machine-type: worker-38
spec:
  replicas: 1
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: primary-m6qrv
      machine.openshift.io/cluster-api-machineset: primary-m6qrv-worker-38
  template:
    metadata:
      labels:
        machine.openshift.io/cluster-api-cluster: primary-m6qrv
        machine.openshift.io/cluster-api-machine-role: worker-38
        machine.openshift.io/cluster-api-machine-type: worker-38
        machine.openshift.io/cluster-api-machineset: primary-m6qrv-worker-38
    spec:
      providerSpec:
        value:
          affinity_groups_names:
          - test1
          apiVersion: ovirtproviderconfig.machine.openshift.io/v1beta1
          cluster_id: 502babf8-9c05-4738-b5c9-2ac8c33a9648
          credentialsSecret:
            name: ovirt-credentials
          memory_mb: 1600
          kind: OvirtMachineProviderSpec
          os_disk:
            size_gb:
          template_name: primary-m6qrv-rhcos
          type: server
          userDataSecret:
            name: worker-user-data

Comment 1 Gal Zaidman 2021-04-14 07:40:14 UTC
what is the actual machine that is created? if the machine gets the template disk size then this is not a bug

Comment 2 michal 2021-05-11 07:18:07 UTC
this is the created machine- ge2n1-xzw48-worker-6-mrlnn the status is empty and the relevant log is -
The machine spec specified new disk size %d, and the current disk size is %d. Shrinking is not supported.0 17179869184
E0511 07:13:37.498167       1 controller.go:278] ge2n1-xzw48-worker-6-mrlnn: error updating machine: Operation cannot be fulfilled on machines.machine.openshift.io "ge2n1-xzw48-worker-6-mrlnn": the object has been modified; please apply your changes to the latest version and try again, retrying in 30s seconds

[root@ocp-ge-2 ge2n1]# oc get machines
NAME                         PHASE     TYPE   REGION   ZONE   AGE
ge2n1-xzw48-master-0         Running                          44h
ge2n1-xzw48-master-1         Running                          44h
ge2n1-xzw48-master-2         Running                          44h
ge2n1-xzw48-worker-4-59mjr   Failed                           13m
ge2n1-xzw48-worker-5-9ht6z   Running                          3m33s
ge2n1-xzw48-worker-6-mrlnn   Running                          2m43s
ge2n1-xzw48-worker-bfz25     Running                          44h
ge2n1-xzw48-worker-wwshm     Running                          44h

Comment 3 Gal Zaidman 2021-05-11 09:20:53 UTC
(In reply to michal from comment #2)
> this is the created machine- ge2n1-xzw48-worker-6-mrlnn the status is empty
> and the relevant log is -
> The machine spec specified new disk size %d, and the current disk size is
> %d. Shrinking is not supported.0 17179869184
> E0511 07:13:37.498167       1 controller.go:278] ge2n1-xzw48-worker-6-mrlnn:
> error updating machine: Operation cannot be fulfilled on
> machines.machine.openshift.io "ge2n1-xzw48-worker-6-mrlnn": the object has
> been modified; please apply your changes to the latest version and try
> again, retrying in 30s seconds
> 
> [root@ocp-ge-2 ge2n1]# oc get machines
> NAME                         PHASE     TYPE   REGION   ZONE   AGE
> ge2n1-xzw48-master-0         Running                          44h
> ge2n1-xzw48-master-1         Running                          44h
> ge2n1-xzw48-master-2         Running                          44h
> ge2n1-xzw48-worker-4-59mjr   Failed                           13m
> ge2n1-xzw48-worker-5-9ht6z   Running                          3m33s
> ge2n1-xzw48-worker-6-mrlnn   Running                          2m43s
> ge2n1-xzw48-worker-bfz25     Running                          44h
> ge2n1-xzw48-worker-wwshm     Running                          44h

Well, there is a Patch for that but honestly, this looks good to me, the machine is on Failed, there is an understandable error message.... but since there is already a PR I'll keep the bug :)

Comment 4 michal 2021-05-11 09:35:25 UTC
@gal, ge2n1-xzw48-worker-6-mrlnn this machine is running:) this is the problem

Comment 5 Gal Zaidman 2021-05-11 09:52:22 UTC
(In reply to michal from comment #4)
> @gal, ge2n1-xzw48-worker-6-mrlnn this machine is running:) this is the
> problem

Oh ok I see +1