htk8s
htk8s copied to clipboard
Default transmission configuration is damaged
Was checking this project out for the first time. Forgive me for my k8s/k3s laypersonship.
Ran the x86 install, was unable to access Transmission. Ingress said 502 Bad Gateway. Checking out the logs indicated that the settings.json was malformed. Inspection of the JSON shows:
"rpc-host-whitelist-enabled": false,
Obviously, something has been interpreted weird. So I scaled the replicaset to 0, nuked the file, and scaled back up:
kubectl scale --replicas=0 replicaset/transmission-5bf9655f77
rm /opt/htpc/transmission/settings.json
kubectl scale --replicas=1 replicaset/transmission-5bf9655f77
That restored it back to the application default which has the tragic side-effect of turning whitelisting back on. Back to the drawing board. Lets try a new deployment:
kubectl scale --replicas=0 replicaset/transmission-5bf9655f77
rm /opt/htpc/transmission/settings.json
kubectl rollout restart deployment/transmission
Isolated the issue to the deployment args by manually replacing the JSON being echo'd into the config file:
- args:
- echo starting; echo deadbeef > /config/settings.json; echo done;
Success. The config file literally just says "deadbeef." So there seems to be something wrong with the way the JSON is being spit out into the config file as a deployment argument.
Running on a bare-metal Ubuntu 20.04 server, if that matters.
What is also interesting is that for a split second, it actually is correct. If I spam cat on the settings file, it is right and then ti is not. I don't understand enough about the flow to understand what edits this file, and why.
hi@htpc:/opt/htpc/transmission$ cat settings.json
{"download-dir": "/downloads", "rpc-whitelist-enabled": false, "rpc-host-whitelist-enabled": false}
hi@htpc:/opt/htpc/transmission$ cat settings.json
"rpc-whitelist-enabled": false,
Hi @ericgoedtel ,
Sorry, my bad. I saw that error and fixed in another branch I was working on... Check this commit: https://github.com/fabito/htk8s/pull/14/commits/4fd79a6a8420845160a0d4d71388af5b85970f0d
Haha okay thanks. I'm glad you knew about it. I was going bananas trying to figure out why it was happening to only me.😆
The transmission config file is being overwritten everytime the pod restarts :-( So annoying.. I will work on a fix soon