Cloud config modules are not skipped based on distro support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Chad Smith |
Bug Description
cloudinit.stages emits logs messages like the following when the cloudconfig module's distro attribute doesn't match the running disribution
When a cloudinit.
2017-09-07 06:03:25,838 - stages.py[INFO]: Skipping modules ['runcmd'] because they are not verified on distro 'ubuntu'. To run anyway, add them to 'unverified_
But, it doesn't actually skip running the module, we can see in the logging that follows:
Running module runcmd (<module 'cloudinit.
cloudinit.stages should honor a skipped module and avoid running its handler.
Related branches
- Ryan Harper: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 256 lines (+131/-34)4 files modifiedcloudinit/config/cc_runcmd.py (+2/-1)
cloudinit/distros/__init__.py (+4/-0)
cloudinit/stages.py (+20/-13)
tests/unittests/test_runs/test_simple_run.py (+105/-20)
Changed in cloud-init: | |
assignee: | nobody → Chad Smith (chad.smith) |
status: | Confirmed → In Progress |
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.7.10 |
Might also look into unverified_modules behavior, it looks like it is ineffective as well. Just a log message and no further change in behavior made by run_section.