From c416b9ac65ea0f1160836bceb694d5ab8530c5d2 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Tue, 14 Mar 2017 14:37:49 -0700 Subject: [PATCH] Fix errors in network sysconfig handling https://bugzilla.redhat.com/show_bug.cgi?id=1389530 https://bugs.launchpad.net/cloud-init/+bug/1665441 https://git.launchpad.net/cloud-init/commit/?id=f81d6c7bde2af206d449de593b35773068270c84 --- cloud-init-0.7.9-sysconfig-iface.patch | 17 +++++++++++++++++ cloud-init.spec | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 cloud-init-0.7.9-sysconfig-iface.patch diff --git a/cloud-init-0.7.9-sysconfig-iface.patch b/cloud-init-0.7.9-sysconfig-iface.patch new file mode 100644 index 0000000..b916408 --- /dev/null +++ b/cloud-init-0.7.9-sysconfig-iface.patch @@ -0,0 +1,17 @@ +Index: cloud-init-0.7.9/cloudinit/net/sysconfig.py +=================================================================== +--- cloud-init-0.7.9.orig/cloudinit/net/sysconfig.py ++++ cloud-init-0.7.9/cloudinit/net/sysconfig.py +@@ -282,10 +282,10 @@ class Renderer(renderer.Renderer): + cls._render_subnet(iface_cfg, route_cfg, iface_subnets[0]) + elif len(iface_subnets) > 1: + for i, iface_subnet in enumerate(iface_subnets, +- start=len(iface.children)): ++ start=len(iface_cfg.children)): + iface_sub_cfg = iface_cfg.copy() + iface_sub_cfg.name = "%s:%s" % (iface_name, i) +- iface.children.append(iface_sub_cfg) ++ iface_cfg.children.append(iface_sub_cfg) + cls._render_subnet(iface_sub_cfg, route_cfg, iface_subnet) + + @classmethod diff --git a/cloud-init.spec b/cloud-init.spec index 59a4c17..3250d39 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -49,6 +49,12 @@ Patch13: cloud-init-0.7.9-systemd-cloud-init.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1428492 Patch14: cloud-init-0.7.9-systemd-cloud-final.patch +# Fix errors in network sysconfig handling +# https://bugzilla.redhat.com/show_bug.cgi?id=1389530 +# https://bugs.launchpad.net/cloud-init/+bug/1665441 +# https://git.launchpad.net/cloud-init/commit/?id=f81d6c7bde2af206d449de593b35773068270c84 +Patch15: cloud-init-0.7.9-sysconfig-iface.patch + BuildArch: noarch BuildRequires: pkgconfig(systemd) @@ -188,6 +194,7 @@ nosetests-%{python3_version} tests/unittests/ \ * Tue Mar 14 2017 Garrett Holmstrom - 0.7.9-4 - Fixed systemd dependency cycle with cloud-final and os-collect-config [RH:1420946, RH:1428492] - Fixed systemd dependency cycle with cloud-init and multi-user.target [RH:1428492, RH:1430511] +- Fixed errors in network sysconfig handling [RH:1389530, LP:1665441] * Fri Feb 10 2017 Fedora Release Engineering - 0.7.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild