fix(oci): keep every declared image data path on a volume so installs can be updated

This commit is contained in:
MacRimi
2026-09-30 22:28:20 +02:00
parent d2ac3b7638
commit c83f84398b
24 changed files with 257 additions and 65 deletions
+3 -1
View File
@@ -269,8 +269,10 @@ class NativeAdapter:
if image['architecture'] != old['architecture'] or image['os'] != 'linux':
raise ValueError(translate('Incompatible image platform'))
paths = [m['container_path'] for m in record['deployment'].get('mounts', [])]
transient = set(record.get('template', {}).get('proxmox', {}).get('installer_profile', {})
.get('non_persistent_image_volumes', []))
if any(not any(p == target or p.startswith(target.rstrip('/') + '/') for target in paths)
for p in (image['defaults'].get('Volumes') or {})):
for p in set(image['defaults'].get('Volumes') or {}) - transient):
raise ValueError(translate('The new image requires additional persistent paths'))
profile = record['deployment'].get('replay_profile', {})
if profile.get('adapter') in ('install_nextcloud_stack.sh', 'install_paperless_stack.sh', 'install_tandoor_stack.sh', 'install_immich_stack.sh'):