-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues mirroring Oracle Linux #119
Comments
Hi Just tried on my side and it's working fine. Maybe the oracle repository was temporarily inaccessible? Have you tried later? Here are the steps I did from a fresh 3.7.3 install:
|
Thanks for the rapid feedback. I suspect that you are right about the repo must have been temporarily down as it works like a charm now :-) |
Yet it failed after downloading approx 8gb twice this afternoon (both times on firefox...), so looks like Oracle has some issues. |
Okay, does it fail with an error message? I will try on my side and see if it fails before the end too. I'll let you know ;) |
Seems to be a timeout, not an error with Repomanager. Will give it another shot soon.
|
Wow that's a big one (+600MB package) The timeout is internal to the code, I set it at 300000 milliseconds (= 5min). Which means that 5min is not enough to download this package... Probably the bandwidth of the Oracle repo is limited or saturated. I will see about making the timeout parameter customizable in a future release. In the meantime I can tell you how to change it in the code. |
Seems to be throtteling going on. The first 8gb of todays test took 3 minutes, then firefox-102.13.0-2.0.1.el7_9.src.rpm took 4 minutes until a timeout. Happened twice yesterdan and just now. Maybe I should try limiting my downlad bandwidth and see if it makes any difference.
|
Okay, I you wish to increase the internal timeout, here is how to do it: Enter the docker container:
Edit the Mirror.php file:
Go to the line
Save the file and exit the container (Ctrl + D); You can then retry your mirror task. |
Thanks - done that now, and also added a 200mbit cap on my vnic for the sake of it. A bit strange that the timeout was consistent after downloading 8gb, so I try being a bit more "bandwidth friendly" and see if it makes any difference. We do have a 10gbit link (University) so unless being actively throtteled I should not need more than 5 minutes to download 600mb :-) |
Timestamps seem to indicate some active throttling, so increased timeout + cap on nic hopefully will le me complete
|
Indeed I'm trying on my side and I'm facing the same issue on the ~same package (firefox-xx). The package is downloading very slowly (I increased the timeout to 15min on my side). The content of this |
Being based on same REL src's I guess you are right, but for large Oracle databases and other critical applications we run I think I'll stick with the painfully slow oracle repo. Having firefox from version 52 to 115 incl src.rpm's doesn't really help either ;-) |
I may have some kind of fix for you: In the process of mirroring I added a condition to ignore packages that are not matching the desired architecture (in your case This halves the number of packages to synchronize and the size of the final repo. I'm testing the fix and it seems to work for the moment, but firefox-xx packages still take a long time to copy (even it's only In the case you want to test the fix, you will have to add some code below. Enter the docker container:
Edit the Rpm.php file:
Go to the line
Save the file and exit the container (Ctrl + D); This fix should be part of a next release. |
Superb work :-) Spinning up a new container with sufficient space in my homelab to give it a shot in a few minutes. |
On my side it took ~1hour and 15min to sync the oracle repo with the patch and no bandwidth limitation: Total repo size is 29GB.
The fact is there is actually an option to choose to sync source packages or not :-) But oracle seems to have decided to mix the source packages with the |
You're right - missed that one. Anyhow, Oracle is Oracle, so I guess there will always be some tinkering needed to get it all right. I haven't downloaded and recompiled an src.rpm for more than a decade, so I guess I can live without these. 29GB is quite an improvement compared to whatever my download will end up with, so nice job..!! ;-) We mainly use Debian for other Linux tasks (which I had no issues with adding repos for), but we intend to block outbound traffic to internet for backend servers (typically running OL with some Oracle software), so getting a local Oracle Linux repo is quite nice to still being able to keep up :-) Thanks a lot -really appreciate the effort..!! |
I didn't get to test the revised code yesterday, but looking at it now I assume that it will only download the x86_64.rpm packages? I noticed that in my (still ongoing!) download I have close to 3400 noarch.rpm files as well, so if my assumption is right I will have a few missing packages in my repo. I have no clue about PHP and how to rewrite your code, but the "logic" to me would be to have a function that does "download everything except the src.rpm files". |
I'm currently working on a fix to make sure the mirroring process is downloading only what you have specified. In others words if you want to download I think this should meet your need. Hoping to have tested and published the fix for the next week! |
I'm experiencing the same issues again with v4.2.1. I'm trying to mirror https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/ and I have a source repo setup with it.
Do you have any idea what could cause this? The oracle repo doesn't seem to be down. |
Hello Might be due to a php memory limit reach. I will test on my side and let you know. |
Indeed, I set the memory limit to 2G and it seemed to have been able to parse the XML. (it threw a cURL error afterwards, the provided GPG key doesn't seem to work) |
Alright, could you just tell me what parameters you set for the mirroring? Because on my side it worked (failed on GPG missing key but primary.xml has been parsed without problem). In a future release I will see how to catch those memory limit error and display some message. I will also see how to make the limit customizable in the settings tab. |
While trying to reproduce I saw that php got OOM Killed. This was most likely the cause. I'm running repomanager on kubernetes, so I think I'll just need to give some nodes more memory and give the pod a reasonably amount of max memory. So I think this issue can be closed again. Anyways thanks for the software and quick support! |
Hard to tell, it depends on repository and how much data are stored in primary.xml file. Oracle repository seems to store a huge amount of data in primary.xml. For example here are 3 repos sync tasks in following order:
Indeed Oracle repo sync is consuming way too much memory comparing to epel which is quite a big repo too. I'm trying to add some memory freeing code to the script but it seems that it's not freeing memory at all. Have to investigate more. |
After some tests and research, I was able to measure the memory consumed by PHP in real-time during the syncing of the Oracle repo and I confirm that the PHP script does not consume more memory than allocated to it (512MB by default). It consumes up to 340MB on average during the mirroring of the Oracle repo. However, there is indeed a high memory usage (4GB+) that I also observed. This may come from external libraries used by the PHP script (such as curl or libxml2). It looks like the high usage appears during the parsing of the XML file (so I suspect libxml2) but analyzing memory consumption is a complex subject and I do not have enough knowledge to detect if there is a memory leak somewhere. Anyway, I have added error handling during the execution of tasks ( I have also added a parameter to increase the memory allocated to |
I'm trying to mirror https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64, but the packages are never downloaded (only primary.xml, primary.xml.gz and repomd.xml). From the logs I can see
- Retrieving packages list from /home/repo/download-mirror-ol7-1698133890/primary.xml.gz
but it ends there.Debian 11/12 and Epel works fine without any problems. I've tried rewriting the URL like https://yum.oracle.com/repo/OracleLinux/OL$releasever/latest/$basearch but still no more than the three mentioned files. Any ideas here? Version used is 3.7.3
The text was updated successfully, but these errors were encountered: