Bug 1707323
| Summary: | Elasticsearch operator - panic: assignment to entry in nil map | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Josef Karasek <jkarasek> |
| Component: | Logging | Assignee: | Josef Karasek <jkarasek> |
| Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.1.0 | CC: | aos-bugs, jcantril, pweil, rmeggins |
| Target Milestone: | --- | ||
| Target Release: | 4.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-04 10:48:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Josef Karasek
2019-05-07 09:38:40 UTC
The resource are added to CRD/elasticsearch after I delete them. But the elasticsearch deployment couldn't be created.
Steps
1: Deploy cluster logging
2: Disable clusterloging by set --replicas=0
oc scale deployment cluster-logging-operator --replicas=0
3. Remove the resource items in elasticsearch/elasticsearch
Waiting for a while. Check the result
No elasticsearch are deployed.
Error message are reported [1]
The elasticsearch resource as [2]
[1] [anli@preserve-anli-slave 41]$ oc logs elasticsearch-operator-796f97d775-qwjbz
time="2019-05-08T08:48:16Z" level=info msg="Go Version: go1.10.8"
time="2019-05-08T08:48:16Z" level=info msg="Go OS/Arch: linux/amd64"
time="2019-05-08T08:48:16Z" level=info msg="operator-sdk Version: 0.0.7"
time="2019-05-08T08:48:16Z" level=info msg="Watching logging.openshift.io/v1, Elasticsearch, , 5000000000"
time="2019-05-08T08:48:23Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:48:32Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:48:41Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:48:49Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:48:58Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:49:07Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
time="2019-05-08T08:49:16Z" level=error msg="error syncing key (openshift-logging/elasticsearch): Failed to reconcile Elasticsearch deployment spec: Could not create node resource: Deployment.apps \"elasticsearch-cdm-1izqe0zq-1\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string(nil): `selector` does not match template `labels`, spec.template.spec.containers: Required value]"
[2]
[anli@preserve-anli-slave 41]$ oc get elasticsearch elasticsearch
NAME AGE
elasticsearch 11m
[anli@preserve-anli-slave 41]$ oc get elasticsearch elasticsearch -o yaml
apiVersion: logging.openshift.io/v1
kind: Elasticsearch
metadata:
creationTimestamp: 2019-05-08T08:39:29Z
generation: 13
name: elasticsearch
namespace: openshift-logging
ownerReferences:
- apiVersion: logging.openshift.io/v1
controller: true
kind: ClusterLogging
name: instance
uid: 622741e8-7140-11e9-ba10-0a71760f4148
resourceVersion: "860820"
selfLink: /apis/logging.openshift.io/v1/namespaces/openshift-logging/elasticsearches/elasticsearch
uid: cb4f393a-716c-11e9-be9d-06c585732894
spec:
managementState: Managed
nodeSpec:
image: image-registry.openshift-image-registry.svc:5000/openshift/ose-logging-elasticsearch5:v4.1.0-201905070632
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: "1"
memory: 2Gi
nodes:
- genUUID: 1izqe0zq
nodeCount: 1
resources: {}
roles:
- client
- data
- master
storage: {}
redundancyPolicy: ZeroRedundancy
status:
clusterHealth: cluster health unknown
conditions: []
nodes:
- conditions:
- lastTransitionTime: 2019-05-08T08:44:20Z
message: '0/6 nodes are available: 3 Insufficient cpu, 3 node(s) had taints
that the pod didn''t tolerate.'
reason: Unschedulable
status: "True"
type: Unschedulable
deploymentName: elasticsearch-cdm-1izqe0zq-1
upgradeStatus: {}
pods:
client:
failed: []
notReady: []
ready: []
data:
failed: []
notReady: []
ready: []
master:
failed: []
notReady: []
ready: []
shardAllocationEnabled: shard allocation unknown
The image is openshift/ose-elasticsearch-operator:v4.1.0-201905071832 The comment 2 seems to be another issue caused by deployment deletion. Following josef's step, the assign resouce size are added back after it was deleted. So I will close this one and file a new one. 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:0758 |