che icon indicating copy to clipboard operation
che copied to clipboard

Postgres fails to start with permission denied when deploying Che

Open rcampion opened this issue 2 years ago • 5 comments

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

rcampion avatar Aug 31 '22 11:08 rcampion

mkdir: cannot create directory '/var/lib/pgsql/data/userdata': Permission denied

rcampion avatar Aug 31 '22 12:08 rcampion

@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.

tolusha avatar Sep 05 '22 09:09 tolusha

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: …

rcampion avatar Sep 05 '22 13:09 rcampion

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.

tolusha avatar Sep 06 '22 14:09 tolusha

events.txt

rcampion avatar Sep 07 '22 12:09 rcampion

Closed as won't fix since PostgreSQL component is going to be removed in future versions.

tolusha avatar Jan 20 '23 08:01 tolusha