← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~bbaude/cloud-init/rh_sub_rm_first into lp:cloud-init


Brent Baude has proposed merging lp:~bbaude/cloud-init/rh_sub_rm_first into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:

cc_rh_subscription - Remove repos before adding repos

Several users have pointed out that when using the rh_subscription portion of cloud-init, that the code always added Yum repositories before removing any.  The preferred use case is that rh_subscription would remove repositories and then add them.  This helps users who like to remove all yum repositories and then only add in select ones.  This is fairly common.
Your team cloud init development team is requested to review the proposed merge of lp:~bbaude/cloud-init/rh_sub_rm_first into lp:cloud-init.
=== modified file 'cloudinit/config/cc_rh_subscription.py'
--- cloudinit/config/cc_rh_subscription.py	2016-04-06 17:57:00 +0000
+++ cloudinit/config/cc_rh_subscription.py	2016-06-29 18:03:55 +0000
@@ -63,7 +63,7 @@
                     raise SubscriptionError("Unable to attach pools {0}"
             if (sm.enable_repo is not None) or (sm.disable_repo is not None):
-                return_stat = sm.update_repos(sm.enable_repo, sm.disable_repo)
+                return_stat = sm.update_repos(sm.disable_repo, sm.enable_repo)
                 if not return_stat:
                     raise SubscriptionError("Unable to add or remove repos")
             sm.log_success("rh_subscription plugin completed successfully")

Follow ups