Skip to content

Commit 8f49dd2

Browse files
sudomateoshanduur
authored andcommitted
fix: open the filesystem as read-only
Updated `ReadFromVolume` to open the filesystem it's attempting to read from as read-only. This allows `vfat` cloud init volumes to be successfully read by Talos Linux. This change was made here and not in `pkg/xfs/fsopen/fsopen_linux.go` so that it only applies to volumes that are being read for cloud init configuration, not all volumes. Fixes #12647. Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com> (cherry picked from commit 782cc50)
1 parent b2a83d1 commit 8f49dd2

File tree

1 file changed

+1
-0
lines changed
  • internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils

1 file changed

+1
-0
lines changed

internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils/blockutils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ func ReadFromVolume(ctx context.Context, r state.State, labels []string, cb func
154154
mount.WithFsopen(
155155
volumeStatus.TypedSpec().Filesystem.String(),
156156
fsopen.WithSource(volumeStatus.TypedSpec().MountLocation),
157+
fsopen.WithBoolParameter("ro"),
157158
),
158159
mount.WithDetached(),
159160
)

0 commit comments

Comments
 (0)