Bug 1727104 - invalid machine config should cause a RenderDegraded error not NodeDegraded
Summary: invalid machine config should cause a RenderDegraded error not NodeDegraded
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.2.0
Assignee: Kirsten Garrison
QA Contact: Micah Abbott
URL:
Whiteboard:
Depends On:
Blocks: 1726866
TreeView+ depends on / blocked
 
Reported: 2019-07-04 13:09 UTC by Antonio Murdaca
Modified: 2019-10-22 14:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1726866
Environment:
Last Closed: 2019-10-16 06:33:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:33:19 UTC

Description Antonio Murdaca 2019-07-04 13:09:38 UTC
+++ This bug was initially created as a clone of Bug #1726866 +++

Description of problem:
An invalid machine config should cause a RenderDegraded error not NodeDegraded

How reproducible:
Apply an invalid machineconfig and note that while there is an error it is NodeDegraded and NOT the expected/correct RenderDegraded

Steps to Reproduce:
1.Apply an invalid machineconfig for example:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 50-examplecorp-chrony
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf;base64,c2VydmVyIGZvby5leGFtcGxlLm5ldCBtYXhkZWxheSAwLjQgb2ZmbGluZQpzZXJ2ZXIgYmFyLmV4YW1wbGUubmV0IG1heGRlbGF5IDAuNCBvZmZsaW5lCnNlcnZlciBiYXouZXhhbXBsZS5uZXQgbWF4ZGVsYXkgMC40IG9mZmxpbmUK
        mode: 0644
        path: /etc/chrony.conf
2. oc describe mcp worker

Actual results:
Node Degraded

Expected results:
Render Degraded

--- Additional comment from Kirsten G. on 2019-07-03 22:44:58 UTC ---

This will be fixed in master via https://github.com/openshift/machine-config-operator/pull/899 (currently pending merge)

--- Additional comment from Kirsten G. on 2019-07-03 22:51:36 UTC ---

Sorry wrong link above..

This will be fixed in master pending https://github.com/openshift/machine-config-operator/pull/894 being merged.

Comment 1 Antonio Murdaca 2019-07-04 13:10:02 UTC
PR for 4.2 https://github.com/openshift/machine-config-operator/pull/894

Comment 3 Antonio Murdaca 2019-07-30 07:19:39 UTC
Micah, can you help verify this? We would need this verified to get https://github.com/openshift/machine-config-operator/pull/989 and https://bugzilla.redhat.com/show_bug.cgi?id=1726866 for 4.1.z

Comment 4 Michael Nguyen 2019-07-30 17:04:28 UTC
Verified on 

oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2019-07-30-073644   True        False         135m    Cluster version is 4.2.0-0.nightly-2019-07-30-073644


cat broken.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 50-examplecorp-chrony
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf;base64,c2VydmVyIGZvby5leGFtcGxlLm5ldCBtYXhkZWxheSAwLjQgb2ZmbGluZQpzZXJ2ZXIgYmFyLmV4YW1wbGUubmV0IG1heGRlbGF5IDAuNCBvZmZsaW5lCnNlcnZlciBiYXouZXhhbXBsZS5uZXQgbWF4ZGVsYXkgMC40IG9mZmxpbmUK
        mode: 0644
        path: /etc/chrony.conf

oc apply -f broken.yaml

oc describe mcp worker
Name:         worker
Namespace:    
Labels:       machineconfiguration.openshift.io/mco-built-in=
Annotations:  <none>
API Version:  machineconfiguration.openshift.io/v1
Kind:         MachineConfigPool
Metadata:
  Creation Timestamp:  2019-07-30T14:34:04Z
  Generation:          2
  Resource Version:    44932
  Self Link:           /apis/machineconfiguration.openshift.io/v1/machineconfigpools/worker
  UID:                 14b92ae1-b2d7-11e9-9af7-02a1f180f418
Spec:
  Configuration:
    Name:  rendered-worker-41aade249cd20ee5d5c6c0684939024e
    Source:
      API Version:  machineconfiguration.openshift.io/v1
      Kind:         MachineConfig
      Name:         00-worker
      API Version:  machineconfiguration.openshift.io/v1
      Kind:         MachineConfig
      Name:         01-worker-container-runtime
      API Version:  machineconfiguration.openshift.io/v1
      Kind:         MachineConfig
      Name:         01-worker-kubelet
      API Version:  machineconfiguration.openshift.io/v1
      Kind:         MachineConfig
      Name:         99-worker-14b92ae1-b2d7-11e9-9af7-02a1f180f418-registries
      API Version:  machineconfiguration.openshift.io/v1
      Kind:         MachineConfig
      Name:         99-worker-ssh
  Machine Config Selector:
    Match Labels:
      machineconfiguration.openshift.io/role:  worker
  Node Selector:
    Match Labels:
      node-role.kubernetes.io/worker:  
  Paused:                              false
Status:
  Conditions:
    Last Transition Time:  2019-07-30T14:34:37Z
    Message:               
    Reason:                
    Status:                False
    Type:                  NodeDegraded
    Last Transition Time:  2019-07-30T14:41:32Z
    Message:               All nodes are updated with rendered-worker-41aade249cd20ee5d5c6c0684939024e
    Reason:                
    Status:                True
    Type:                  Updated
    Last Transition Time:  2019-07-30T14:41:32Z
    Message:               
    Reason:                
    Status:                False
    Type:                  Updating
    Last Transition Time:  2019-07-30T16:43:00Z
    Message:               Failed to render configuration for pool worker: invalid Ignition config found: error: no filesystem specified
    Reason:                
    Status:                True
    Type:                  RenderDegraded
    Last Transition Time:  2019-07-30T16:43:05Z
    Message:               
    Reason:                
    Status:                True
    Type:                  Degraded
  Configuration:
    Name:  rendered-worker-41aade249cd20ee5d5c6c0684939024e
    Source:
      API Version:            machineconfiguration.openshift.io/v1
      Kind:                   MachineConfig
      Name:                   00-worker
      API Version:            machineconfiguration.openshift.io/v1
      Kind:                   MachineConfig
      Name:                   01-worker-container-runtime
      API Version:            machineconfiguration.openshift.io/v1
      Kind:                   MachineConfig
      Name:                   01-worker-kubelet
      API Version:            machineconfiguration.openshift.io/v1
      Kind:                   MachineConfig
      Name:                   99-worker-14b92ae1-b2d7-11e9-9af7-02a1f180f418-registries
      API Version:            machineconfiguration.openshift.io/v1
      Kind:                   MachineConfig
      Name:                   99-worker-ssh
  Degraded Machine Count:     0
  Machine Count:              3
  Observed Generation:        2
  Ready Machine Count:        3
  Unavailable Machine Count:  0
  Updated Machine Count:      3
Events:                       <none>

Comment 5 errata-xmlrpc 2019-10-16 06:33:09 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, 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/RHBA-2019:2922

Comment 6 Micah Abbott 2019-10-22 14:25:02 UTC
Not sure why Bugzilla is hounding me about about a NEEDINFO on a closed bug, but just clearing that state.


Note You need to log in before you can comment on or make changes to this bug.