Merge ~chad.smith/cloud-init:ubuntu/bionic into cloud-init:ubuntu/bionic

Proposed by Chad Smith
Status: Merged
Merged at revision: 65c29d85f74c7afacbd99b765bb8f23769dbcc19
Proposed branch: ~chad.smith/cloud-init:ubuntu/bionic
Merge into: cloud-init:ubuntu/bionic
Diff against target: 72 lines (+47/-1)
3 files modified
debian/changelog (+4/-1)
debian/patches/openstack-no-network-config.patch (+42/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
cloud-init Commiters Pending
Review via email: mp+348355@code.launchpad.net

Commit message

Sync upstream cloud-init 18.3 into bionic for release.
Add debian/patches/openstack-no-network-config.patch to retain openstack network_config behavior ignoring network_data.json

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:21064462ea41b0d3d193108fe4019c708f3bb0a6
https://jenkins.ubuntu.com/server/job/cloud-init-ci/116/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/116/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 49d7a49..7ac0d4f 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -2,8 +2,11 @@ cloud-init (18.2-27-g6ef92c98-0ubuntu1~18.04.2) UNRELEASED; urgency=medium
6
7 * debian/rules: update version.version_string to contain packaged version.
8 (LP: #1770712)
9+ * debian/patches/openstack-no-network-config.patch
10+ add patch to ignore Openstack network_config from network_data.json by
11+ default
12
13- -- Scott Moser <smoser@ubuntu.com> Mon, 04 Jun 2018 10:10:59 -0400
14+ -- Chad Smith <chad.smith@canonical.com> Thu, 21 Jun 2018 14:27:10 -0600
15
16 cloud-init (18.2-27-g6ef92c98-0ubuntu1~18.04.1) bionic; urgency=medium
17
18diff --git a/debian/patches/openstack-no-network-config.patch b/debian/patches/openstack-no-network-config.patch
19new file mode 100644
20index 0000000..6749354
21--- /dev/null
22+++ b/debian/patches/openstack-no-network-config.patch
23@@ -0,0 +1,42 @@
24+Description: Fallback network config instead of network_data.json for OpenStack
25+ To make this acceptable as a SRU we keep the same behavior as is
26+ in the stable release which is to generate network for fallback nic
27+ only.
28+ .
29+ In this series, OpenStack datasource can optionally generate
30+ network_config from network_data.json if the datasource is configured
31+ with a file like /etc/cloud.cfg.d/openstack-net.cfg:
32+ .
33+ datasource:
34+ OpenStack:
35+ apply_network_config: true
36+Forwarded: not-needed
37+Author: Chad Smith <chad.smith@canonical.com>
38+
39+--- a/cloudinit/sources/DataSourceOpenStack.py
40++++ b/cloudinit/sources/DataSourceOpenStack.py
41+@@ -97,10 +97,9 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
42+ if self._network_config != sources.UNSET:
43+ return self._network_config
44+
45+- # RELEASE_BLOCKER: SRU to Xenial and Artful SRU should not provide
46++ # Xenial, Artful and Bionic will not provide
47+ # network_config by default unless configured in /etc/cloud/cloud.cfg*.
48+- # Patch Xenial and Artful before release to default to False.
49+- if util.is_false(self.ds_cfg.get('apply_network_config', True)):
50++ if util.is_false(self.ds_cfg.get('apply_network_config', False)):
51+ self._network_config = None
52+ return self._network_config
53+ if self.network_json == sources.UNSET:
54+
55+--- a/tests/unittests/test_datasource/test_openstack.py
56++++ b/tests/unittests/test_datasource/test_openstack.py
57+@@ -345,6 +345,7 @@ class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
58+ settings.CFG_BUILTIN, None, helpers.Paths({'run_dir': self.tmp}))
59+ sample_json = {'links': [{'ethernet_mac_address': 'mymac'}],
60+ 'networks': [], 'services': []}
61++ ds_os.ds_cfg = {'apply_network_config': True} # Default is False
62+ ds_os.network_json = sample_json
63+ with test_helpers.mock.patch(mock_path) as m_convert_json:
64+ m_convert_json.return_value = example_cfg
65+
66diff --git a/debian/patches/series b/debian/patches/series
67new file mode 100644
68index 0000000..2ce72fb
69--- /dev/null
70+++ b/debian/patches/series
71@@ -0,0 +1 @@
72+openstack-no-network-config.patch

Subscribers

People subscribed via source and target branches