[Spacewalk-list] CentOS repos reappear in /etc/yum.repos.d

Nicole Beck nskyrca at syr.edu
Wed Nov 27 18:51:31 UTC 2019


Thank you for your replies!

This is the repolist after installing the spacewalk client software but before registering the client:

# yum repolist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.siena.edu
 * epel: mirror.siena.edu
 * extras: mirror.siena.edu
 * updates: mirror.siena.edu
repo id                  repo name                                        status
base/7/x86_64            CentOS-7 - Base                                  10,097
epel/x86_64              Extra Packages for Enterprise Linux 7 - x86_64   13,476
extras/7/x86_64          CentOS-7 - Extras                                   305
spacewalk-client/x86_64  Spacewalk Client Tools                               95
updates/7/x86_64         CentOS-7 - Updates                                  738
repolist: 24,711

I registered the client. All of the /etc/yum.repos.d/CentOS* files already have "enabled=0" set (before registering the client). I then ran "yum clean all", and the "yum repolist" still shows the CentOS7 repos as well as my local repos.  Shouldn't I just see my local spacewalk repos when running "yum repolist? 

# spacewalk-channel -l
centos7-updates
centos7-spacewalk29-client
centos7-base
centos7

# yum repolist
Loaded plugins: fastestmirror, langpacks, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
 * base: mirror.siena.edu
 * epel: mirror.siena.edu
 * extras: mirror.siena.edu
 * updates: mirror.siena.edu
repo id                    repo name                                      status
base/7/x86_64              CentOS-7 - Base                                10,097
centos7                    centos7                                             0
centos7-base               centos7-base                                   16,478
centos7-spacewalk29-client centos7-spacewalk29-client                         97
centos7-updates            centos7-updates                                 4,816
epel/x86_64                Extra Packages for Enterprise Linux 7 - x86_64 13,476
extras/7/x86_64            CentOS-7 - Extras                                 305
spacewalk-client/x86_64    Spacewalk Client Tools                             95
updates/7/x86_64           CentOS-7 - Updates                                738
repolist: 46,102

Nicole


-----Original Message-----
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> On Behalf Of Gerald Vogt
Sent: Wednesday, November 27, 2019 1:33 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] CentOS repos reappear in /etc/yum.repos.d

On 27.11.19 19:25, FRANK Michael wrote:
> We disable the original repos by a command. I will send you the 
> details tomorrow when I am back at work.

It's enough to edit the file and set the repos to "enabled=0". 
yum-config-manager or any other script will just do the same...

-Gerald


> 
> *Michael FRANK**
> *Supervisor Global Monitoring Architecture Faurecia Clean Mobility
> 
> T +49 821 4103 420 <tel:+49%20821%204103%20420> ● M +49 171 9967 206 
> <tel:+49%20171%209967%20206> michael.frank at faurecia.com Faurecia 
> Emissions Control Technologies, Germany GmbH - Biberbachstraße
> 9 – 86154 Augsburg – Germany <x-apple-data-detectors://1/1>
> 
> Sitz der Gesellschaft: Augsburg - Registergericht Augsburg HR B 20757
> Geschäftsführer: Yves Andres, Françoise Crenn, Thomas Hanak 
> Vorsitzender des Aufsichtsrats: Christophe Schmitt 
> Faurecia_inspiring_mobility_logo-RVB
> 
> 
>> Am 27.11.2019 um 19:11 schrieb Gerald Vogt <vogt at spamcop.net>:
>>
>> On 27.11.19 18:54, David Dales wrote:
>>> If I'm not mistaken setting the "enabled=0" won't work. If 
>>> Spacewalk/Yum discovers multiple repository sources with the same 
>>> source URL it will fail.
>>
>> You are mistaken. yum doesn't care about the source URL or whether 
>> two or more repos use the same url.
>>
>> And you are not using the same source URLs anyway: the repo files use 
>> the centos mirrors directly and the repos provided by your spacewalk 
>> server use your spacewalk server. Thus they are very different.
>>
>> Only the repositories you configure on your spacewalk server must be 
>> unique. But that has nothing to do what yum does on your servers.
>>
>>> We use puppet to remove the entries under /etc/yum.repos.d/ to avoid 
>>> this problem
>>
>> Don't. Set enabled=0 to disable the repos in the local repo files. 
>> That's how it works.
>>
>> -Gerald
>>
>>> -----Original Message-----
>>> From: spacewalk-list-bounces at redhat.com 
>>> <spacewalk-list-bounces at redhat.com> On Behalf Of Gerald Vogt
>>> Sent: Wednesday, November 27, 2019 10:51 AM
>>> To: spacewalk-list at redhat.com
>>> Subject: Re: [Spacewalk-list] CentOS repos reappear in 
>>> /etc/yum.repos.d EXTERNAL EMAIL: Ensure you trust this sender and 
>>> know the content is safe before clicking on any links or attachments.
>>> The centos-release rpm contains all the repo files. If they are 
>>> missing they are restored during the next install/update. That is 
>>> standard rpm behavior for config files in rpms.
>>> Don't (re)move the CentOS repo files. If you don't want to use those 
>>> repos, modify the files and set all repositories in the files to 
>>> "enabled=0".
>>> Config files are not overwritten if they exist. That's the case for 
>>> any config file from any rpm.
>>> For example, if you have installed the apache webserver with the 
>>> httpd rpm you cannot remove the welcome page by deleting 
>>> /etc/httpd/conf.d/welcome.conf. It would come back during the next 
>>> update.
>>> -Gerald
>>> On 27.11.19 18:43, Nicole Beck wrote:
>>>> Hello,
>>>>
>>>> I have a Spacewalk 2.9 server and a CentOS 7 client using the 
>>>> Spacewalk
>>>> 2.9 client.  After registering the client with rhnreg_ks, I moved 
>>>> all of the files from /etc/yum.repos.d to /etc/yum.repos.d.o. The 
>>>> "yum repolist" command shows that I'm using the repositories from 
>>>> my spacewalk server. I've noticed that when I update the client 
>>>> (specifically the centos-release package), the Centos-* repository 
>>>> files reappear in /etc/yum.repos.d.  Is there any way to prevent 
>>>> this from happening?
>>>>
>>>> Thanks,
>>>>
>>>> Nicole
>>>>
>>>>
>>>> _______________________________________________
>>>> Spacewalk-list mailing list
>>>> Spacewalk-list at redhat.com
>>>> https://urldefense.com/v3/__https://www.redhat.com/mailman/listinfo
>>>> /sp 
>>>> acewalk-list__;!vF5gcTc1DeE!ziEpNqL3OxQw46m6GWCxxERXFNhqOHdMKqHStJr
>>>> P0V
>>>> b5lgUwobIzd5yBLoKe51E$
>>>>
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://urldefense.com/v3/__https://www.redhat.com/mailman/listinfo/
>>> spacewalk-list__;!vF5gcTc1DeE!ziEpNqL3OxQw46m6GWCxxERXFNhqOHdMKqHStJ
>>> rP0Vb5lgUwobIzd5yBLoKe51E$ 
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
> 
> This electronic transmission (and any attachments thereto) is intended 
> solely for the use of the addressee(s). It may contain confidential or 
> legally privileged information. If you are not the intended recipient 
> of this message, you must delete it immediately and notify the sender. 
> Any unauthorized use or disclosure of this message is strictly prohibited.
> Faurecia does not guarantee the integrity of this transmission and 
> shall therefore never be liable if the message is altered or falsified 
> nor for any virus, interception or damage to your system.
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
> 


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list