Code review comment for ~rjschwei/cloud-init:emptyStageOK

Revision history for this message
Chad Smith (chad.smith) wrote :

This log/condition is already 'handled' in cloudinit/cmd/main.py:110 with a message like the following:

No 'config' modules to run under section 'cloud_config_modules', but we should still avoid the Traceback as you say.

you can see this log on a system configured with an empty cloud_config_modules section by running "cloud-init modules --mode config".

root@myb1:~# cloud-init modules --mode config
Cloud-init v. 18.2 running 'modules:config' at Thu, 10 May 2018 19:46:42 +0000. Up 1174.00 seconds.
No 'config' modules to run under section 'cloud_config_modules'

I propose we drop your additional log message, and just return module_list at that point in your patch.

Here is a patch with a test for that behavior not generating a Traceback.
http://paste.ubuntu.com/p/Dkb22CnkMm/

« Back to merge proposal