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

The loki-operator can not be upgraded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • Logging 5.4.0
    • Logging 5.4.0
    • Log Storage
    • None
    • False
    • None
    • False
    • NEW
    • OBSDA-7 - Adopting Loki as an alternative to Elasticsearch to support more lightweight, easier to manage/operate storage scenarios
    • VERIFIED
    • Logging (LogExp) - Sprint 217

    Description

      Description of problem:
      The loki-operator can be upgraded. It raise error in csv.status
                  {
                      "lastTransitionTime": "2022-04-13T09:41:34Z",
                      "lastUpdateTime": "2022-04-13T09:41:34Z",
                      "message": "install strategy failed: Deployment.apps \"loki-operator-controller-manager\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string

      {\"app.kubernetes.io/instance\":\"loki-operator-v5.4.0-36\", \"app.kubernetes.io/managed-by\":\"operator-lifecycle-manager\", \"app.kubernetes.io/name\":\"loki-operator\", \"app.kubernetes.io/part-of\":\"cluster-logging\", \"app.kubernetes.io/version\":\"5.4.0-36\", \"name\":\"loki-operator-controller-manager\"}

      , MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable",
                      "phase": "Failed",
                      "reason": "InstallComponentFailed"
                  }
              ],

       

      Version-Release number of selected component (if applicable):
      loki-operator.5.4.0-34 --> loki-operator.5.4.0-36

      How reproducible:
      Always

      Steps to Reproduce:
      1) Build index image v5.4.0-34 and create catalogsource.
      opm index add --bundles registry-proxy.engineering.redhat.com/rh-osbs/openshift-logging-loki-operator-bundle@sha256:5dd9ca162ae89fe09551b55cad3b1d4dabb3dcfb87417e1e606ee435cd18521b --tag quay.io/<repo>/loki-index:v5.4.0-34 -c podman

      cat <<EOF | oc create -f -
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        name: loki-registry
        namespace: openshift-marketplace
      spec:
        image: quay.io/${repo}/loki-index:v5.4.0-34
        publisher: Red Hat
        sourceType: grpc
        updateStrategy:
          registryPoll:
            interval: 10m0s
      EOF
            
      2) subscribe loki-registry and deploy loki-operator
      3) build index image v5.4.0-36 and update catalogsource.
      opm index add --bundles registry-proxy.engineering.redhat.com/rh-osbs/openshift-logging-loki-operator-bundle@sha256:89ac081819b8061f115ec2defbe2dab132efdbcb6d944bd92d654c0d1cce1a11 --tag quay.io/<repo>/loki-index:v5.4.0-36  -c podman
      cat <<EOF | oc apply -f -
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        name: loki-registry
        namespace: openshift-marketplace
      spec:
        image: quay.io/${repo}/loki-index:1
        publisher: Red Hat
        sourceType: grpc
        updateStrategy:
          registryPoll:
            interval: 10m0s
      EOF    
      4) Wait until the CSV is updated.
      oc get csv -n openshift-operators-redhat
      oc get csv loki-operator.5.4.0-36 -o json -n  openshift-operators-redhat

      Actual results:
      The loki-operator can be upgraded.
      $oc get csv
      NAME                               DISPLAY                            VERSION     REPLACES                          PHASE
      elasticsearch-operator.5.4.0-146   OpenShift Elasticsearch Operator   5.4.0-146   elasticsearch-operator.5.3.6-44   Succeeded
      loki-operator.5.4.0-34             Loki Operator                      5.4.0-34                                      Replacing
      loki-operator.5.4.0-36             Loki Operator                      5.4.0-36    loki-operator.5.4.0-34            Failed

      Attachments

        Activity

          People

            rojacob@redhat.com Robert Jacob
            rhn-support-anli Anping Li
            Anping Li Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: