Merge ~smoser/cloud-init:bug/lp-1731868-unset-var-in-ds-identify into cloud-init:master
| Status: | Merged |
|---|---|
| Approved by: | Chad Smith on 2017-12-12 |
| Approved revision: | 23b34b55cd4107f8cc2a7228eec648811813793e |
| Merged at revision: | a30a3bb5baec4da1d8f91385849e9b5b826678bf |
| Proposed branch: | ~smoser/cloud-init:bug/lp-1731868-unset-var-in-ds-identify |
| Merge into: | cloud-init:master |
| Diff against target: |
72 lines (+27/-2) 2 files modified
tests/unittests/test_ds_identify.py (+25/-0) tools/ds-identify (+2/-2) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ryan Harper | Approve on 2017-12-12 | ||
| Joshua Powers (community) | Approve on 2017-12-12 | ||
| Chad Smith | 2017-12-12 | Approve on 2017-12-12 | |
| Server Team CI bot | continuous-integration | Approve on 2017-12-12 | |
|
Review via email:
|
|||
Commit Message
ds-identify: failure in NoCloud due to unset variable usage.
The previous OVF datasource change added a debug message that
referenced an un-used variable. The failure path would be triggered
if an image was booted with a iso9660 filesystem attached to a device
that was not a cdrom.
A unit test is added for the specific failure found.
Additional safety to avoid 'cidata' labels is also added to the OVF
checker.
LP: #1737704
PASSED: Continuous integration, rev:23b34b55cd4
https:/
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:/
| Chad Smith (chad.smith) wrote : | # |
+1 on this changeset. Was able to see the unit tests reproducing the failure path there. Yeah I guess we should have exercised this path in the first place in our unittests. Thanks for the quick fix.
| Ryan Harper (raharper) wrote : | # |
We could look at using shellcheck; it's not perfect, sort of like pylint, but it does catch things like this; maybe just a manual run of shellcheck on ds-identify before commits?
Change looks good.
| Scott Moser (smoser) wrote : | # |
wrt shellcheck, it did not find this error, and generally complains about too many things.
I've seen it and it *can* be useful, but not immediately.
It lists 113 things, 2 of which were valid (unused variables).
The '--exclude' that you'd have to pass are coarsely grained, and I'm not interested in litering code with '#make-
| Ryan Harper (raharper) wrote : | # |
On Tue, Dec 12, 2017 at 12:12 PM, Scott Moser <email address hidden>
wrote:
> wrt shellcheck, it did not find this error, and generally complains about
> too many things.
> I've seen it and it *can* be useful, but not immediately.
>
> It lists 113 things, 2 of which were valid (unused variables).
>
Besides the local, the rest seemed pretty valid.
>
> The '--exclude' that you'd have to pass are coarsely grained, and I'm not
> interested in litering code with '#make-
>
I don't want to do that either, but it suggests reasonable fixes IMO.
>
> http://
> --
> https:/
> init/+merge/335086
> You are reviewing the proposed merge of ~smoser/
> 1731868-
>


FAILED: Continuous integration, rev:75eaa4d2058 4eb52969acc1b01 1816d7d7d099c4 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 619/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 619/rebuild
https:/