-
Bug
-
Resolution: Done
-
Major
-
Logging 5.4.0
-
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 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
, 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