Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty stages #3174

Closed
ubuntu-server-builder opened this issue May 11, 2023 · 2 comments
Closed

Allow empty stages #3174

ubuntu-server-builder opened this issue May 11, 2023 · 2 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1770462

Launchpad details
affected_projects = []
assignee = rjschwei
assignee_name = Robert Schweikert
date_closed = 2018-06-20T18:05:34.819573+00:00
date_created = 2018-05-10T17:48:08.210168+00:00
date_fix_committed = 2018-06-15T19:46:37.363417+00:00
date_fix_released = 2018-06-20T18:05:34.819573+00:00
id = 1770462
importance = low
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1770462
milestone = None
owner = rjschwei
owner_name = Robert Schweikert
private = False
status = fix_released
submitter = rjschwei
submitter_name = Robert Schweikert
tags = []
duplicates = []

Launchpad user Robert Schweikert(rjschwei) wrote on 2018-05-10T17:48:08.210168+00:00

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/main.py", line 638, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 416, in main_init
return (init.datasource, run_module_section(mods, name, name))
File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 107, in run_module_section
(which_ran, failures) = mods.run_section(full_section_name)
File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 817, in run_section
raw_mods = self._read_modules(section_name)
File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", 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.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 11, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2018-06-15T19:46:35.994764+00:00

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=fef2616b

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2018-06-20T18:05:35.944180+00:00

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant