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

Proposed by Chad Smith
Status: Merged
Merged at revision: 0bb961d0481e0158c0ef115f718a0f4ebcafdcea
Proposed branch: ~chad.smith/cloud-init:ubuntu/artful
Merge into: cloud-init:ubuntu/artful
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 Needs Fixing
cloud-init Commiters Pending
Review via email: mp+348354@code.launchpad.net

Commit message

Sync upstream release 18.3 into artful.
Apply debian/patches/openstack-no-network-config.patch to retain openstack network config 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:81f2e7358551a2aa4851cf74f44cc0ee9a44faa2
https://jenkins.ubuntu.com/server/job/cloud-init-ci/117/
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/117/rebuild

review: Approve (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:0bb961d0481e0158c0ef115f718a0f4ebcafdcea
https://jenkins.ubuntu.com/server/job/cloud-init-ci/119/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    FAILED: Ubuntu LTS: Build

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

review: Needs Fixing (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 57c4454..e8db6f6 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -2,8 +2,11 @@ cloud-init (18.2-4-g05926e48-0ubuntu1~17.10.3) 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:14:17 -0400
14+ -- Chad Smith <chad.smith@canonical.com> Thu, 21 Jun 2018 14:22:02 -0600
15
16 cloud-init (18.2-4-g05926e48-0ubuntu1~17.10.2) artful-proposed; 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