Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-2413

PriorityClass cluster-logging is deleted if provide an invalid log type

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Hide

      1. Deploy cluster-logging operator
      2. PriorityClass/cluster-logging is created
      oc get PriorityClass
      NAME VALUE GLOBAL-DEFAULT AGE
      cluster-logging 1000000 false 2m15s
      openshift-user-critical 1000000000 false 8h
      system-cluster-critical 2000000000 false 8h
      system-node-critical 2000001000 false 8h

      3. Create clusterlogging/instance with invalid log type
      cat <<EOF |oc create -f -
      apiVersion: "logging.openshift.io/v1"
      kind: "ClusterLogging"
      metadata:
      name: "instance"
      namespace: openshift-logging
      spec:
      managementState: "Managed"
      collection:
      logs:
      type: "xxxx"
      fluentd: {}
      EOF

      4. The PriorityClass/cluster-logging is deleted.
      oc get PriorityClass
      NAME VALUE GLOBAL-DEFAULT AGE
      openshift-user-critical 1000000000 false 8h
      system-cluster-critical 2000000000 false 8h
      system-node-critical 2000001000 false 8h

      5. Deploy clusterlogging/instance with correct log type.
      oc delete clusterlogging/instance
      cat <<EOF |oc create -f -
      apiVersion: "logging.openshift.io/v1"
      kind: "ClusterLogging"
      metadata:
      name: "instance"
      namespace: openshift-logging
      spec:
      managementState: "Managed"
      collection:
      logs:
      type: "fluentd"
      fluentd: {}
      EOF

      *Actual results:
      The collector can be deployed for DESIRED=0 as PriorityClass/cluster-logging doesn't exist.
      oc get ds/collector
      NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
      collector 0 0 0 0 0 kubernetes.io/os=linux 10s

      Show
      1. Deploy cluster-logging operator 2. PriorityClass/cluster-logging is created oc get PriorityClass NAME VALUE GLOBAL-DEFAULT AGE cluster-logging 1000000 false 2m15s openshift-user-critical 1000000000 false 8h system-cluster-critical 2000000000 false 8h system-node-critical 2000001000 false 8h 3. Create clusterlogging/instance with invalid log type cat <<EOF |oc create -f - apiVersion: "logging.openshift.io/v1" kind: "ClusterLogging" metadata: name: "instance" namespace: openshift-logging spec: managementState: "Managed" collection: logs: type: "xxxx" fluentd: {} EOF 4. The PriorityClass/cluster-logging is deleted. oc get PriorityClass NAME VALUE GLOBAL-DEFAULT AGE openshift-user-critical 1000000000 false 8h system-cluster-critical 2000000000 false 8h system-node-critical 2000001000 false 8h 5. Deploy clusterlogging/instance with correct log type. oc delete clusterlogging/instance cat <<EOF |oc create -f - apiVersion: "logging.openshift.io/v1" kind: "ClusterLogging" metadata: name: "instance" namespace: openshift-logging spec: managementState: "Managed" collection: logs: type: "fluentd" fluentd: {} EOF *Actual results: The collector can be deployed for DESIRED=0 as PriorityClass/cluster-logging doesn't exist. oc get ds/collector NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE collector 0 0 0 0 0 kubernetes.io/os=linux 10s
    • Logging (Core) - Sprint 216

      Logging 5.5 create PriorityClass/cluster-logging different from the old. It create PriorityClass during operator deployment. if we create clusterlogging/instance with an invalid log type, the CLO will delete PriorityClass/cluster-logging and never create it again. Without PriorityClass/cluster-logging, the ds/colllector can not be deployed.

      $oc get ds
      NAME               DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
      collector          0         0         0       0            0           kubernetes.io/os=linux   100m
      

              jcantril@redhat.com Jeffrey Cantrill
              rhn-support-anli Anping Li
              Anping Li Anping Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: