Creating cluster failing
Summary
During pod creation some containers failing to start.
Current Behaviour
Containers prometheus-postgres-exporter and fluent-bit are failing to start. get pods:
demo-db-0 5/7 CrashLoopBackOff 12 (15s ago) 6m38s
demo-db-0 5/7 Error 14 (5m4s ago) 11m
demo-db-0 5/7 CrashLoopBackOff 14 (1s ago) 11m
kubectl logs demo-db-0 -c fluent-bit
+ . /templates/shell-utils
++ LOCK_TIMEOUT=60
++ LOCK_SLEEP=5
++ QUEUE_NAME=create_event.pipe
+++ readlink /proc/17889/exe
++ SHELL=
readlink failing to resolve symlink and this stops shell-utils to proceed:
bash-4.4$ whoami
postgres
sh-4.4$ ls -ld /proc/17889/exe
ls: cannot read symbolic link '/proc/17889/exe': Permission denied
lrwxrwxrwx 1 postgres postgres 0 Jun 21 04:48 /proc/17889/exe
bash-4.4$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jun 20 2022 /bin/sh -> bash
bash-4.4$ ls -l /bin/bash
-rwxr-xr-x 1 root root 1150560 Jun 20 2022 /bin/bash
Steps to reproduce
Create pod.
Expected Behaviour
Possible Solution
Missing permissions, security issue
Environment
- StackGres version:
stackgres/operator:1.4.3
- Kubernetes version:
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.24.2
Relevant logs and/or screenshots
kubectl logs demo-db-0 -c fluent-bit
+ . /templates/shell-utils
++ LOCK_TIMEOUT=60
++ LOCK_SLEEP=5
++ QUEUE_NAME=create_event.pipe
+++ readlink /proc/17889/exe
++ SHELL=
kubectl logs demo-db-0 -c prometheus-postgres-exporter
+ . /templates/shell-utils
++ LOCK_TIMEOUT=60
++ LOCK_SLEEP=5
++ QUEUE_NAME=create_event.pipe
+++ readlink /proc/18011/exe
++ SHELL=
Edited by Vladimir M