fix: race with udevd
and mountUserDisks
Fixes #7246 The problem was that `udevd` watches via `inotify` any attempts to open blockdevices with 'write' access. Talos was opening with write access, but actually accessing as read-only, so the fix is to open as read-only. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
c3fabb9829
commit
ff11fd39c7
@ -1037,7 +1037,7 @@ func partitionAndFormatDisks(logger *log.Logger, r runtime.Runtime) error {
|
||||
disk := disk
|
||||
|
||||
if err := func() error {
|
||||
bd, err := blockdevice.Open(disk.Device())
|
||||
bd, err := blockdevice.Open(disk.Device(), blockdevice.WithMode(blockdevice.ReadonlyMode))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user