Fix 0001-ignore-missing-qemu-blockdev.patch

OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=105
This commit is contained in:
Ignaz Forster 2023-03-10 15:04:09 +00:00 committed by Git OBS Bridge
parent d6c7cb8707
commit bf78bb8c5f

View File

@ -17,13 +17,12 @@ diff --git a/internal/providers/qemu/qemu_blockdev.go b/internal/providers/qemu/
index 911eb973..11739f3e 100644 index 911eb973..11739f3e 100644
--- a/internal/providers/qemu/qemu_blockdev.go --- a/internal/providers/qemu/qemu_blockdev.go
+++ b/internal/providers/qemu/qemu_blockdev.go +++ b/internal/providers/qemu/qemu_blockdev.go
@@ -83,7 +83,8 @@ func fetchConfigFromBlockDevice(logger *log.Logger) ([]byte, error) { @@ -83,7 +83,7 @@ func fetchConfigFromBlockDevice(logger *log.Logger) ([]byte, error) {
return nil, err return nil, err
} }
case <-time.After(blockDeviceTimeout): case <-time.After(blockDeviceTimeout):
- return nil, fmt.Errorf("timed out after %v waiting for block device %q to appear", blockDeviceTimeout, ignitionBlockDevicePath) - return nil, fmt.Errorf("timed out after %v waiting for block device %q to appear", blockDeviceTimeout, ignitionBlockDevicePath)
+ logger.Info("timed out after %v waiting for block device %q to appear. Ignoring...", blockDeviceTimeout, ignitionBlockDevicePath) + logger.Info("timed out after %v waiting for block device %q to appear. Ignoring...", blockDeviceTimeout, ignitionBlockDevicePath)
+ return util.ParseConfig(logger, []byte{})
} }
return bytes.TrimRight(data, "\x00"), nil return bytes.TrimRight(data, "\x00"), nil