Skip to content

Commit

Permalink
Make sure ix-apps mountpoint is correct (#14983)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugclerk authored Nov 19, 2024
1 parent 1abbc12 commit 434b54d
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 434b54d

Please sign in to comment.