yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #85844
[Bug 1915942] Re: cc_rh_subscription should not try to validate repo names
[Expired for cloud-init because there has been no activity for 60 days.]
** Changed in: cloud-init
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1915942
Title:
cc_rh_subscription should not try to validate repo names
Status in cloud-init:
Expired
Bug description:
The cc_rh_subscription update_repos() method queries all the repos
that are available from "subscription-manager repos --list-enabled"
and "--list-disabled", and then it compares the list of repositories
the user wants to to enable or disable against that master list. There
are two problems with this:
1) Those two calls to "subscription-manager repos" are expensive and
they can take a few seconds to return. This input validation within
cloud-init is not necessary, because subscription-manager will already
print error messages if the user specifies invalid repo names.
2) This does not support the wildcards that subscription-manager
supports. Here's one example use-case: sometimes subscription-manager
users must disable all the pre-enabled repos for a pool, and then only
enable the ones that they want, like so:
subscription-manager register --username='kdreyer@xxxxxxxxxx'
subscription-manager attach --pool=<mypoolid>
subscription-manager repos --disable='*' --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms
Implementing this in cloud-init with rh_subscription, it's impossible to pass "disable-repo: [ '*' ]". The cloud-init log says:
cc_rh_subscription.py[DEBUG]: Repo * not disabled because it is not
enabled
To resolve this, we should remove the _getRepos() method, stop
validating repo name lists in update_repos(), and simply pass strings
as-is through to subscription-manager.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1915942/+subscriptions
References