che
che copied to clipboard
Postgres fails to start with permission denied when deploying Che
Describe the bug
OpenShift 4.11
kubectl apply -f ./che-workspace-pv.yaml kubectl apply -f ./che-postgresql-pv.yaml
chectl server:deploy --platform openshift --multiuser --workspace-pvc-storage-class-name=workspace-storage --postgres-pvc-storage-class-name=postgres-storage --k8spodreadytimeout=500000
❯ Post installation checklist ❯ PostgreSQL pod bootstrap ✔ Scheduling...[OK] ✔ Downloading images...[OK] ✖ Starting → Failed to start a pod, reason: Error, exitCode: 1
Che version
7.52@latest
Steps to reproduce
kubectl apply -f ./che-workspace-pv.yaml kubectl apply -f ./che-postgresql-pv.yaml
chectl server:deploy --platform openshift --multiuser --workspace-pvc-storage-class-name=workspace-storage --postgres-pvc-storage-class-name=postgres-storage --k8spodreadytimeout=500000
Expected behavior
Postgres runs
Runtime
OpenShift
Screenshots
No response
Installation method
OperatorHub
Environment
Linux
Eclipse Che Logs
kubectl apply -f ./che-workspace-pv.yaml
kubectl apply -f ./che-postgresql-pv.yaml
chectl server:deploy --platform openshift --multiuser --workspace-pvc-storage-class-name=workspace-storage --postgres-pvc-storage-class-name=postgres-storage --k8spodreadytimeout=500000
Additional context
No response
mkdir: cannot create directory '/var/lib/pgsql/data/userdata': Permission denied
@rcampion
Could you show the yaml for che-postgresql-pv.yaml
?
and what is the purpose of PV creation before deploying Eclipse Che?
I am asking this because there is no way to use pre-created PV for PostgreSQL.
It is possible to configure StorageClass for PVC only.
che-postgresql-pv.yaml
che-postgres-pv.yaml
apiVersion: v1 kind: PersistentVolume metadata: name: postgres-pv-volume labels: type: local spec: storageClassName: postgres-storage capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/data/che/postgres"
Can you suggest the proper command for installing Che on openshift
I deleted the PV's and tried:
sudo chectl server:deploy --platform openshift --multiuser
Post installation checklist ❯ PostgreSQL pod bootstrap ✖ Scheduling → Failed to schedule a pod, reason: Unschedulable, message: 0/1 nodes are available: …
There is nothing specific for OpenShift, just:
chectl server:deploy --platform openshift
If it fails, then try chectl server:logs
to grap and attach all logs in investigate the problem.
Closed as won't fix since PostgreSQL component is going to be removed in future versions.