Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-32783

NodeDisruptionPolicy action reload cannot take effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • premerge, 4.16.0
    • None
    • No
    • MCO Sprint 253
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

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

      Action reload cannot take effect when I patch existing machine config

      How reproducible:

      always

      Steps to Reproduce:

      Update machineconfigurations/cluster with file action reboot
      
      spec:
        logLevel: Normal
        managementState: Managed
        nodeDisruptionPolicy:
          files:
          - actions:
            - type: Reboot
            path: /etc/test-reboot
        operatorLogLevel: Normal
      status:
        nodeDisruptionPolicyStatus:
          clusterPolicies:
            files:
            ...
            - actions:
              - type: Reboot
              path: /etc/test-reboot
            sshkey:
              actions:
              - type: None
        readyReplicas: 0
      
      then create new machine config to generate file /etc/test-reboot, node will be rebooted as expected
      
      apiVersion: machineconfiguration.openshift.io/v1
      kind: MachineConfig
      metadata:
        labels:
          machineconfiguration.openshift.io/role: worker
        name: test-file
      spec:
        config:
          ignition:
            version: 3.4.0
          storage:
            files:
            - contents:
                source: data:text/plain;charset=utf;base64,aGVsbG8K
              mode: 420
              path: /etc/test-reboot
      
      Update machineconfigurations/cluster with file action reload
      
      spec:
        logLevel: Normal
        managementState: Managed
        nodeDisruptionPolicy:
          files:
          - actions:
            - reload:
                serviceName: crio.service
              type: Reload
            path: /etc/test-reload
        operatorLogLevel: Normal
      status:
        nodeDisruptionPolicyStatus:
          clusterPolicies:
            files:
            ...
            - actions:
              - reload:
                  serviceName: crio.service
                type: Reload
              path: /etc/test-reload
            sshkey:
              actions:
              - type: None
        readyReplicas: 0
      
      Patch existing MC/test-file to generate file /etc/reload
      
      $ oc get mc/test-file -o yaml
      apiVersion: machineconfiguration.openshift.io/v1
      kind: MachineConfig
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: |
            {"apiVersion":"machineconfiguration.openshift.io/v1","kind":"MachineConfig","metadata":{"annotations":{},"labels":{"machineconfiguration.openshift.io/role":"worker"},"name":"test-file"},"spec":{"config":{"ignition":{"version":"3.4.0"},"storage":{"files":[{"contents":{"source":"data:text/plain;charset=utf;base64,aGVsbG8K"},"mode":420,"path":"/etc/test-reload"}]}}}}
        creationTimestamp: "2024-04-24T06:51:10Z"
        generation: 2
        labels:
          machineconfiguration.openshift.io/role: worker
        name: test-file
        resourceVersion: "184083"
        uid: 19b6973d-76d4-488b-a17f-b160a8bb96ca
      spec:
        config:
          ignition:
            version: 3.4.0
          storage:
            files:
            - contents:
                source: data:text/plain;charset=utf;base64,aGVsbG8K
              mode: 420
              path: /etc/test-reload
      
      Node is still rebooted, reload action cannot take effect

      Actual results:

      Node is still rebooted, reload action cannot take effect

      Expected results:

      Node won't be rebooted, crio service should be reloaded as expected

      Additional info:

          

              djoshy David Joshy
              rhn-support-rioliu Rio Liu
              Sergio Regidor de la Rosa Sergio Regidor de la Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: