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

Proposed by Chad Smith
Status: Merged
Merged at revision: be7a4c209d227385a1fc89214c5a216c857ee9d7
Proposed branch: ~chad.smith/cloud-init:ubuntu/devel
Merge into: cloud-init:ubuntu/devel
Diff against target: 104 lines (+38/-4)
4 files modified
debian/changelog (+9/-0)
tests/cloud_tests/collect.py (+2/-2)
tests/unittests/test_ds_identify.py (+25/-0)
tools/ds-identify (+2/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Joshua Powers (community) Approve
cloud-init Commiters Pending
Review via email: mp+335099@code.launchpad.net

Description of the change

Upstream snapshot of master for Bionic (ubuntu/devel)

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

PASSED: Continuous integration, rev:be7a4c209d227385a1fc89214c5a216c857ee9d7
https://jenkins.ubuntu.com/server/job/cloud-init-ci/622/
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/622/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 993bdff..c07ed7e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+cloud-init (17.1-60-ga30a3bb5-0ubuntu1) bionic; urgency=medium
7+
8+ * New upstream snapshot.
9+ - ds-identify: failure in NoCloud due to unset variable usage.
10+ (LP: #1737704)
11+ - tests: fix collect_console when not implemented [Joshua Powers]
12+
13+ -- Chad Smith <chad.smith@canonical.com> Tue, 12 Dec 2017 12:03:08 -0700
14+
15 cloud-init (17.1-58-g703241a3-0ubuntu1) bionic; urgency=medium
16
17 * New upstream snapshot.
18diff --git a/tests/cloud_tests/collect.py b/tests/cloud_tests/collect.py
19index 4805cea..bb72245 100644
20--- a/tests/cloud_tests/collect.py
21+++ b/tests/cloud_tests/collect.py
22@@ -31,8 +31,8 @@ def collect_console(instance, base_dir):
23 LOG.debug('getting console log')
24 try:
25 data = instance.console_log()
26- except NotImplementedError as e:
27- data = 'Not Implemented: %s' % e
28+ except NotImplementedError:
29+ data = b'instance.console_log: not implemented'
30 with open(os.path.join(base_dir, 'console.log'), "wb") as fp:
31 fp.write(data)
32
33diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
34index 3f1a671..c9234ed 100644
35--- a/tests/unittests/test_ds_identify.py
36+++ b/tests/unittests/test_ds_identify.py
37@@ -27,6 +27,14 @@ TYPE=ext4
38 PARTUUID=30c65c77-e07d-4039-b2fb-88b1fb5fa1fc
39 """
40
41+# this is a Ubuntu 18.04 disk.img output (dual uefi and bios bootable)
42+BLKID_UEFI_UBUNTU = [
43+ {'DEVNAME': 'vda1', 'TYPE': 'ext4', 'PARTUUID': uuid4(), 'UUID': uuid4()},
44+ {'DEVNAME': 'vda14', 'PARTUUID': uuid4()},
45+ {'DEVNAME': 'vda15', 'TYPE': 'vfat', 'LABEL': 'UEFI', 'PARTUUID': uuid4(),
46+ 'UUID': '5F55-129B'}]
47+
48+
49 POLICY_FOUND_ONLY = "search,found=all,maybe=none,notfound=disabled"
50 POLICY_FOUND_OR_MAYBE = "search,found=all,maybe=all,notfound=disabled"
51 DI_DEFAULT_POLICY = "search,found=all,maybe=all,notfound=enabled"
52@@ -340,6 +348,10 @@ class TestDsIdentify(CiTestCase):
53 self._check_via_dict(
54 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])
55
56+ def test_default_nocloud_as_vdb_iso9660(self):
57+ """NoCloud is found with iso9660 filesystem on non-cdrom disk."""
58+ self._test_ds_found('NoCloud')
59+
60
61 def blkid_out(disks=None):
62 """Convert a list of disk dictionaries into blkid content."""
63@@ -422,6 +434,19 @@ VALID_CFG = {
64 'files': {P_PRODUCT_SERIAL: 'GoogleCloud-8f2e88f\n'},
65 'mocks': [MOCK_VIRT_IS_KVM],
66 },
67+ 'NoCloud': {
68+ 'ds': 'NoCloud',
69+ 'mocks': [
70+ MOCK_VIRT_IS_KVM,
71+ {'name': 'blkid', 'ret': 0,
72+ 'out': blkid_out(
73+ BLKID_UEFI_UBUNTU +
74+ [{'DEVNAME': 'vdb', 'TYPE': 'iso9660', 'LABEL': 'cidata'}])},
75+ ],
76+ 'files': {
77+ 'dev/vdb': 'pretend iso content for cidata\n',
78+ }
79+ },
80 'OpenStack': {
81 'ds': 'OpenStack',
82 'files': {P_PRODUCT_NAME: 'OpenStack Nova\n'},
83diff --git a/tools/ds-identify b/tools/ds-identify
84index 4c59d7b..5893a76 100755
85--- a/tools/ds-identify
86+++ b/tools/ds-identify
87@@ -657,7 +657,7 @@ is_cdrom_ovf() {
88 # skip devices that don't look like cdrom paths.
89 case "$dev" in
90 /dev/sr[0-9]|/dev/hd[a-z]) :;;
91- *) debug 1 "skipping iso dev $d"
92+ *) debug 1 "skipping iso dev $dev"
93 return 1;;
94 esac
95
96@@ -666,7 +666,7 @@ is_cdrom_ovf() {
97
98 # explicitly skip known labels of other types. rd_rdfe is azure.
99 case "$label" in
100- config-2|rd_rdfe_stable*) return 1;;
101+ config-2|rd_rdfe_stable*|cidata) return 1;;
102 esac
103
104 local idstr="http://schemas.dmtf.org/ovf/environment/1"

Subscribers

People subscribed via source and target branches