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 needs mountOptions defining when using AWS EFS #30

Closed
meathead23 opened this issue Aug 6, 2020 · 0 comments · Fixed by #52
Closed

NFS needs mountOptions defining when using AWS EFS #30

meathead23 opened this issue Aug 6, 2020 · 0 comments · Fixed by #52

Comments

@meathead23
Copy link

meathead23 commented Aug 6, 2020

Issue:

When running MQ with the following properties:

  mq:
    version: 9.1.3.0
    # Set to True if running MQ in HA mode
    useConnectionNameList: true
    tlsSecretName: 'spm-dev01-mq-secret'
    queueManager:
      name: 'QM1'
      secret:
        # name is the secret that contains the 'admin' user password and the 'app' user password to use for messaging
        name: ''
        # adminPasswordKey is the secret key that contains the 'admin' user password
        adminPasswordKey: 'adminPasswordKey'
        # appPasswordKey is the secret key that contains the 'admin' user password
        appPasswordKey: 'appPasswordKey'
    metrics:
      enabled: false
    resources: {}
    multiInstance:
      cephEnabled: false
      storageClassName: 'nfs'
      nfsEnabled: true
      nfsIP: 'fs-xxxxxxxx.efs.eu-west-2.amazonaws.com'
      nfsFolder: 'spm-dev01'

When the curam-mq and rest-mq pods stasrt they connect mount the AWS EFS file system, and Kubernetes(EKS) returns the following error:

  Warning  FailedMount  2m31s  kubelet, ip-100-64-18-180.eu-west-2.compute.internal  MountVolume.SetUp failed for volume "spm-dev01-curam-pv-qm" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/11e52fd5-fb8c-40b6-9cf7-b252f1f4e1ac/volumes/kubernetes.io~nfs/spm-dev01-curam-pv-qm --scope -- mount -t nfs -o hard,nfsvers=4.1,noresvport,retrans=2,rsize=1048576,timeo=600,wsize=1048576 fs-xxxxxxx.efs.eu-west-2.amazonaws.com:/spm-dev01/curam /var/lib/kubelet/pods/11e52fd5-fb8c-40b6-9cf7-b252f1f4e1ac/volumes/kubernetes.io~nfs/spm-dev01-curam-pv-qm
Output: Running scope as unit run-12552.scope.
mount.nfs: Connection timed out

Solution:

adding mountOptions with the following properties as recommended here seems to resolve the issue

For this to be portable or able to be changed for different servicer providers I've added the following code to mqserver/templates/pv-data.yaml, mqserver/templates/pv-logs.yaml, mqserver/templates/pv-qm.yaml

  {{- if $.Values.global.mq.multiInstance.nfsMountOptions }}
  mountOptions:
    {{- range $.Values.global.mq.multiInstance.nfsMountOptions }}
    - {{ . | quote }}
    {{- end }}
  {{- end}}

adding the following element, to the set values then sets the mountOptions:

      nfsMountOptions:
        - "nfsvers=4.1"
        - "rsize=1048576"
        - "wsize=1048576"
        - "hard"
        - "timeo=600"
        - "retrans=2"
        - "noresvport"
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

Successfully merging a pull request may close this issue.

1 participant