nicolas-r / katello-centos-errata-import

Imports CentOS (from http://cefs.steve-meier.de/) errata into Katello
28 stars 11 forks source link

0 errata in repo even if script finish with no error #10

Closed jehutywong closed 4 years ago

jehutywong commented 5 years ago

The last step in script "centos-errata-katello-importer.py" is to resync repo. But the default parameter in modules/katelloerr/katello.py is: data = { 'skip_metadata_check': 'true', } which will eventually reset all imported errata to 0.

Its because, it uses complete sync to sync repo from official CentOS site (in my case), where provides 0 errata.

I think the parameter should be changed to false by default to avoid confusing.

LarryBetson commented 5 years ago

I may be having a similar issue. I am running a new foreman-katello installation. I have CentOS-6 & CentOS-7 repos. So when the python script runs, it actually finds and uploads the errata successfully, then runs a sync job. But even though it finds errata to upload when I go into Foreman content it shows the errata numbers as 0, even though I can see it uploading many packages. What is the fix for this? Please advise.

LarryBetson commented 5 years ago

So should I change the line ata = { 'skip_metadata_check': 'true', } to ata = { 'skip_metadata_check': 'false', }

tmontgomery42 commented 5 years ago

Tried changing skip_metadata_check to false, no go.

Tried running the skip then doing a Complete Sync, Optimized syn, tried with Mirror on Sync on and off. No go on any of those.

Script shows 145 errata (s) added to CentOS7_Updates but the web interface is showing nothing. Also I notice the last thing it does it run a sync, was this because people were not reading the instructions?

pa-jberanek commented 4 years ago

I had this script running successfully a year ago, but now I end up with what's described above. Errata seem to be mapped to Katello repositories and imported, but then don't appear in the UI...

jonmert commented 4 years ago

You have to disable "Mirror on Sync" in the repository preferences. Otherwise it will be mirrored from official mirror with 0 errata. Tested it minutes ago.

pa-jberanek commented 4 years ago

You have to disable "Mirror on Sync" in the repository preferences. Otherwise it will be mirrored from official mirror with 0 errata. Tested it minutes ago.

OK, that makes sense. I only wonder on the effects of turning off "mirror on sync" if you maintain something like CentOS repositories as the "7" version of the repo, rather than separate repositories for each 7.7, 7.8 release...

nicolas-r commented 4 years ago

Hi all

Currently, I don't have a lot of time to invest in this project, sorry but I'll try to see what I can do.

Yesterday, I have installed a new CentOS VM to host a Katello 3.15 instance to test the script. I have created a product that contain a CentOS 7.6 repo (from the CentOS Vault), set "Mirror on Sync" to off and test my scripts with XML files from 2018. Everything went fine and Katello reports 10019 Packages, 428 Errata, 88 Package Groups.

I'll change the repo url to test with 7.7 and 7 to see if the numbers increase

nicolas-r commented 4 years ago

After these tests, I can confirm that everything seems to work correctly, I have now 15679 Packages 656 Errata 88 Package Groups

I don't have changed anything in the scripts. Th important settings is "Mirror on Sync" that has to be set to off.

I also think it can a good idea to keep somewhere the errata.latest.xml files. If needed, you can use it to load old erratas.

I'm closing this issue, fee free to re-open it if needed

I have added a note on the README.md

blackyboy commented 4 years ago

Hi all

Currently, I don't have a lot of time to invest in this project, sorry but I'll try to see what I can do.

Yesterday, I have installed a new CentOS VM to host a Katello 3.15 instance to test the script. I have created a product that contain a CentOS 7.6 repo (from the CentOS Vault), set "Mirror on Sync" to off and test my scripts with XML files from 2018. Everything went fine and Katello reports 10019 Packages, 428 Errata, 88 Package Groups.

I'll change the repo url to test with 7.7 and 7 to see if the numbers increase

Whether this works with CentOS 7.8 version as well?