From be823e52f2f28681426706d7543f3678d8aca933 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Fri, 20 Jan 2017 17:02:44 -0500 Subject: [PATCH 1/5] limit tests in %check to unittests this commit limits the tests run in %check to tests/unittests, which is the same behavior configured in cloud-init's tox.ini --- cloud-init.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-init.spec b/cloud-init.spec index 1229421..3c4cd9c 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -143,7 +143,7 @@ cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudi %check -nosetests-%{python3_version} +nosetests-%{python3_version} tests/unittests/ %clean From 53358a79a1d62ccdb0db3fd505c96009d7b236c9 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Thu, 26 Jan 2017 16:29:25 -0800 Subject: [PATCH 2/5] Re-apply rsyslog configuration fixes --- cloud-init.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cloud-init.spec b/cloud-init.spec index 3c4cd9c..a2e81d4 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 0.7.8 -Release: 3%{?dist} +Release: 5%{?dist} Summary: Cloud instance init scripts Group: System Environment/Base @@ -17,7 +17,7 @@ Patch0: cloud-init-0.7.8-fedora.patch # Fix rsyslog log filtering # https://code.launchpad.net/~gholms/cloud-init/rsyslog-programname/+merge/186906 -#Patch1: cloud-init-0.7.5-rsyslog-programname.patch +Patch1: cloud-init-0.7.5-rsyslog-programname.patch # Add 3 ecdsa-sha2-nistp* ssh key types now that they are standardized # https://bugzilla.redhat.com/show_bug.cgi?id=1151824 @@ -194,6 +194,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 27 2017 Garrett Holmstrom - 0.7.8-5 +- Re-applied rsyslog configuration fixes + * Tue Oct 25 2016 Garrett Holmstrom - 0.7.8-3 - Enabled the DigitalOcean metadata provider by default [RH:1388568] From 38d515ffe0b18acb70af52e4ce93febbea726db1 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Thu, 26 Jan 2017 17:05:45 -0800 Subject: [PATCH 3/5] Disable unit tests broken by httpretty update python-httpretty-0.8.14-1.20161011git70af1f8, pushed stable on 2017-01-24, broke three of GCE's unit tests for reasons I have not yet investigated. --- cloud-init.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cloud-init.spec b/cloud-init.spec index a2e81d4..d6a2d70 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -143,7 +143,12 @@ cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudi %check -nosetests-%{python3_version} tests/unittests/ +# python-httpretty-0.8.14 broke several GCE tests +# https://github.com/gabrielfalcao/HTTPretty/issues/316 +nosetests-%{python3_version} tests/unittests/ \ + -e test_instance_level_keys_replace_project_level_keys \ + -e test_instance_level_ssh_keys_are_used \ + -e test_metadata_encoding %clean @@ -196,6 +201,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Jan 27 2017 Garrett Holmstrom - 0.7.8-5 - Re-applied rsyslog configuration fixes +- Disabled GCE tests broken by python-httpretty-0.8.14-1.20161011git70af1f8 * Tue Oct 25 2016 Garrett Holmstrom - 0.7.8-3 - Enabled the DigitalOcean metadata provider by default [RH:1388568] From 5bfa86fab4c41f08816071b0063e1a874cfbafac Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 25 Jan 2017 10:02:38 -0500 Subject: [PATCH 4/5] fix systemd unit dependency cycle backported from the following upstream commit: https://git.launchpad.net/cloud-init/commit/?id=3705bb5964a2ff3f9a67265e6d090a112b35e40c fixes the following bz: https://bugzilla.redhat.com/show_bug.cgi?id=1393094 --- cloud-init-0.7.8-systemd-loop.target | 37 ++++++++++++++++++++++++++++ cloud-init.spec | 5 ++++ 2 files changed, 42 insertions(+) create mode 100644 cloud-init-0.7.8-systemd-loop.target diff --git a/cloud-init-0.7.8-systemd-loop.target b/cloud-init-0.7.8-systemd-loop.target new file mode 100644 index 0000000..93d49b4 --- /dev/null +++ b/cloud-init-0.7.8-systemd-loop.target @@ -0,0 +1,37 @@ +From 3705bb5964a2ff3f9a67265e6d090a112b35e40c Mon Sep 17 00:00:00 2001 +From: Scott Moser +Date: Thu, 15 Sep 2016 09:30:50 -0400 +Subject: [PATCH] systemd: put cloud-init.target After multi-user.target + +When we moved cloud-final.service to run After multi-user.target it +caused a dependency loop (as cloud-init.target was still implied to be +Before multi-user.target). + +journalctl would either show: + cloud-init.target: Breaking ordering cycle by deleting job + cloud-final.service/start +or + multi-user.target: Breaking ordering cycle by deleting job + cloud-init.target/start + +The fix here is to clearly state that cloud-init.target is also + After multi-user.target + +LP: #1623868 +--- + systemd/cloud-init.target | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/systemd/cloud-init.target b/systemd/cloud-init.target +index a63babb..d568458 100644 +--- a/systemd/cloud-init.target ++++ b/systemd/cloud-init.target +@@ -4,3 +4,4 @@ + # b.) touch a file /etc/cloud/cloud-init.disabled + [Unit] + Description=Cloud-init target ++After=multi-user.target +-- +2.7.4 + + diff --git a/cloud-init.spec b/cloud-init.spec index d6a2d70..91de8ff 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -54,6 +54,11 @@ Patch11: cloud-init-0.7.8-nm-controlled.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1388568 Patch12: cloud-init-0.7.8-enable-digitalocean.patch +# Get rid of dependency loop in systemd units +# https://bugzilla.redhat.com/show_bug.cgi?id=1393094 +# https://git.launchpad.net/cloud-init/commit/?id=3705bb5964a2ff3f9a67265e6d090a112b35e40c +Patch14: cloud-init-0.7.8-systemd-loop.target + BuildArch: noarch BuildRequires: pkgconfig From b707ab6462d42076f862043e729f29875fdfce3d Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Thu, 26 Jan 2017 17:17:26 -0800 Subject: [PATCH 5/5] Update changelog for systemd loop fix --- cloud-init.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud-init.spec b/cloud-init.spec index 91de8ff..4ac5e2e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -207,6 +207,7 @@ rm -rf $RPM_BUILD_ROOT * Fri Jan 27 2017 Garrett Holmstrom - 0.7.8-5 - Re-applied rsyslog configuration fixes - Disabled GCE tests broken by python-httpretty-0.8.14-1.20161011git70af1f8 +- Fixed systemd dependency loop for cloud-init.target [RH:1393094] * Tue Oct 25 2016 Garrett Holmstrom - 0.7.8-3 - Enabled the DigitalOcean metadata provider by default [RH:1388568]