From 2c6cb5534df530a8ed4ede42df499488aad2b1cfc9755920f158b2be7713a93e Mon Sep 17 00:00:00 2001 From: Bernhard Wiedemann Date: Thu, 28 Jun 2018 13:45:43 +0000 Subject: [PATCH] Run metadata detection after network-online (boo#1097388) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=116 --- cloud-init-network-online.patch | 25 +++++++++++++++++++++++++ cloud-init.changes | 1 + cloud-init.spec | 2 ++ 3 files changed, 28 insertions(+) create mode 100644 cloud-init-network-online.patch diff --git a/cloud-init-network-online.patch b/cloud-init-network-online.patch new file mode 100644 index 0000000..e7cdba6 --- /dev/null +++ b/cloud-init-network-online.patch @@ -0,0 +1,25 @@ +commit d3ebe74b29001a7e217431cc2f09412693e33341 +Author: Bernhard M. Wiedemann +Date: Thu Jun 28 15:38:41 2018 +0200 + + Run metadata detection after network-online (boo#1097388) + + otherwise it will only have DataSourceNone in an OpenStack cloud + cloud-init-network-online.patch + + https://bugzilla.opensuse.org/show_bug.cgi?id=1097388 + https://bugs.launchpad.net/cloud-init/+bug/1779139 + +diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl +index b92e8abc..5bfa57f6 100644 +--- a/systemd/cloud-init.service.tmpl ++++ b/systemd/cloud-init.service.tmpl +@@ -20,7 +20,7 @@ After=wicked.service + # would not be guaranteed at this point. + After=dbus.service + {% endif %} +-Before=network-online.target ++After=network-online.target + Before=sshd-keygen.service + Before=sshd.service + {% if variant in ["ubuntu", "unknown", "debian"] %} diff --git a/cloud-init.changes b/cloud-init.changes index a335194..bdd0481 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -3,6 +3,7 @@ Wed Jun 27 15:42:34 UTC 2018 - bwiedemann@suse.com - Let distribution default to opensuse/sles (boo#1099340) - do not disable root user to make it easier to work with +- Run metadata detection after network-online (boo#1097388) ------------------------------------------------------------------- Tue May 22 18:12:43 UTC 2018 - rjschwei@suse.com diff --git a/cloud-init.spec b/cloud-init.spec index cec5f70..b63bbf9 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -59,6 +59,7 @@ Patch43: cloud-init-no-trace-empt-sect.patch # FIXME cloud-init-setpath-gen.patch (boo#1093501) # Merged upstream remove for 18.3 Patch44: cloud-init-setpath-dsitentify.patch +Patch45: cloud-init-network-online.patch BuildRequires: fdupes BuildRequires: filesystem # pkg-config is needed to find correct systemd unit dir @@ -206,6 +207,7 @@ Documentation and examples for cloud-init tools %patch42 %patch43 %patch44 +%patch45 -p1 %build %if 0%{?suse_version} && 0%{?suse_version} <= 1315