Backport commit to start coreos-installer service after systemd-resolved

https://github.com/coreos/coreos-installer/pull/389
This commit is contained in:
Dusty Mabe 2020-10-06 21:00:33 -04:00
parent 42d5a9f8f3
commit 7519437f52
No known key found for this signature in database
GPG Key ID: 3302DBD73952E671
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From 139c2db6083d7b5324ec7c06172a3941b8c2d59b Mon Sep 17 00:00:00 2001
From: Dusty Mabe <dusty@dustymabe.com>
Date: Tue, 6 Oct 2020 17:28:05 -0400
Subject: [PATCH] systemd: start coreos-installer service after
systemd-resolved
If the system is configured to use systemd-resolved (i.e.
systemd-resolved is enabled) then start coreos-installer after
systemd-resolved. Otherwise we get race conditions where
coreos-installer starts before resolved is up and we get errors like:
```
Starting Network Name Resolution...
[ OK ] Finished Network Manager Wait Online.
[ OK ] Reached target Network is Online.
Starting CoreOS Installer...
[ 12.949935] coreos-installer-service[889]: coreos-installer install /dev/sda --ignition-url https://dustymabe.fedorapeople.org/user-systemd.ign --insecure-ignition
[ 13.007728] coreos-installer-service[907]: Error: parsing arguments
[ 13.008549] coreos-installer-service[907]: Caused by: downloading source Ignition config https://dustymabe.fedorapeople.org/user-systemd.ign
[ 13.009746] coreos-installer-service[907]: Caused by: sending request for 'https://dustymabe.fedorapeople.org/user-systemd.ign' [ 13.011136] coreos-installer-service[907]: Caused by: error sending request for url (https://dustymabe.fedorapeople.org/user-systemd.ign): error trying to connect: dns error: failed to lookup address information: Temporary failure in
name resolution [ 13.013407] coreos-installer-service[907]: Caused by: error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
[ 13.015006] coreos-installer-service[907]: Caused by: dns error: failed to lookup address information: Temporary failure in name resolution
[ 13.016399] coreos-installer-service[907]: Caused by: failed to lookup address information: Temporary failure in name resolution
[FAILED] Failed to start CoreOS Installer.
```
---
systemd/coreos-installer.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/systemd/coreos-installer.service b/systemd/coreos-installer.service
index 0a38fd5..bf99df0 100644
--- a/systemd/coreos-installer.service
+++ b/systemd/coreos-installer.service
@@ -3,6 +3,7 @@ Description=CoreOS Installer
Before=coreos-installer.target
After=network-online.target
Wants=network-online.target
+After=systemd-resolved.service
ConditionKernelCommandLine=coreos.inst.install_dev
OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly
--
2.28.0

View File

@ -8,7 +8,7 @@
Name: rust-%{crate}
Version: 0.7.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Installer for Fedora CoreOS and RHEL CoreOS
# Upstream license specification: Apache-2.0
@ -19,6 +19,7 @@ Source: %{crates_source}
Patch0: 0001-signing-keys-add-Fedora-33-key.patch
Patch1: 0002-signing-keys-add-Fedora-34-key.patch
Patch2: 0003-signing-keys-drop-Fedora-31-key.patch
Patch3: 0004-systemd-start-coreos-installer-service-after-systemd.patch
ExclusiveArch: %{rust_arches}
@ -117,6 +118,10 @@ RHEL CoreOS. It is not needed on other platforms.
%endif
%changelog
* Tue Oct 06 2020 Dusty Mabe <dusty@dustymabe.com> - 0.7.0-4
- Backport commit to start coreos-installer service after systemd-resolved
- https://github.com/coreos/coreos-installer/pull/389
* Thu Oct 01 2020 Dusty Mabe <dusty@dustymabe.com> - 0.7.0-3
- Backport commit to add F33 and F34 keys. Drop F31 keys.
- https://github.com/coreos/coreos-installer/pull/387