fix: skip read-only mounts in permission fixer and remove redundant ssh_keys manifest mount

- apply_mount_permissions now skips mounts with readonly=true to avoid
  'Read-only file system' warnings on post-start chown/chmod
- Removed the ssh_keys mount from the pi-agent manifest definition;
  instance-level SSH key mounting now handles this exclusively
- Added unit test for read-only mount skipping

Quality gates: pytest (15 passed)
This commit is contained in:
Alex Blank
2026-05-29 15:32:00 +02:00
parent de8c47c81c
commit b483a34517
4 changed files with 32 additions and 9 deletions
+11
View File
@@ -40,6 +40,17 @@ def apply_mount_permissions(
"error": None,
}
# Skip read-only mounts — their permissions cannot be changed
# post-start because the bind mount is locked.
if mount.get("readonly", False):
logger.debug(
"Skipping permission fix for read-only mount %s (target=%s)",
name,
target,
)
results.append(result)
continue
# Skip if no permission policy defined
if not owner and not mode and not file_mode:
results.append(result)