Red Hat Bugzilla – Bug 482885
Default yum config used during install
Last modified: 2011-08-05 08:05:31 EDT
Description of problem:
Let's assume you don't want to touch the default repos and just use spacewalk. Currently it's a complete pain to achieve that. During the install fedora-release or centos-release will install files in /etc/yum.repos.d/ that will be used by yum later on. This isn't a problem during the first stage of the install as these aren't used.
rhnreg_ks, however, uses yum to download packages associated with an activation key, and so ends up pulling in packages that you didn't want installed. Overriding the yum config is the only solution, but it's currently fairly painful to acheive, as spacewalk claims the first post script.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Kickstart where some packages are associated with the activation key, on a machine that cannot see the outside world (makes it easy to see).
2. Look what happens at the rhnreg_ks step.
Machine attempts to contact hosts listed in the /etc/yum.repos.d/*.repo files.
Machine will just access the spacewalk repos.
I understand this is a general requirement, but there needs to be an easy way to achieve it. If the order of the post scripts could be controlled (such that the user could insert a post script before the spacewalk one) then this problem would be much reduced.
To be honest, I'd imagine that this behaviour would be the default, as why would you want your client machines to go outside of spacewalk?
this one didn't make 0.5, moving to 0.6
This bug still occurs with Spacewalk 0.6.
It prevents users to use the provisioning feature in environments with no direct internet access. The rhn_check command performed in the %post phase uses yum to install some packages..and this always fails in such environments because yum bails out while trying to download repository information from the public mirrors (as those can't be reached)
Easily worked round with a pre-script (this worked with 0.5, I've not tested against 0.6), but I agree the default behaviour is undesirable.
mkdir -p /tmp/ks-tree-shadow/etc/yum.repos.d/custom
cat << EOF > /tmp/ks-tree-shadow/etc/yum.conf
Mass-moving to space13.
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.
Aligning under space16.
Since the workaround is available (see comment 3), I'm going to close this bugzilla now.
Please reopen if there is a patch available which would solve the problem in a more elegant manner.