utkuozdemir / helm-charts

Helm Chart Repository
MIT License
41 stars 14 forks source link

RTnetlink answers: file exists #15

Closed nullset2 closed 1 year ago

nullset2 commented 1 year ago

Hi. Apologies if this is answered elsewhere, but I've been stuck on this for a very long while and I really want to solve it. I have googled to no avail. I know the charts are deprecated but any comment helps.

This is how I install and configure the chart on my cluster:

helm install pine \
  --set env.LOCAL_NETWORK="10.0.0.0\/8\,172.16.0.0\/12\,192.168.1.0\/24" \
  --set env.OVERRIDE_DNS_1=8.8.8.8 \
  --set env.OVERRIDE_DNS_2=8.8.4.4 \
  --set env.OPENVPN_CONFIG=ca_vancouver \
  --set env.OPENVPN_OPTS="--inactive 3600 --ping 10 --ping-exit 60 --pull-filter ignore ping" \
  --set env.OPENVPN_PROVIDER=PIA \
  --set env.OPENVPN_USERNAME=... \
  --set env.TRANSMISSION_DOWNLOAD_DIR=\/media \
  --set env.TRANSMISSION_INCOMPLETE_DIR=\/media\/incomplete \
  --set secretEnv.OPENVPN_PASSWORD=... \
  --set persistence.existingClaim="nfs-pvc" \
  --kube-context=pine \
  -f values.yaml \
  utkuozdemir/transmission-openvpn

my values.yaml...

extraVolumeMounts:
  - mountPath: /media
    name: media

extraVolumes:
  - name: media
    persistentVolumeClaim:
      claimName: nfs-pvc

persistence:
  accessModes:
    - ReadWriteMany

This runs perfectly, but then once the kubelet evicts the pod (several days later, at random) and creates a new one, the pod creation Crashloops when trying to add routes with:

Setting OpenVPN credentials...
adding route to local network 192.168.1.0/24 via 10.42.1.1 dev eth0
RTNETLINK answers: File exists

Deleting the pod and then letting it restart solves the issue, but this shouldn't happen --this takes my transmission server down until I manually delete the crashlooping pod.

I have seen many explanations around:

Please advise.

nullset2 commented 1 year ago

Geez, it actually seems that in my specific setup, I actually need no LOCAL_NETWORK variable. Removing the assignment of LOCAL_NETWORK, I think, finally solved it. Just tried forcing an eviction after I redeployed without LOCAL_NETWORK and it all works flawlessly, ingress and VPN included.

No, the previous didn't work. The ingress eventually stopped working...

utkuozdemir commented 1 year ago

Hi,

I have a feeling that this is not about the chart but about the upstream project. I guess it sometimes for some reason cannot do a proper cleanup when it is terminating, so it fails to start on the next run.

I'd suggest taking the latest upstream project image tag from here https://haugene.github.io/docker-transmission-openvpn

and specifying image.tag in the chart. It seems they did some fixes on the startup/shutdown scripts, so it might actually help.

nullset2 commented 1 year ago

Ah bingo, changing to latest solved it, and it even got me a completely different, new version of the application. Fantastic.