forked from pool/ignition
f1241dbb88
doesn't contain path entry - Add 0003-Move-the-GTP-header-on-resized-disks.patch to make it possible to create partitions on resized disk images - Add dm and crypt modules as dependencies to make it possible to configure a luks device - Fix patch file metadata OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=110
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From: Ignaz Forster <iforster@suse.com>
|
|
Date: Thu, 9 Feb 2023 16:05:27 +0100
|
|
Upstream: Ticket opened [gh#coreos/ignition#1556]
|
|
|
|
Continue with empty config on missing QEMU device
|
|
|
|
The two QEMU provider implementations (fwcfg for platforms with
|
|
native support and blockdev for the others) have slightly different
|
|
behaviour: If fwcfg doesn't contain any configuration, it will just
|
|
skip ("QEMU firmware config was not found. Ignoring..."). The blockdev
|
|
provider would error out if it can't read the configuration.
|
|
|
|
Change the behavior of the blockdev provider to match the fwcfg one
|
|
and continue with an empty configuration if the device is not there.
|
|
|
|
diff --git a/internal/providers/qemu/qemu_blockdev.go b/internal/providers/qemu/qemu_blockdev.go
|
|
index 911eb973..11739f3e 100644
|
|
--- a/internal/providers/qemu/qemu_blockdev.go
|
|
+++ b/internal/providers/qemu/qemu_blockdev.go
|
|
@@ -22,7 +22,6 @@ package qemu
|
|
|
|
import (
|
|
"bytes"
|
|
- "fmt"
|
|
"os"
|
|
"os/exec"
|
|
"time"
|
|
@@ -83,7 +83,7 @@ func fetchConfigFromBlockDevice(logger *log.Logger) ([]byte, error) {
|
|
return nil, err
|
|
}
|
|
case <-time.After(blockDeviceTimeout):
|
|
- 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)
|
|
}
|
|
|
|
return bytes.TrimRight(data, "\x00"), nil
|