pingcap / pingcap/tidb-operator
[issue] Ng-moniting incampatible with podsecurycontext
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
environment
k8s v1.29.14
os: kylin v10
kernel: 4.19.90-89.28.v2401.ky10x86_64
version
operator: v1.6.5
ng-monitoring: 8.5.5 and 8.5.6
tidbngmonitoring. yaml
Spec:
....
podSecurityContext:
fsGroup: 2000
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 1000
....
error massages
ng-monitoring log
[database.go:19] ["Stopping timeseries database"]
[database.go:19] ["Stop timeseries database successfully"]
tsdb.log
info /workspace/source/ng-monitoring/database/timeseries/vm.go:77 the VictoriaMetrics has been stopped in 0.007 seconds
panic: runtime error: invalid meory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=oxc7a1c7]
goroutine 1 [running]:
github.com/pingcap/ng-monitoring/database/docdb.(*logger).Infof(0xc0007300c0?, {0x1fe2c87?, 0x39d9ac0?}, {0xc0003eadc0?, 0x1?, 0x0?})
/workspace/source/ng-monitoring/database/docdb/genji_logger.go:81 +0x27
......
github.com/pingcap/ng-monitoring/database/docdb.NewGenjiDB({0x24ae7a0, 0x3a0d4c0}, 0xc000053d60)
/workspace/source/ng-monitoring/databse/docdb/genji.go:97 +0x7d8
main.main()
/workspace/source/ng-monitoring/main.go:86 +0x3ae
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the stack-trace locations in database/docdb/genji_logger.go, database/docdb/genji.go, and main.go, then review the reported podSecurityContext and ng-monitoring versions. Reproduce the failure with the stated Kubernetes environment and configuration. Done means ng-monitoring starts and stops without the nil-pointer panic when podSecurityContext is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100