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

Plex 1.7.7 hostpath validation breaks installs with external data mounts #505

Closed
anotb opened this issue Jun 10, 2022 · 8 comments
Closed

Comments

@anotb
Copy link

anotb commented Jun 10, 2022

The addition of hostpath validations break installs where a hostpath created in /mnt from an external share mounted using smb/nfs, rclone or mergerfs was being used as a data library.

Specifically in charts/plex/1.7.7/questions.yaml, the addition of
$ref:
- "validations/hostPath"

Any chance that can not be made mandatory? Would hate to have to change hostpath and have plex rescan the library.

Error log -

Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 412, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 448, in __run_body
rv = await self.method(*([self] + args))
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1261, in nf
return await func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1129, in nf
res = await f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/upgrade.py", line 116, in upgrade
await self.upgrade_chart_release(job, release, options)
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/upgrade.py", line 266, in upgrade_chart_release
config, context = await self.middleware.call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1308, in call
return await self._call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1257, in _call
return await methodobj(*prepared_call.args)
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 332, in normalise_and_validate_values
dict_obj = await self.middleware.call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1308, in call
return await self._call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1257, in _call
return await methodobj(*prepared_call.args)
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/validation.py", line 69, in validate_values
verrors.check()
File "/usr/lib/python3/dist-packages/middlewared/service_exception.py", line 62, in check
raise self
middlewared.service_exception.ValidationErrors: [EINVAL] chart_release_create.appVolumeMounts.data.data.hostPathEnabled.hostPathEnabled.hostPath.hostPath: The path '/mnt' is already attached to service(s): SMB Share, VM.
[EINVAL] chart_release_create.appVolumeMounts.data.data.hostPathEnabled.hostPathEnabled.hostPath.hostPath: The path must reside within a pool mount point

@anotb
Copy link
Author

anotb commented Jun 10, 2022

JIRA request - https://jira.ixsystems.com/browse/NAS-116673

@anotb anotb changed the title Plex 1.7.7 hostpath validation breaks installs with Rclone/Mergerfs Plex 1.7.7 hostpath validation breaks installs with external data mounts Jun 10, 2022
@ancathri
Copy link

Saw this was rolled back in 1.7.8, but has since been re-introduced in 1.7.9. Was previously able to workaround by using extra hostpath volumes, but these have since had the validator applied as well.

Use case is similar to original issue, but I would like to be able to transcode to non-pool media

@sonicaj
Copy link
Member

sonicaj commented Jun 19, 2022

@ancathri i am curious, what is your use case to use non-pool media for transcoding ? Can you clarify ?

@ancathri
Copy link

@sonicaj I prefer to dump transcode stuff to memory, but I could see a similar case for a small dedicated SSD as well. Up until 1.7.7 I was just passing /dev/shm to /transcode in the container.

The nature of what it's doing is a lot of small, ephemeral reads/writes/deletes and I've got plenty of memory available. I don't need or care about it being persistent. Might as well reduce wear to spinning disks.

Thinking through the converse: I also don't think the intent of the validation necessarily makes sense for a transcode directory, it's not something that needs to be a validated hostPath or lockedHostPath for the app to function well

@Chankster
Copy link

I would also appreciate an option to disable the validation for the path.

@gentlecolts
Copy link

Adding to the request to optionally disable or just outright remove this "feature", not sure who it's for but it's disruptive. In my case the pool I use for plex is entirely devoted to plex, there's no reason why I should bother with a setup like /mnt/plex/plex when just /mnt/plex is fine

@Ornias1993
Copy link
Contributor

@sonicaj I prefer to dump transcode stuff to memory, but I could see a similar case for a small dedicated SSD as well. Up until 1.7.7 I was just passing /dev/shm to /transcode in the container.

Mounting /dev/shm is not correct with kubernetes
You should be using emptyDir volume type with memory backend. This is not exposed on the official Apps (it is with TrueCharts, for example).

Thinking through the converse: I also don't think the intent of the validation necessarily makes sense for a transcode directory, it's not something that needs to be a validated hostPath or lockedHostPath for the app to function well

It's not a user validation, it's a security feature to prevent app creators inherently bricking yours NAS ;-)

@sonicaj
Copy link
Member

sonicaj commented Aug 2, 2022

Closing this with this jira ticket https://ixsystems.atlassian.net/browse/NAS-117484

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

No branches or pull requests

6 participants