-
Notifications
You must be signed in to change notification settings - Fork 105
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
refactors cosa session initialization #821
refactors cosa session initialization #821
Conversation
Skipping CI for Draft Pull Request. |
d2b3949
to
b2e23f0
Compare
/test all |
/assign @miabbott |
Wait is that happening today? Why? I'd expect us to have a single built ostree image and a single qemu disk image that we test. |
See openshift/release#29187. Builds are too slow in the build phase thus Zack moved them back to the test phase. |
What's happening today is that the ostree image is being built within a container image build stage. We're seeing a lot of test timeouts because we can't use KVM in an image build to accelerate the build process (this is a limitation of OpenShift CI). So while the image builds themselves are not timing out, the time they take to build leaves us with very little headroom by the time the test stages run. However, since this is the only reasonable way to get an RHCOS container image into the ImageStream, we still need to do this in an image build. What this PR sets the stage for is a followup PR to openshift/release. The followup PR will use these scripts to create a COSA session in the image build stage and pass that off to the kola test stages. Each test stage will run |
/test all |
b2e23f0
to
bfe4264
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cheesesashimi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This ensures that regardless of entrypoint, the cosa session is always initialized the same way. This also separates the cosa session initialization steps from the cosa build steps to aid in speeding up CI.
bfe4264
to
02f1768
Compare
@cheesesashimi it should be configureable to expose KVM on CI build farms, but I'm not sure that's already the case on all of them. If the builds are scheduled on clusters where KVM is not exposed, we should be able to configure them to force scheduling on one where KVM is actually exposed. |
@LorbusChris I know that's possible for the test stages and we do make use of that already. However, I don't know if that is possible for the image build stages. If my memory serves correctly, even if the image build pods have KVM exposed, I don't think the image build context can make use of it. |
Looks like this needs the |
I'm thinking we may want to combine this with #827. |
Yeah, though this is something we can fix; part of the idea of us "self hosting" CI is our own needs can drive product changes. Not saying anyone should do that right now, but...if it keeps being painful we should consider it. The other alternative though which is probably simpler is to do the ostree-container (and disk image) builds in a regular pod, then push the container image to some external registry (or even a temporary registry spun up as a pod), and then later tests can pull from that. Alternatively, try to figure out how support grafting in more complex/arbitrary workflows into ci-operator/prow. Perhaps even something like having a prow job invoke tekton. |
@cheesesashimi: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@cheesesashimi: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Replaced by #839 |
@travier: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Right now, the OpenShift CI jobs attached to this repository have the bottleneck of running
$ cosa build
within a container image build context. Because of how the OpenShift CI system is designed, it's not likely that we can use KVM within the container image build process to accelerate things. Despite this limitation, I've noticed that while thecosa-build
image build itself usually does not time out, the 2+ hours it takes to run leaves us with very little headroom to run our test stages afterward. Despite this, we still need to produce the artifact incosa-build
in the way that we do. Here's how I plan to address this:$ cosa init
and$ cosa build
steps in https://github.com/openshift/os/blob/master/ci/prow-build.sh.$ cosa init
stuff (lets call this imagecosa-init
for now). This ensures we're using the same COSA session across all of the build and test stages.cosa-init
image into the current image build flow to do$ cosa build
(this becomes the input to thecosa-build
image build). This will still be the image that gets promoted if all the required tests pass.cosa-init
image into thetest-qemu-*
test stages. Each test stage will run its own$ cosa build
(with KVM acceleration) and execute the kola tests (also with KVM acceleration). These stages will run as soon as thecosa-init
image is built and will run concurrently with thecosa-build
image build.This PR implements point 1) above by consolidating the
$ cosa init
(and the rest of the preparation steps) into theci/prow-prepare.sh
script. This also modifiesci/prow-build-test-qemu.sh
andci/prow-build.sh
to make use of the new consolidated initialization flow. Points 2-4 are validated by openshift/release#29187.Once this PR is merged, we'll need another PR to openshift/release to add the
cosa-init
stage.