I have spacewalk 2.4 installed, and manage CentOS 7 servers with it. Now I found that in /etc/yum.repos.d/ all configured repositories point to Internet repos. Which is not really how it should be, hosts should use the internal spacewalk repos. I assume this is due to packages like centos-release* being installed (they add repos). I am just taking over this environment, so I am not 100% sure how all this came together.

Nonetheless, I need to fix this. If I just delete the packages to which the repo definitions belong to, I am left without any repositories (I have checked - none point to the internal repo, all belong to some installed package). As the clients are assigned to certain channels, I would like to add the corresponding repositories again.

So far I have tried re-registering the client with

# rhnreg_ks --serverUrl=https://YourSpacewalk.example.org/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=<key-with-rhel-custom-channel> --force

No success. I have also removed all channel subscriptions, and then added them again, no success.

What would be the easiest, or most reliable way to get the correct repo definitions back?

EDIT I have also posted this question to the spacewalk mailinglist.


I was on the wrong patch (thank you spacewalk mailing list) - spacewalk repos do not come in the form of local repo files, like the default repos. The are configured via the rhn plugin for yum. So no local repo definitions.

The repos were already there.

What confused me is that there were actually spacewalk repos and internet pointing repos configured - due to historic reasons.

Root cause of all this was that an httpd upgrade of spacewalk broke the xmlrpc for the rhn plugin. A downgrade fixed the issue. If anyone faces the same: if

yum downgrade httpd httpd-tools mod_ssl

does not fix the issue - you can download older version from http://vault.centos.org/ and downgrade locally:

yum downgrade localinstall *.rpm

assuming you have the rpms you want in the local directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.