Bug 1939270

Summary: fix co upgradeableFalse status and reason
Product: OpenShift Container Platform Reporter: Kirsten Garrison <kgarriso>
Component: Machine Config OperatorAssignee: Kirsten Garrison <kgarriso>
Status: CLOSED ERRATA QA Contact: Michael Nguyen <mnguyen>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: jerzhang, wking
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:53:48 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: 1941128    

Comment 2 Michael Nguyen 2021-03-23 16:37:35 UTC
Verified on 4.8.0-0.nightly-2021-03-22-104536.  Used MC with spec.config.ignition.version=3.9.0 (invalid) to cause a degrade pool scenario.  Checked `oc get co/machine-config -o yaml` to see the message and reason for upgradeable was human readable and machine slug respectively.

$ cat << EOF > file-ig3.yaml 
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: test-file
spec:
  config:
    ignition:
      version: 3.9.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf;base64,c2VydmVyIGZvby5leGFtcGxlLm5ldCBtYXhkZWxheSAwLjQgb2ZmbGluZQpzZXJ2ZXIgYmFyLmV4YW1wbGUubmV0IG1heGRlbGF5IDAuNCBvZmZsaW5lCnNlcnZlciBiYXouZXhhbXBsZS5uZXQgbWF4ZGVsYXkgMC40IG9mZmxpbmUK
        filesystem: root
        mode: 0644
        path: /etc/test
EOF

$ oc create -f file-ig3.yaml 
machineconfig.machineconfiguration.openshift.io/test-file created

$ oc get mc
NAME                                               GENERATEDBYCONTROLLER                      IGNITIONVERSION   AGE
00-master                                          d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
00-worker                                          d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
01-master-container-runtime                        d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
01-master-kubelet                                  d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
01-worker-container-runtime                        d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
01-worker-kubelet                                  d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
99-master-generated-registries                     d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
99-master-ssh                                                                                 3.2.0             170m
99-worker-generated-registries                     d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
99-worker-ssh                                                                                 3.2.0             170m
master-tang                                                                                   3.2.0             170m
rendered-master-091aba14bdc5a188411615df35a9abeb   d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
rendered-worker-20c4d35ba6cff244c7109d9e11b0f925   d6dabadeca05789363a2bbd56fbd3b16a3b21777   3.2.0             160m
test-file                                                                                     3.9.0             8s
worker-tang                                                                                   3.2.0             170m


$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-091aba14bdc5a188411615df35a9abeb   True      False      False      3              3                   3                     0                      168m
worker   rendered-worker-20c4d35ba6cff244c7109d9e11b0f925   True      False      True       3              3                   3                     0                      168m

$ oc get co/machine-config -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  annotations:
    exclude.release.openshift.io/internal-openshift-hosted: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2021-03-23T13:11:19Z"
  generation: 1
  managedFields:
  - apiVersion: config.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:exclude.release.openshift.io/internal-openshift-hosted: {}
          f:include.release.openshift.io/self-managed-high-availability: {}
          f:include.release.openshift.io/single-node-developer: {}
      f:spec: {}
      f:status:
        .: {}
        f:extension:
          f:master: {}
        f:relatedObjects: {}
        f:versions: {}
    manager: cluster-version-operator
    operation: Update
    time: "2021-03-23T13:11:19Z"
  - apiVersion: config.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        f:conditions: {}
        f:extension:
          .: {}
          f:master: {}
          f:worker: {}
        f:relatedObjects: {}
        f:versions: {}
    manager: machine-config-operator
    operation: Update
    time: "2021-03-23T16:32:22Z"
  name: machine-config
  resourceVersion: "80607"
  uid: 3352e2b8-29b3-43fe-bee1-c3eb44dbda09
spec: {}
status:
  conditions:
  - lastTransitionTime: "2021-03-23T13:23:16Z"
    message: Cluster version is 4.8.0-0.nightly-2021-03-22-104536
    status: "False"
    type: Progressing
  - lastTransitionTime: "2021-03-23T16:02:42Z"
    message: One or more machine config pool is degraded, please see `oc get mcp`
      for further details and resolve before upgrading
    reason: DegradedPool
    status: "False"
    type: Upgradeable
  - lastTransitionTime: "2021-03-23T16:12:41Z"
    message: 'Failed to resync 4.8.0-0.nightly-2021-03-22-104536 because: timed out
      waiting for the condition during syncRequiredMachineConfigPools: error pool
      worker is not ready, retrying. Status: (pool degraded: true total: 3, ready
      3, updated: 3, unavailable: 0)'
    reason: RequiredPoolsFailed
    status: "True"
    type: Degraded
  - lastTransitionTime: "2021-03-23T16:12:41Z"
    message: Cluster not available for 4.8.0-0.nightly-2021-03-22-104536
    status: "False"
    type: Available
  extension:
    master: all 3 nodes are at latest configuration rendered-master-091aba14bdc5a188411615df35a9abeb
    worker: 'pool is degraded because rendering fails with "": "Failed to render configuration
      for pool worker: parsing Ignition config failed: unknown version. Supported
      spec versions: 2.2, 3.0, 3.1, 3.2"'
  relatedObjects:
  - group: ""
    name: openshift-machine-config-operator
    resource: namespaces
  - group: machineconfiguration.openshift.io
    name: ""
    resource: machineconfigpools
  - group: machineconfiguration.openshift.io
    name: ""
    resource: controllerconfigs
  - group: machineconfiguration.openshift.io
    name: ""
    resource: kubeletconfigs
  - group: machineconfiguration.openshift.io
    name: ""
    resource: containerruntimeconfigs
  - group: machineconfiguration.openshift.io
    name: ""
    resource: machineconfigs
  - group: ""
    name: ""
    resource: nodes
  versions:
  - name: operator
    version: 4.8.0-0.nightly-2021-03-22-104536

Comment 5 errata-xmlrpc 2021-07-27 22:53:48 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.8.2 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:2438