munnerz / kube-plex

Scalable Plex Media Server on Kubernetes -- dispatch transcode jobs as pods on your cluster!
Apache License 2.0
1.23k stars 191 forks source link

Transcode pod is not created with subpath #49

Open OGKevin opened 5 years ago

OGKevin commented 5 years ago

When i play a video that requires transcoding, the transcode pod dies immediately with the following logs:

container_linux.go:247: starting container process caused "chdir to cwd (\"/transcode/Transcode/Sessions/plex-transcode-4prvaib6gcbct1asr5v9iqce-95126e93-4ec7-46e7-b0ee-5bb2edefb44e\") set in config.json failed: no such file or directory"

however, I'm not quite sure why this is happening. When i enter the main plex container i can see the dir:

kubectl exec -it plex-kube-plex-65564f564c-b5b7p bash
root@plex-kube-plex:/# ls transcode/Transcode/Sessions/
plex-transcode-4prvaib6gcbct1asr5v9iqce-95126e93-4ec7-46e7-b0ee-5bb2edefb44e

any ideas?

OGKevin commented 5 years ago

Ahh the PMS pods are not using subpaths while the main plex pod does if you specify it!

https://github.com/munnerz/kube-plex/blob/df3daeafd728c4f0d5c567b2d9bb0565c5cf5e52/main.go#L138-L164

https://github.com/munnerz/kube-plex/blob/df3daeafd728c4f0d5c567b2d9bb0565c5cf5e52/charts/kube-plex/templates/deployment.yaml#L102-L120

I'll see if i can make a PR to fix this :)

OGKevin commented 5 years ago

Yea its due to subpath. Plz let me know if a PR is welcome.

gandazgul commented 5 years ago

@OGKevin did you resolve this? I need this feature.

OGKevin commented 5 years ago

@gandazgul i could not use subpath, as i needed to rebuild the binary that was spawning the pods and rebuild the image. So i just opted to not use subpath as it was too much of a hassle.

I ended up not being able to use this as the spawend pod that transcode kept dying or was not able to transcode and i just gave up on it. It workes fine w out the transcode pods. If i see i need them again ill prob dig into it. But didn't see the benefit as it works fine with out.

gandazgul commented 5 years ago

yeah, I do get some issues with network speed but I'm sure if its the pod or something else. ok. thanks for the reply.