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
diff --git a/debian/changelog b/debian/changelog
index 993bdff..c07ed7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1cloud-init (17.1-60-ga30a3bb5-0ubuntu1) bionic; urgency=medium
2
3 * New upstream snapshot.
4 - ds-identify: failure in NoCloud due to unset variable usage.
5 (LP: #1737704)
6 - tests: fix collect_console when not implemented [Joshua Powers]
7
8 -- Chad Smith <chad.smith@canonical.com> Tue, 12 Dec 2017 12:03:08 -0700
9
1cloud-init (17.1-58-g703241a3-0ubuntu1) bionic; urgency=medium10cloud-init (17.1-58-g703241a3-0ubuntu1) bionic; urgency=medium
211
3 * New upstream snapshot.12 * New upstream snapshot.
diff --git a/tests/cloud_tests/collect.py b/tests/cloud_tests/collect.py
index 4805cea..bb72245 100644
--- a/tests/cloud_tests/collect.py
+++ b/tests/cloud_tests/collect.py
@@ -31,8 +31,8 @@ def collect_console(instance, base_dir):
31 LOG.debug('getting console log')31 LOG.debug('getting console log')
32 try:32 try:
33 data = instance.console_log()33 data = instance.console_log()
34 except NotImplementedError as e:34 except NotImplementedError:
35 data = 'Not Implemented: %s' % e35 data = b'instance.console_log: not implemented'
36 with open(os.path.join(base_dir, 'console.log'), "wb") as fp:36 with open(os.path.join(base_dir, 'console.log'), "wb") as fp:
37 fp.write(data)37 fp.write(data)
3838
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index 3f1a671..c9234ed 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -27,6 +27,14 @@ TYPE=ext4
27PARTUUID=30c65c77-e07d-4039-b2fb-88b1fb5fa1fc27PARTUUID=30c65c77-e07d-4039-b2fb-88b1fb5fa1fc
28"""28"""
2929
30# this is a Ubuntu 18.04 disk.img output (dual uefi and bios bootable)
31BLKID_UEFI_UBUNTU = [
32 {'DEVNAME': 'vda1', 'TYPE': 'ext4', 'PARTUUID': uuid4(), 'UUID': uuid4()},
33 {'DEVNAME': 'vda14', 'PARTUUID': uuid4()},
34 {'DEVNAME': 'vda15', 'TYPE': 'vfat', 'LABEL': 'UEFI', 'PARTUUID': uuid4(),
35 'UUID': '5F55-129B'}]
36
37
30POLICY_FOUND_ONLY = "search,found=all,maybe=none,notfound=disabled"38POLICY_FOUND_ONLY = "search,found=all,maybe=none,notfound=disabled"
31POLICY_FOUND_OR_MAYBE = "search,found=all,maybe=all,notfound=disabled"39POLICY_FOUND_OR_MAYBE = "search,found=all,maybe=all,notfound=disabled"
32DI_DEFAULT_POLICY = "search,found=all,maybe=all,notfound=enabled"40DI_DEFAULT_POLICY = "search,found=all,maybe=all,notfound=enabled"
@@ -340,6 +348,10 @@ class TestDsIdentify(CiTestCase):
340 self._check_via_dict(348 self._check_via_dict(
341 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])349 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])
342350
351 def test_default_nocloud_as_vdb_iso9660(self):
352 """NoCloud is found with iso9660 filesystem on non-cdrom disk."""
353 self._test_ds_found('NoCloud')
354
343355
344def blkid_out(disks=None):356def blkid_out(disks=None):
345 """Convert a list of disk dictionaries into blkid content."""357 """Convert a list of disk dictionaries into blkid content."""
@@ -422,6 +434,19 @@ VALID_CFG = {
422 'files': {P_PRODUCT_SERIAL: 'GoogleCloud-8f2e88f\n'},434 'files': {P_PRODUCT_SERIAL: 'GoogleCloud-8f2e88f\n'},
423 'mocks': [MOCK_VIRT_IS_KVM],435 'mocks': [MOCK_VIRT_IS_KVM],
424 },436 },
437 'NoCloud': {
438 'ds': 'NoCloud',
439 'mocks': [
440 MOCK_VIRT_IS_KVM,
441 {'name': 'blkid', 'ret': 0,
442 'out': blkid_out(
443 BLKID_UEFI_UBUNTU +
444 [{'DEVNAME': 'vdb', 'TYPE': 'iso9660', 'LABEL': 'cidata'}])},
445 ],
446 'files': {
447 'dev/vdb': 'pretend iso content for cidata\n',
448 }
449 },
425 'OpenStack': {450 'OpenStack': {
426 'ds': 'OpenStack',451 'ds': 'OpenStack',
427 'files': {P_PRODUCT_NAME: 'OpenStack Nova\n'},452 'files': {P_PRODUCT_NAME: 'OpenStack Nova\n'},
diff --git a/tools/ds-identify b/tools/ds-identify
index 4c59d7b..5893a76 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -657,7 +657,7 @@ is_cdrom_ovf() {
657 # skip devices that don't look like cdrom paths.657 # skip devices that don't look like cdrom paths.
658 case "$dev" in658 case "$dev" in
659 /dev/sr[0-9]|/dev/hd[a-z]) :;;659 /dev/sr[0-9]|/dev/hd[a-z]) :;;
660 *) debug 1 "skipping iso dev $d"660 *) debug 1 "skipping iso dev $dev"
661 return 1;;661 return 1;;
662 esac662 esac
663663
@@ -666,7 +666,7 @@ is_cdrom_ovf() {
666666
667 # explicitly skip known labels of other types. rd_rdfe is azure.667 # explicitly skip known labels of other types. rd_rdfe is azure.
668 case "$label" in668 case "$label" in
669 config-2|rd_rdfe_stable*) return 1;;669 config-2|rd_rdfe_stable*|cidata) return 1;;
670 esac670 esac
671671
672 local idstr="http://schemas.dmtf.org/ovf/environment/1"672 local idstr="http://schemas.dmtf.org/ovf/environment/1"

Subscribers

People subscribed via source and target branches