Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not open file "pg_wal/000000010000000000000001": No such file or directory #1886

Open
platformdocs opened this issue Dec 5, 2024 · 2 comments
Assignees

Comments

@platformdocs
Copy link

When I try to deploy harbor using helm chart, the pod harbor-database 's status is always pending. I check the log:

LOG: could not link file "pg_wal/xlogtemp.31" to "pg_wal/000000010000000000000001": Operation not permitted
FATAL: could not open file "pg_wal/000000010000000000000001": No such file or directory

I've tried to add permission fix in extrInitContainers or initContainers, but it doesn't work

Helm: v3.15.4, harbor-db: v2.11.1

values.yaml:
database:
type: internal
internal:
image:
repository: goharbor/harbor-db
tag: v2.11.1
pullPolicy: IfNotPresent
# set the service account to be used, default if left empty
serviceAccountName: ""
# mount the service account token
automountServiceAccountToken: false
# resources:
# requests:
# memory: 256Mi
# cpu: 100m
# The timeout used in livenessProbe; 1 to 5 seconds
livenessProbe:
timeoutSeconds: 1
# The timeout used in readinessProbe; 1 to 5 seconds
readinessProbe:
timeoutSeconds: 1
extraEnvVars: []
nodeSelector: {}
tolerations: []
affinity: {}
## The priority class to run the pod as
priorityClassName:
# containers to be run before the controller's container starts.
extrInitContainers:
- name: db-permission-fix
securityContext:
runAsUser: 0 # Run as root user
image: magikcompute.harbor.com:1080/library/goharbor/harbor-db:v2.11.1
command: [ 'sh', '-c', 'mkdir -p /var/lib/postgresql/data/; chown -R 999:999 /var/lib/postgresql/data/; chmod -R 700 /var/lib/postgresql/data/' ]
volumeMounts:
- name: database-data
mountPath: /var/lib/postgresql/data

@reasonerjt
Copy link
Contributor

Is it a fresh install or an upgrade from an older version?

@platformdocs
Copy link
Author

Is it a fresh install or an upgrade from an older version?

it's a fresh install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants