← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1763480] Re: DataSourceSmartOS list() should always return a list

 

This bug is believed to be fixed in cloud-init in version 18.3. If this
is still a problem for you, please make a comment and set the state back
to New

Thank you.

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1763480

Title:
  DataSourceSmartOS list() should always return a list

Status in cloud-init:
  Fix Released

Bug description:
  If customer_metadata is empty, a stack trace is seen on the console:

  2018-04-12 16:01:18,302 - DataSourceSmartOS.py[DEBUG]: Writing "V2 13 d8094091 1055c865 KEYS
  " to metadata transport.
  2018-04-12 16:01:18,382 - DataSourceSmartOS.py[DEBUG]: Read "V2 16 b23eb5d0 1055c865 SUCCESS" from metadata transport.
  2018-04-12 16:01:18,382 - DataSourceSmartOS.py[DEBUG]: No value found.
  2018-04-12 16:01:18,382 - handlers.py[DEBUG]: finish: init-local/search-SmartOS: FAIL: no local data found from DataSourceSmartOS
  2018-04-12 16:01:18,382 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceSmartOS.DataSourceSmartOS'> failed
  2018-04-12 16:01:18,382 - util.py[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceSmartOS.DataSourceSmartOS'> failed
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 447, in find_source
      if s.get_data():
    File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 121, in get_data
      return_value = self._get_data()
    File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceSmartOS.py", line 238, in _get_data
      md[ci_noun] = self.md_client.get(smartos_noun, strip=strip)
    File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceSmartOS.py", line 640, in get
      if self.is_b64_encoded(key):
    File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceSmartOS.py", line 628, in is_b64_encoded
      self._init_base64_keys(reset=reset)
    File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceSmartOS.py", line 594, in _init_base64_keys
      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-09d7-c1b3-908c-947839b1d10c",
        "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/$uuid/logs/console.log.  The image uuid above is a custom image
  I created based on the Ubuntu certified 16.04 image.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1763480/+subscriptions


References