Bug 1669479

Summary: Machine deployment not working as expected
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: Cloud ComputeAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED NOTABUG QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: agarcial, aos-bugs, erich, jokerman, mifiedle, mmccomas
Target Milestone: ---   
Target Release: 4.1.0   
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: 2019-02-21 11:32:13 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:
Bug Depends On:    
Bug Blocks: 1664187    

Description Jaspreet Kaur 2019-01-25 12:20:45 UTC
Description of problem: When creating a machine deplpoyment using the default example and modify the labels and selectors it doesnt work.


eg :

apiVersion: cluster.k8s.io/v1alpha1
kind: MachineDeployment
metadata:
  annotations:
    machinedeployment.clusters.k8s.io/revision: "1"
  creationTimestamp: 2019-01-25T11:48:07Z
  generation: 1
  name: example
  namespace: openshift-cluster-api
  resourceVersion: "4196063"
  selfLink: /apis/cluster.k8s.io/v1alpha1/namespaces/openshift-cluster-api/machinedeployments/example
  uid: 14c38062-2097-11e9-b156-02d3ec294f42
spec:
  minReadySeconds: 0
  progressDeadlineSeconds: 600
  replicas: 3
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      sigs.k8s.io/cluster-api-cluster: testjas
      sigs.k8s.io/cluster-api-machineset: testjas-worker-us-east-2a
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        sigs.k8s.io/cluster-api-cluster: testjas
        sigs.k8s.io/cluster-api-machine-role: worker
        sigs.k8s.io/cluster-api-machine-type: worker
        sigs.k8s.io/cluster-api-machineset: testjas-worker-us-east-2a
    spec:
      metadata:
        creationTimestamp: null
      providerSpec: {}
      versions:
        kubelet: ""
status:
  observedGeneration: 1
  replicas: 3
  unavailableReplicas: 3
  updatedReplicas: 3


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results: The machineset that is created doesnt contain any regions of zones and the machines never gets to ready state.


Expected results:  It should have suceeded based on the labels we provided


Additional info: The default example provided should be easy for ready deployment inorder to understand what is required for instant deployment.

Below example doesnt help in any way :

apiVersion: cluster.k8s.io/v1alpha1
kind: MachineDeployment
metadata:
  name: example
  namespace: openshift-cluster-api
spec:
  replicas: 3
  selector:
    matchLabels:
      foo: bar
  template:
    metadata:
      labels:
        foo: bar
    spec:
      providerSpec: {}
      versions:
        kubelet: ''

Comment 1 Eric Paris 2019-01-25 14:52:20 UTC
It is my understanding that MachineDeployments are not supported at all in 4.0.  Only MachineSets.

Comment 2 Jaspreet Kaur 2019-01-27 10:47:10 UTC
In that case since it was present as an option in UI, I was in assumption that it should work. 

Is there any reason why it present in UI ?

Comment 3 Eric Rich 2019-02-18 19:16:26 UTC
I think you want to look at https://github.com/openshift/training/blob/master/docs/05-infrastructure-nodes.md and see how this might change the assumptions you have on how to properly label nodes/machines.

Comment 4 Alberto 2019-02-21 11:02:21 UTC
MachineDeployments are not supported on 4.0