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

NAS-132169 / 25.04 / Make sure ix-apps mountpoint is correct #14937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/middlewared/middlewared/plugins/pool_/import_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import subprocess

from middlewared.plugins.docker.state_utils import IX_APPS_DIR_NAME
from middlewared.schema import accepts, Bool, Dict, List, returns, Str
from middlewared.service import CallError, InstanceNotFound, job, private, Service

Expand Down Expand Up @@ -133,6 +134,13 @@ async def import_pool(self, job, data):
# We exclude `ix-applications` dataset since resetting it will
# cause PVC's to not mount because "mountpoint=legacy" is expected.
# We exclude `ix-apps` dataset since it has a custom mountpoint in place
# If user downgrades to DF or earlier and he had ix-apps dataset, and he comes back
# to EE or later, what will happen is that the mountpoint for ix-apps would be reset
# because of the logic we have below, hence we just set and it's children will inherit it
if child == os.path.join(pool_name, 'ix-apps'):
await self.middleware.call(
'zfs.dataset.update', child, {'properties': {'mountpoint': {'value': f'/{IX_APPS_DIR_NAME}'}}}
)
continue
try:
# Reset all mountpoints
Expand Down
Loading