Merge ~mgerdts/cloud-init:lp1765085 into cloud-init:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Scott Moser | ||||
Approved revision: | dd43702069ddf8e34e2e50590f845a39287fa683 | ||||
Merge reported by: | Scott Moser | ||||
Merged at revision: | 23479881f51bae7a3f5743ce677ed82317ea8b9f | ||||
Proposed branch: | ~mgerdts/cloud-init:lp1765085 | ||||
Merge into: | cloud-init:master | ||||
Diff against target: |
68 lines (+36/-2) 2 files modified
cloudinit/sources/DataSourceSmartOS.py (+8/-2) tests/unittests/test_datasource/test_smartos.py (+28/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+343537@code.launchpad.net |
Commit message
DataSourceSmartOS: sdc:hostname is ignored
There are three potential sources of the hostname, one of which is
documented SmartOS's vmadm(1M) via the hostname property. That
property's value is retrieved via the sdc:hostname key. The other
two sources for the hostname are a hostname key in customer_metadata
and the VM's uuid (sdc:uuid). Of these three, the sdc:hostname value
is not used in a meaningful way by DataSourceSmartOS.
This fix changes the fallback mechanism when hostname is not
specified in customer_metadata. The order of precedence for setting
the hostname is now 1) hostname in customer_metadata,
2) sdc:hostname, then 3) sdc:uuid.
LP: #1765085
PASSED: Continuous integration, rev: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1024/
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: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1024/rebuild
https:/