question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NFS-FIXER pod starts before PVC created

See original GitHub issue

Hi,

I ran into something rather unusual when using nfsPermissionFixer:

helm install -n $n jira --values values.yaml data-center-helm-charts/jira --debug

I noticed that the nfs-fixer would time out waiting for the condition

install.go:172: [debug] Original chart version: ""
install.go:189: [debug] CHART PATH: /root/data-center-helm-charts/src/main/charts/jira
client.go:268: [debug] Starting delete for "jira-nfs-fixer" Job
client.go:297: [debug] jobs.batch "jira-nfs-fixer" not found
client.go:122: [debug] creating 1 resource(s)
client.go:477: [debug] Watching for changes to Job jira-nfs-fixer with timeout of 5m0s
client.go:505: [debug] Add/Modify event for jira-nfs-fixer: ADDED
client.go:544: [debug] jira-nfs-fixer: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
client.go:505: [debug] Add/Modify event for jira-nfs-fixer: MODIFIED
client.go:544: [debug] jira-nfs-fixer: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
Error: failed pre-install: timed out waiting for the condition
helm.go:81: [debug] failed pre-install: timed out waiting for the condition

After scratching my head until I was bald, I noticed I could alter the pre-install value in nfs-permission-fixer.yaml

Before:

  annotations:
    "helm.sh/hook": pre-install
    "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"

After:

  annotations:
    "helm.sh/hook": post-install
    "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"

This appears to have resolved one of my problems.

The second problem was the actual command run by nfs-fixer; if others are using an EFS backed PVC, then I found the following command in your values.yaml doesn’t prevent Jira from starting:

command: "chown 2001: /shared-home"

Hopefully, this may be of help to others encountering the same!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17

github_iconTop GitHub Comments

2reactions
bianchi2commented, Feb 15, 2021
{{- if .Values.volumes.sharedHome.persistentVolumeClaim.create }}

shared home PVC template has this, and it’s weird Helm did not create it first for you. I’ll check it in a local cluster once again.

1reaction
pbruskicommented, Feb 17, 2021

Well, as long as keep it configurable, we can make it a part of the python startup script on the image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DC Helm Charts: NFS Fixer pod is stuck in pending state - Jira
This pod uses a PVC which Helm can create for you but it happens only after pre-install things are completed.
Read more >
Persistent Volumes | Kubernetes
You must create a Pod that uses the PVC before the expansion can complete. Similar to other volume types - FlexVolume volumes can...
Read more >
App fails when a non-root user owns the NFS file storage ...
The init container starts before your app container starts. ... Add persistent storage to your app by creating a persistent volume claim (PVC)....
Read more >
Kubernetes PVC Guide: Tutorials & Troubleshooting Tips
Quick Tutorial: Create a PersistentVolumeClaim (PVC) and Bind to a PV ... Users define a PVC configuration and apply it to a pod,...
Read more >
Sharing an NFS mount across two persistent volume claims
Before creating the PV object in OpenShift Container Platform, the persistent volume ... However, multiple pods in the same project can use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found