Cloud config modules are not skipped based on distro support

Bug #1715738 reported by Chad Smith
6
This bug affects 1 person
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.config.cc*py module distros attribute doesn't match the discovered Distribution.name, cloudinit.stages emits a log message about skipping the module in the following form:

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_modules' in config.

But, it doesn't actually skip running the module, we can see in the logging that follows:
Running module runcmd (<module 'cloudinit.config.cc_runcmd' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_runcmd.py'>) with frequency once-per-instance.

cloudinit.stages should honor a skipped module and avoid running its handler.

Related branches

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

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.

Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Chad Smith (chad.smith)
Changed in cloud-init:
assignee: nobody → Chad Smith (chad.smith)
status: Confirmed → In Progress
Chad Smith (chad.smith)
Changed in cloud-init:
status: In Progress → Fix Committed
milestone: none → 0.7.10
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

This bug is believed to be fixed in cloud-init in 17.1. 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.