Allow empty stages

Bug #1770462 reported by Robert Schweikert on 2018-05-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Robert Schweikert

Bug Description

While users that modify the config file should remove any stages they do not want executed failing to do so results in a traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/", line 638, in status_wrapper
    ret = functor(name, args)
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/", line 416, in main_init
    return (init.datasource, run_module_section(mods, name, name))
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/", line 107, in run_module_section
    (which_ran, failures) = mods.run_section(full_section_name)
  File "/usr/lib/python2.7/site-packages/cloudinit/", line 817, in run_section
    raw_mods = self._read_modules(section_name)
  File "/usr/lib/python2.7/site-packages/cloudinit/", line 700, in _read_modules
    for item in cfg_mods:
TypeError: 'NoneType' object is not iterable

Rather than complaining cloud-init should handle this gracefully and just skip the stage and do nothing.

Related branches

Changed in cloud-init:
assignee: nobody → Robert Schweikert (rjschwei)
Chad Smith (chad.smith) on 2018-06-15
Changed in cloud-init:
status: New → In Progress
importance: Undecided → Low
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:

Changed in cloud-init:
status: In Progress → Fix Committed

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers