Closed leo8a closed 1 year ago
In my env was solved by manually changing (before instantiating the statefulsets) https://github.com/karmab/kcli-openshift4-baremetal/blob/b9efe9c48e525944bd471ff44be72121d9618e75/scripts/10_nfs.sh#L13-L15
with
mkdir /var/nfsshare useradd postgres chown -R postgres:postgres /var/nfsshare chmod -R 777 /var/nfsshare echo "/var/nfsshare *(rw,no_root_squash)" >> /etc/exports exportfs -r
When
statefulsets
(or any other object using persistent storage) use apostgres
image, the pods fails to execute due to permission issues. This is caused by the current configs/perms on the available NFS-basedstorageclass
: https://github.com/karmab/kcli-openshift4-baremetal/blob/master/scripts/10_nfs.shManually, this is easy to solve by adding the
postgres
user to the NFS server and changing thechown
and thechmod
of the volume. More details on this resolution here: https://access.redhat.com/solutions/2817281Automatically/Programmatically, the problem doesn't look trivial to solve.
/cc @karmab