You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you see instead? Under which circumstances?
Logstash crashes with CrashLoopBackOff
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
logstash-sample-ls-0 0/1 Error 1 (2s ago) 3s
$ kubectl logs -f logstash-sample-ls-0
Defaulted container "logstash" out of: logstash, logstash-internal-init-config (init)
2024/01/09 12:08:42 Setting 'node.name' from environment.
2024/01/09 12:08:42 error: open /usr/share/logstash/config/logstash.yml: read-only file system
Environment
ECK version:
Logstash technical preview. ECK 2.8
Root cause
This is an issue relates to logstash image startup process env2yaml, which overwrites the logstash.yml regardless of the existing settings in the file. The source of logstash.yml is from Secret which is readonly mapping to mount path. Changing ln -sf to cp could solve the issue.
The text was updated successfully, but these errors were encountered:
Fixed: #7450
Logstash crashes when env variable name is in the list of
[env2yaml](https://github.com/elastic/logstash/blob/main/docker/data/logstash/env2yaml/env2yaml.go#L50-L155)
This PR changes the config init container to copy the `logstash.yml` to
`config` Volume to allow updating the file.
The following resource should start without error
```yaml
apiVersion: logstash.k8s.elastic.co/v1alpha1
kind: Logstash
metadata:
name: logstash-sample
spec:
count: 1
version: 8.11.1
podTemplate:
spec:
containers:
- name: logstash
env:
- name: "NODE_NAME"
value: "No_Crash!"
```
Proposal
Use case. Why is this important?
Logstash container crashes before log4j be able to write logstash-plain.log.
Bug Report
What did you do?
What did you expect to see?
Logstash starts without error
What did you see instead? Under which circumstances?
Logstash crashes with CrashLoopBackOff
$ kubectl get pod
$ kubectl logs -f logstash-sample-ls-0
Environment
ECK version:
Logstash technical preview. ECK 2.8
Root cause
This is an issue relates to logstash image startup process env2yaml, which overwrites the
logstash.yml
regardless of the existing settings in the file. The source oflogstash.yml
is from Secret which is readonly mapping to mount path. Changingln -sf
tocp
could solve the issue.The text was updated successfully, but these errors were encountered: