Allow empty stages

Bug #1770462 reported by Robert Schweikert
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
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)
Changed in cloud-init:
status: New → In Progress
importance: Undecided → Low
Revision history for this message
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
Revision history for this message
Scott Moser (smoser) wrote : Fixed in cloud-init version 18.3.

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
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.