From 002d6799b19afe137bc5fbc2758f0007385ca1a6 Mon Sep 17 00:00:00 2001 From: Hermes Agent service account Date: Sat, 20 Jun 2026 23:56:20 -0500 Subject: [PATCH] Fix iscsi-multipath-init DaemonSet for Talos read-only filesystem Use nsenter to write multipath.conf in host's mount namespace instead of trying to write to /host/etc which is read-only in containers. Talos mounts /etc as read-only in container namespaces but allows writes in the host mount namespace. This fix uses nsenter to access PID 1's mount namespace where /etc is writable. Also removed unnecessary volumeMounts and volumes since we're using nsenter instead of hostPath mounts. Fixes: Init:Error - 'can't create /host/etc/multipath.conf: Read-only file system' --- talos/talhelper/iscsi-multipath-init.yaml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/talos/talhelper/iscsi-multipath-init.yaml b/talos/talhelper/iscsi-multipath-init.yaml index 19df1a0..834b3e0 100644 --- a/talos/talhelper/iscsi-multipath-init.yaml +++ b/talos/talhelper/iscsi-multipath-init.yaml @@ -51,8 +51,9 @@ spec: echo "Configuring multipath for Pure Storage FlashArray..." - # Write multipath.conf - cat > /host/etc/multipath.conf <<'MPCONF' + # Write multipath.conf using nsenter to access host's writable filesystem + # Talos mounts /etc as read-only in containers, but writable in host namespace + nsenter -t 1 -m -u -i -n -- sh -c 'cat > /etc/multipath.conf' <<'MPCONF' # Multipath configuration for Pure Storage FlashArray # Managed by iscsi-multipath-init DaemonSet @@ -97,10 +98,6 @@ spec: echo "✓ Multipath configuration complete" echo "Current multipath devices:" nsenter -t 1 -m -u -i -n -- multipath -ll || echo " (no multipath devices yet)" - - volumeMounts: - - name: host-etc - mountPath: /host/etc containers: # Pause container keeps the pod running to indicate configuration is applied @@ -113,9 +110,3 @@ spec: limits: cpu: 10m memory: 16Mi - - volumes: - - name: host-etc - hostPath: - path: /etc - type: Directory