dtmateojr / dtmrepo

dtmrepo is a mrepo replacement
Other
12 stars 4 forks source link

Add a new repos or attach a new subscription #10

Open SpeedBlack opened 7 years ago

SpeedBlack commented 7 years ago

Hi,

I am having problems with add a new repos or attach a new subscription/pool ID. I am obliged to refresh the subscription data from system with "subscription-manager refresh" or "subscription-manager register --username XXX --password XXX --force". This method generates new certificates. After that, I have to modify "redhat-dtmrepo.repo" file with the new certificates.

If add a new repos, I have to retrieve the syntax from another system to add it in "redhat-dtmrepo.repo" file. For example, I must add these lines :

[rhel-7-xxxx-rpms] metadata_expire = 86400 sslclientcert = /etc/pki/entitlement/XXXX.pem baseurl = https://cdn.redhat.com/xxx proxy = XXXX ui_repoidvars = releasever basearch sslverify = 1 name = Red Hat Enterprise Linux xxx (RHEL 7 Server) (RPMs) sslclientkey = /etc/pki/entitlement/XXXX-key.pem gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled = 0 sslcacert = /etc/rhsm/ca/redhat-uep.pem gpgcheck = 1

Have you any idea to avoid this behavior ? Thanks !

dtmateojr commented 7 years ago

That's easy :) Just run "dtmrepo -x" or if that doesn't work then delete redhat-dtmrepo.repo and run "dtmrepo -x". I would advise that in your cron jobs you always have the -x option so that dtmrepo will automatically fix the repo configs if there are subscription discrepancies.

SpeedBlack commented 7 years ago

Hi dtmateojr,

Ok, thank you very much for your quick reply ! I'll test !