summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2019-03-08 10:46:13 -0500
committerDaniel Watkins <daniel.watkins@canonical.com>2019-03-08 10:47:25 -0500
commitae685e7cad12300c129b0cbea37e754e6105a919 (patch)
tree7ec5f542cabd79bae8d3d6e51daced4777cf2129
parentc72ad48fb1b3591d84784398920e413f03dc9247 (diff)
downloadcloud-init-git-ae685e7cad12300c129b0cbea37e754e6105a919.tar.gz
d/patches: don't configure networking on every boot for EC2 Classic instancesold-xenial
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/ec2-classic-dont-reapply-networking.patch25
-rw-r--r--debian/patches/series1
3 files changed, 28 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index e5716644..45dc6368 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ cloud-init (18.5-44-g7c07af28-0ubuntu1~16.04.1) xenial; urgency=medium
[Paride Legovini]
* Change Maintainer to Ubuntu Developers
* d/postinst: remove now-incorrect apt pipelining configuration
+ * d/patches/ec2-classic-dont-reapply-networking.patch: don't needlessly
+ reapply networking configuration on every boot for EC2 classic instances
-- Daniel Watkins <oddbloke@ubuntu.com> Thu, 07 Mar 2019 16:34:05 -0500
diff --git a/debian/patches/ec2-classic-dont-reapply-networking.patch b/debian/patches/ec2-classic-dont-reapply-networking.patch
new file mode 100644
index 00000000..f5342f3b
--- /dev/null
+++ b/debian/patches/ec2-classic-dont-reapply-networking.patch
@@ -0,0 +1,25 @@
+Description: don't configure networking on every boot for EC2 Classic instances
+ The (ifupdown) networking configuration generated in xenial doesn't hardcode a
+ MAC address, so xenial EC2 Classic instances don't need to apply networking
+ configuration every boot to fix LP: #1802073
+Author: Daniel Watkins <oddbloke@ubuntu.com>
+Forwarded: not-needed
+Last-Update: 2019-03-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/cloudinit/sources/DataSourceEc2.py
++++ b/cloudinit/sources/DataSourceEc2.py
+@@ -334,13 +334,6 @@
+ if isinstance(net_md, dict):
+ result = convert_ec2_metadata_network_config(
+ net_md, macs_to_nics=macs_to_nics, fallback_nic=iface)
+- # RELEASE_BLOCKER: Xenial debian/postinst needs to add
+- # EventType.BOOT on upgrade path for classic.
+-
+- # Non-VPC (aka Classic) Ec2 instances need to rewrite the
+- # network config file every boot due to MAC address change.
+- if self.is_classic_instance():
+- self.update_events['network'].add(EventType.BOOT)
+ else:
+ LOG.warning("Metadata 'network' key not valid: %s.", net_md)
+ self._network_config = result
diff --git a/debian/patches/series b/debian/patches/series
index 166a2d85..d37ae8a7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ ds-identify-behavior-xenial.patch
stable-release-no-jsonschema-dep.patch
openstack-no-network-config.patch
azure-apply-network-config-false.patch
+ec2-classic-dont-reapply-networking.patch