-
Notifications
You must be signed in to change notification settings - Fork 56
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
snafu base image #326
Comments
Awesome, thank you for putting this together. I've been wanting to work on making a base image for a long time, here was the one that I came up with, would love your thoughts on it: https://gist.github.com/learnitall/9a84c4e035765d5d450c6d01644af654. Do you have the logs for the failed smallfile package thought? It would be great to see those, as I'm curious what the error was. May be related to #323. Thanks! |
@learnitall here the pastebin that illustrates problem I was having: http://pastebin.test.redhat.com/986862 |
@learnitall Happy to use your snafu base image as long as I can make it work with the benchmarks that I use, will try it out. I'm guessing you looked at more benchmarks than I did. questions: Why isn't python3-pip RPM installed? Where do you get pip from? why python 3.6 specifically? why this? pip install wheel setuptools. why this at end? rm -fr /opt/snafu thx -ben |
tried running Ryan's base image above and it didn't succeed, why not? http://pastebin.test.redhat.com/987114 MIRROR] perl-podlators-4.11-1.el8.noarch.rpm: Curl error (56): Failure when receiving data from the peer for https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/Packages/p/perl-podlators-4.11-1.el8.noarch.rpm [OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104] Is this package download so fragile that an occasional network error can bring it to its knees? This isn't pip failing, it's cdn-ubi.redhat.com! Seems like there should be some sort of option that says wait a few sec and retry |
Did some testing @bengland2 and I still am not sure as to why there were some network errors occurring, but I revisited the base image I posted earlier today and made some modifications based on your questions and work. It does depend on a PR currently under review (#323), therefore I created a new branch in my fork from that PR where I've posted the base image I came up with and modified the smallfile wrapper image to use said base image (it's located here: https://github.com/learnitall/benchmark-wrapper/tree/feature-add-base-image). When you get a chance, can you try this out for me?
Here are the answers to your questions above, feel free to let me know if you have any follow-up Qs:
I went with this idea to use pyenv to build Python from source, rather than using an RPM, which would give us finer grain control over the version of python that we use in our images. I scratched this idea though and just went with the RPMs, as the build time was crazy long.
No idea honestly, just went for it because it's the minimum version of Python that snafu can use. I upgraded to 3.8 in the base image mentioned above.
When we use Thanks! |
@learnitall I'm trying to build your base image for snafu and it keeps blowing up with curl errors, I googled and curl in the container image is really out of date, it gives me errors like:
and then the container build aborts, but I think this is a lack of robustness in the curl version being used:
but current version on Fedora 34 is:
and this version appears to have some fixes in it that would make it more robust in the face of download problems. any suggestions? So I tried fedora:34 instead of ubi8 as base image to isolate the problem. When I take base image Dockerfile above and just change the image from ubi8 to fedora:34, it no longer had download problems . It does complain about peer resetting the connection during download, but it just keeps going and succeeds first time. With ubi8, it failed every time on a different package. ideas? |
never mind, I moved from -2G wireless network to -5G wireless network in my house and now it builds, will let you know if it works for smallfile. |
@learnitall I based smallfile on your image and it worked. can you include git in the base image? This would save some time for things like smallfile that aren't part of an RPM. Other than that, I'm good with it. Would be good to test fio with it also. So my dockerfile prototype currently looks like:
|
Ah ok awesome. Glad to hear that switching your wireless helped out with the downloads, I was getting worried there. I edited the base image to include git and perform the soft linking of |
will do, been busy, it's on my list. |
@learnitall back to it now, I tried your image out and it's great, let me know when it is part of benchmark-operator so I can start converting storage benchmarks to use it. Or should I add it? it turns out smallfile is even easier since none of the remaining RPMs were even necessary to run it, they were more for debugging and I can leave those out of the image. So all that's left is git clone basically. image build ran in 10 seconds and image push to quay ran ino 5 seconds!!! For fio, I ran into a problem doing this, I had to install some additional RPMs and it was complaining that subscription manager was not registered, but centos8 repo kicked in , it took a little longer but still was under 1 min, and push to quay.io was under 1 min. Again wonderful. So I see no reason why this wouldn't work. So my smallfile_wrapper/Dockerfile looked like:
and my fio Dockerfile looked like:
BTW if you take out --depth 1 from git clone, then you can easily fetch a branch for debugging, so I prefer no --depth 1. |
hopefully the base image is resolved by benchmark-wrapper PR #319 and we can rapidly convert benchmarks to use that, if I understand Ryan correctly. |
I found a way to speed up fs_drift_wrapper/Dockerfile that results in very fast image rebuild -- it appears that podman caches layers of image based on the order of steps in the Dockerfile, and by putting the RPM install and the pip install steps first, we always get this stuff cached and so the only thing it has to actually change is to clone fs-drift and copy benchmark-wrapper tree to the image, this runs in a few seconds. The Dockerfile I'm using is:
|
Working on integration into our build system (have a couple of tweaks to make to get this to work) and then will start migrating Dockerfiles into using the base image. |
@learnitall update? |
Hey Ben, been distracted with some other work that has come up since Joe left. I have experimented with creating a base image using the Still working on this issue, it's just been a low priority for me here with some other tasks taking my attention. |
I was having problems rebuilding smallfile image, because pip kept failing to download a random python package, I got really annoyed and started thinking of ways to prevent this from happening, and came up with the idea of having a snafu base image that contained just the stuff that run_snafu.py needs, which is quite a lot actually. Then you make the individual benchmarks build off this base, so they don't have nearly as heavy a lift. For example:
and then the smallfile image becomes:
and it rebuilds really fast. Would anyone else like to see this implemented? I could post a PR for this with smallfile and then we can incrementally extend it to other benchmarks if there is interest. Possible benchmarks that could use this would include:
The text was updated successfully, but these errors were encountered: