DataSourceSmartOS list() should always return a list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Mike Gerdts |
Bug Description
If customer_metadata is empty, a stack trace is seen on the console:
2018-04-12 16:01:18,302 - DataSourceSmart
" to metadata transport.
2018-04-12 16:01:18,382 - DataSourceSmart
2018-04-12 16:01:18,382 - DataSourceSmart
2018-04-12 16:01:18,382 - handlers.py[DEBUG]: finish: init-local/
2018-04-12 16:01:18,382 - util.py[WARNING]: Getting data from <class 'cloudinit.
2018-04-12 16:01:18,382 - util.py[DEBUG]: Getting data from <class 'cloudinit.
Traceback (most recent call last):
File "/usr/lib/
if s.get_data():
File "/usr/lib/
return_value = self._get_data()
File "/usr/lib/
md[ci_noun] = self.md_
File "/usr/lib/
if self.is_
File "/usr/lib/
self.
File "/usr/lib/
if 'base64_all' in keys:
TypeError: argument of type 'NoneType' is not iterable
2018-04-12 16:01:18,391 - main.py[DEBUG]: No local datasource found
To reproduce:
# vmadm create <<EOF
{
"alias": "ci",
"brand": "bhyve",
"ram": "1024",
"vcpus": "2",
"disks": [
{
"image_uuid": "4260219e-
"boot": true,
"model": "virtio"
}
]
}
EOF
As the zone boots, the errors shown above will appear on the console. If using a SmartOS platform image that has a date stamp of 20180412 or later, this information will be visible in /zones/
Related branches
- Douglas Jordan: Pending requested
- Chad Smith: Pending requested
-
Diff: 170 lines (+86/-8)2 files modifiedcloudinit/sources/DataSourceAzure.py (+14/-6)
tests/unittests/test_datasource/test_azure.py (+72/-2)
- Scott Moser: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 75 lines (+27/-5)2 files modifiedcloudinit/sources/DataSourceSmartOS.py (+3/-3)
tests/unittests/test_datasource/test_smartos.py (+24/-2)
Changed in cloud-init: | |
assignee: | nobody → Mike Gerdts (mgerdts) |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
A clarification: the error messages were in cloud-init.log. I found it in the console log only after I had been viewing that log on the console. But that's not really the important part of this.