goharbor/harbor-helm

Harbor DB fails to start due to file permissions after initial run in 2.9.0

akhilesh2410 opened this issue · 3 comments

This issue is already describe in #993

and we are seeing same issue with harbor chart 1.13.0 app version 2.9.0.

harbor harbor-core-75c45fbd7-5v56s 1/1 Running 0 23h
harbor harbor-database-0 0/1 CrashLoopBackOff 68 (4m56s ago) 5h30m
harbor harbor-jobservice-787f4d98dc-nwcgd 0/1 Running 66 (61s ago) 23h
harbor harbor-nginx-6cd54b8f56-lw598 1/1 Running 0 23h
harbor harbor-portal-6dbcc46978-rxcnj 1/1 Running 0 23h
harbor harbor-redis-0 0/1 CrashLoopBackOff 69 (96s ago) 5h30m
harbor harbor-registry-6dffcb7bb-rs4vr 2/2 Running 0 23h

harbor-db pod's log:

root@edge-0ed8384205b7c6ff051542cdb8d161e6:~# kubectl logs -n harbor harbor-database-0 Defaulted container "database" out of: database, data-migrator (init), data-permissions-ensurer (init) 2024-01-04 07:57:34.108 GMT [1] LOG: input in flex scanner failed at file "/var/lib/postgresql/data/pgdata/pg14/postgresql.conf" line 1 2024-01-04 07:57:34.108 GMT [1] FATAL: configuration file "/var/lib/postgresql/data/pgdata/pg14/postgresql.conf" contains errors root@edge-0ed8384205b7c6ff051542cdb8d161e6:~#

Command in init containers:

Port:          <none>
Host Port:     <none>
Command:
  /bin/sh
Args:
  -c
  chmod -R 700 /var/lib/postgresql/data/pgdata || true
State:          Terminated
  Reason:       Completed
  Exit Code:    0
  Started:      Thu, 04 Jan 2024 02:27:19 +0000
  Finished:     Thu, 04 Jan 2024 02:28:40 +0000
Ready:          True
Restart Count:  0
Environment:    <none>
Mounts:
  /var/lib/postgresql/data from database-data (rw)

chart version:

root@edge-0ed8384205b7c6ff051542cdb8d161e6:~# /opt/spectrocloud/bin/helm ls -Aa
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
harbor harbor 1 2024-01-03 08:52:54.020789197 +0000 UTC deployed harbor-1.13.0 2.9.0

zyyw commented

it seems that this is not about file permission issue, but rather the content in file /var/lib/postgresql/data/pgdata/pg14/postgresql.conf is invalid. Could you please dump the content of this /var/lib/postgresql/data/pgdata/pg14/postgresql.conf for us.
Thanks

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.