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

NFS provisioner and registry volume not created when HA-bastion is used #235

Open
MaartenKreuger opened this issue Feb 10, 2022 · 1 comment

Comments

@MaartenKreuger
Copy link

When the bastion host cluster is created by setting the count to 2, the NFS image persistent volume is not created automatically, but also the nfs-provisioner storage class is not created. The following is a workaround:
in: ocp4-helpernode/templates/checker.sh.js

cat > registry-pv.yaml <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
name: registry-pv
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
path: /export/registry
server: nfsserver.mydomain.com
EOF
oc apply -f registry-pv.yaml

cat > registry-pvc.yaml <<EOF
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: registry-pvc
namespace: openshift-image-registry
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
volumeName: registry-pv
EOF
oc apply -f registry-pvc.yaml

oc patch configs.imageregistry.operator.openshift.io cluster --type=json -p '[{"op": "remove", "path": "/spec/storage/emptyDir" }]'
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"pvc":{ "claim": "registry-pvc"}}}}'

I would expect the primary bastion to be configured with a registry export. It's not highly available of course, so we would need to replace it with a Spectrum Scale based export. The extra surprise was that the nfs-provisioner storageclass was not configured, making adding the PVC problematic. Please fix.

@yussufsh
Copy link
Contributor

We had decided not to set up NFS when using HA setup for obvious reasons as specified by you. Making the change to setup NFS only on bastion-0 does not make sense wrt design.

If you really need a simple NFS server with a provisioner then I suggest you running the helpernode command given below on the bastion node. This is post install step. You would still need to manage the NFS export and patch the registry operator manually.

helpernodecheck nfs-setup

If you still think otherwise then let us know.

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

2 participants