Re: [Cloud-init-dev] [Merge] ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master
Review: Approve continuous-integration PASSED: Continuous integration, rev:0ae59abe6bd4d3332334ad053248822554958474 https://jenkins.ubuntu.com/server/job/cloud-init-ci/461/ Executed test runs: SUCCESS: Checkout SUCCESS: Unit & Style Tests SUCCESS: Ubuntu LTS: Build SUCCESS: Ubuntu LTS: Integration IN_PROGRESS: Declarative: Post Actions Click here to trigger a rebuild: https://jenkins.ubuntu.com/server/job/cloud-init-ci/461/rebuild -- https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/359646 Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master
Scott Moser has proposed merging ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master. Commit message: OVF: identify label iso9660 filesystems with label 'OVF ENV'. When deploying an OVA, at least some versions of vmware attach a cdrom with an ISO9660 filesystem label of 'OVF ENV'. This was seen on Vmware vCenter Server, 6.0.0, 2776510. In order to accomplish this we had to change the content of the DI_ISO9660_DEVS variable to be comma delimited rather than space delimited. Requested reviews: cloud-init commiters (cloud-init-dev) For more details, see: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/359646 see commit message -- Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master. diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index 46778e9..80640f1 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -499,7 +499,7 @@ class TestDsIdentify(DsIdentifyBase): # Add recognized labels valid_ovf_labels = ['ovf-transport', 'OVF-TRANSPORT', -"OVFENV", "ovfenv"] +"OVFENV", "ovfenv", "OVF ENV", "ovf env"] for valid_ovf_label in valid_ovf_labels: ovf_cdrom_by_label['mocks'][0]['out'] = blkid_out([ {'DEVNAME': 'sda1', 'TYPE': 'ext4', 'LABEL': 'rootfs'}, diff --git a/tools/ds-identify b/tools/ds-identify index 5afe5aa..1acfeeb 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -237,7 +237,7 @@ read_fs_info() { case "${line}" in DEVNAME=*) [ -n "$dev" -a "$ftype" = "iso9660" ] && -isodevs="${isodevs} ${dev}=$label" +isodevs="${isodevs},${dev}=$label" ftype=""; dev=""; label=""; dev=${line#DEVNAME=};; LABEL=*) label="${line#LABEL=}"; @@ -247,11 +247,11 @@ read_fs_info() { esac done [ -n "$dev" -a "$ftype" = "iso9660" ] && -isodevs="${isodevs} ${dev}=$label" +isodevs="${isodevs},${dev}=$label" DI_FS_LABELS="${labels%${delim}}" DI_FS_UUIDS="${uuids%${delim}}" -DI_ISO9660_DEVS="${isodevs# }" +DI_ISO9660_DEVS="${isodevs#,}" } cached() { @@ -735,9 +735,10 @@ is_cdrom_ovf() { return 1;; esac +debug 1 "got label=$label" # fast path known 'OVF' labels case "$label" in -OVF-TRANSPORT|ovf-transport|OVFENV|ovfenv) return 0;; +OVF-TRANSPORT|ovf-transport|OVFENV|ovfenv|OVF\ ENV|ovf\ env) return 0;; esac # explicitly skip known labels of other types. rd_rdfe is azure. @@ -757,9 +758,13 @@ dscheck_OVF() { # Azure provides ovf. Skip false positive by dis-allowing. is_azure_chassis && return $DS_NOT_FOUND -# DI_ISO9660_DEVS is =label, like /dev/sr0=OVF-TRANSPORT +# DI_ISO9660_DEVS is =label,=label2 +# like /dev/sr0=OVF-TRANSPORT,/dev/other=with spaces if [ "${DI_ISO9660_DEVS#${UNAVAILABLE}:}" = "${DI_ISO9660_DEVS}" ]; then -for tok in ${DI_ISO9660_DEVS}; do +local oifs="$IFS" +# shellcheck disable=2086 +{ IFS=","; set -- ${DI_ISO9660_DEVS}; IFS="$oifs"; } +for tok in "$@"; do is_cdrom_ovf "${tok%%=*}" "${tok#*=}" && return $DS_FOUND done fi ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master
The proposal to merge ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master has been updated. Commit message changed to: OVF: identify label iso9660 filesystems with label 'OVF ENV'. When deploying an OVA, at least some versions of vmware attach a cdrom with an ISO9660 filesystem label of 'OVF ENV'. This was seen on Vmware vCenter Server, 6.0.0, 2776510. In order to accomplish this we had to change the content of the DI_ISO9660_DEVS variable to be comma delimited rather than space delimited. For more details, see: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/359646 -- Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/ovf-id-env-vmware into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~adepue/cloud-init:master into cloud-init:master
The proposal to merge ~adepue/cloud-init:master into cloud-init:master has been updated. Commit message changed to: Azure: fix copy/paste error in error handling when reading azure ovf. Check the appropriate variables based on code review. Correcting what seems to be a copy/paste mistake for the error handling from a few lines above. For more details, see: https://code.launchpad.net/~adepue/cloud-init/+git/cloud-init/+merge/359630 -- Your team cloud-init commiters is requested to review the proposed merge of ~adepue/cloud-init:master into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~adepue/cloud-init:master into cloud-init:master
Adam DePue has proposed merging ~adepue/cloud-init:master into cloud-init:master. Commit message: Check the appropriate variables based on code review. Correcting what seems to be a copy/paste mistake for the error handling from a few lines above. Requested reviews: cloud-init commiters (cloud-init-dev) For more details, see: https://code.launchpad.net/~adepue/cloud-init/+git/cloud-init/+merge/359630 -- Your team cloud-init commiters is requested to review the proposed merge of ~adepue/cloud-init:master into cloud-init:master. diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 2a3e567..be82ec4 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -953,12 +953,12 @@ def read_azure_ovf(contents): lambda n: n.localName == "LinuxProvisioningConfigurationSet") -if len(results) == 0: +if len(lpcs_nodes) == 0: raise NonAzureDataSource("No LinuxProvisioningConfigurationSet") -if len(results) > 1: +if len(lpcs_nodes) > 1: raise BrokenAzureDataSource("found '%d' %ss" % ("LinuxProvisioningConfigurationSet", - len(results))) + len(lpcs_nodes))) lpcs = lpcs_nodes[0] if not lpcs.hasChildNodes(): ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp