Skip to content
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

ci: use build-host for build process #93

Merged
merged 21 commits into from
Jul 12, 2022
Merged

ci: use build-host for build process #93

merged 21 commits into from
Jul 12, 2022

Conversation

ldevulder
Copy link
Contributor

@ldevulder ldevulder commented Apr 13, 2022

This should speedup the build processes.

E2E verification runs:

@ldevulder ldevulder requested a review from mudler April 13, 2022 09:51
Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ldevulder
Copy link
Contributor Author

The build issue is due to the fact that all runs directly on the runner and not on an container image (Ubuntu in that case), on it to fix this.

@ldevulder ldevulder marked this pull request as draft May 2, 2022 08:31
@ldevulder ldevulder force-pushed the ci-use-build-host branch 5 times, most recently from 0986778 to 8b28eb0 Compare May 2, 2022 08:53
@ldevulder
Copy link
Contributor Author

I still have this error:
Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: End of file while reading data: Input/output error

Even after forcing the build step to use an Ubuntu image...

This PR was to reduce build time by using a self hosted runner but I really don't know how to workaround this error... So better to close it for now I think.

@ldevulder
Copy link
Contributor Author

ldevulder commented Jun 15, 2022

I finally found why tests is failing!

Here a working test:

==> os2: Creating image (snapshot of base box volume).
==> os2: Creating domain with the following settings...
==> os2:  -- Name:              tests_os2
==> os2:  -- Description:       Source: /home/runner/work/elemental/elemental/tests/Vagrantfile
==> os2:  -- Domain type:       qemu
==> os2:  -- Cpus:              4

And here the failing one:

==> os2: Creating image (snapshot of base box volume).
==> os2: Creating domain with the following settings...
==> os2:  -- Name:              tests_os2
==> os2:  -- Description:       Source: /home/runner/work/elemental/elemental/tests/Vagrantfile
==> os2:  -- Domain type:       kvm
==> os2:  -- Cpus:              4

The domain type is kvm when compiled on the self-hosted runner! I think this is because nested virtualization is on. I will try to see if this could be forced during building process.

EDIT: Vagrantfile is generated with libvirt.driver = "qemu" in the working version and of course with libvirt.driver = "kvm" in the failing one. I'm checking if this can be forced, or we can patch it before upload (but that's a dirty hack IMHO).

@ldevulder ldevulder reopened this Jun 15, 2022
@ldevulder
Copy link
Contributor Author

ldevulder commented Jun 15, 2022

Ok so I think I understood the process and why KVM accel is set: it's detected when ros-image-build is executed (see here).

Which leads me to ask: why is this so complicated??
I checked a bit and found that the GH workflow execute make ci which execute dapper ci which uses Dockerfile.dapper to generate and run a docker image that execute scripts/ci which itself execute scripts/package which itself execute make build and make iso (and also others make ... commands). This build command generates a docker image that is used in make iso and this command execute ros-image-build that generate docker image and the other artifacts (iso, qcow2, box, etc. with different make ... commands when needed) by also using some specific tools like packer (which is useful for some cases I agree).

But this is really difficult to understand TBH...

Copy link
Contributor

@mjura mjura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mjura
Copy link
Contributor

mjura commented Jun 16, 2022

Rebase is needed

@ldevulder ldevulder force-pushed the ci-use-build-host branch 10 times, most recently from 1d174b1 to 18bfcaf Compare June 16, 2022 15:29
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
As E2E test sporadically fails because of timeout.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
As the worker has enough available CPU and RAM.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Patch from Itxaka Serrano <igarcia@suse.com>

Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Copy link
Contributor

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ldevulder ldevulder force-pushed the ci-use-build-host branch 3 times, most recently from d282c73 to 31079ee Compare July 7, 2022 11:46
@kkaempf
Copy link
Contributor

kkaempf commented Jul 11, 2022

@mjura @ldevulder - what is this waiting for ?

@ldevulder
Copy link
Contributor Author

ldevulder commented Jul 11, 2022

@mjura @ldevulder - what is this waiting for ?

A verification run that works... I have issue and I'm currently doing manual tests to understand why (could be due to some renaming change). If I can fix in this PR I will do, otherwise I will merge this one and create new to fix.

EDIT: latest verification run is green!

Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
Signed-off-by: Loic Devulder <ldevulder@suse.com>
@ldevulder ldevulder merged commit 132897c into master Jul 12, 2022
@ldevulder ldevulder deleted the ci-use-build-host branch July 12, 2022 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants