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

Merge kubevirt/libvirt into kubevirt/kubevirt #4703

Merged
merged 19 commits into from Jan 7, 2021

Conversation

rmohr
Copy link
Member

@rmohr rmohr commented Dec 21, 2020

What this PR does / why we need it:

Centralize our dependency management by using https://github.com/rmohr/bazeldnf to resolve our RPMs on a bazel level.

This allows us to have only bazel and ` C-toolchain as an external dependency. All shared libraries can now consumed fully through bazel.

Benefits are:

  • Full transparent tracking of changed RPM dependencies
  • Managing all dependencies in one repo and no longer requiring kubevirt/libvirt to pull in new qemu/libvirt version:
    • allows easy replacement and testing with e.g. latest libvirt/qemu with out pre-pushing them.
  • almost no need anymore to ever update the build-mage which allows us to pull it out to kubevirtci.
    • no more docker-in-docker runs needed in CI
    • streamlined developer experience, by being able to express all changes in a single PR without flow-interrupts
  • All RPMs can are cached and mirrored
    • allows transparent and easy moving between versions (rollback or modifications can be done and tracked easily)
  • Easy to extend for multi-arch support
  • Fixes as a side-effect the need to build as root in order to work properly with RPMs like we did so far

Run

make rpm-deps

to update RPM dependencies to the latest state.

Modify repo.yaml to use different fedora or copr versions. Initially it looks like this:

repositories:
- arch: x86_64
  metalink: https://mirrors.fedoraproject.org/metalink?repo=fedora-32&arch=x86_64
  name: 32-x86_64-primary-repo
- arch: x86_64
  metalink: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f32&arch=x86_64
  name: 32-x86_64-update-repo
- arch: x86_64
  baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/libvirt-6.6.0-8.el8/fedora-32-x86_64/
  name: kubevirt/libvirt-copr-x86_64
- arch: x86_64
  baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/qemu-kvm-5.1.0-16.el8/fedora-32-x86_64/
  name: kubevirt/qemu-copr-x86_64
- arch: x86_64
  baseurl: https://download.copr.fedorainfracloud.org/results/@kubevirt/seabios-1.14.0-1.el8/fedora-32-x86_64/
  name: kubevirt/seabios-copr-x86_64

Finally a make verify-rpm-deps target was added to ensure that all referenced RPMs are signed by known GPG keys. This will be integrated in CI, to allow engineers to locally update and modify RPM dependencies.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

More background can be found at https://github.com/rmohr/bazeldnf.

In short, bazeldnf does:

  • introducing a rpmtree target, which is not much more than just a bundle of RPMs converted into single tar archives. It can be used for instance as a container-layer, or as a source for required headers or libraries.
  • introcuing a tar2files target which can make a selected subset of headers and shared libraries available for cc_library rules by taking tar files (like emited from rpmtree targets) as input. Finally cc_library targets can then be passed to go code and used via cgo.
  • Finally bazeldnf has a sub-command called ldd which can resolve transitive dependencies of shared libraries and write them as tar2files targets. This ensures linking only required shared libraries.

Release note:

NONE

@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XXL labels Dec 21, 2020
@kubevirt-bot kubevirt-bot added the kind/build-change Categorizes PRs as related to changing build files of virt-* components label Dec 21, 2020
@rmohr
Copy link
Member Author

rmohr commented Dec 21, 2020

/cc @crobinso
/cc @andreabolognani

FYI

@rmohr
Copy link
Member Author

rmohr commented Dec 22, 2020

/test pull-kubevirt-e2e-k8s-1.18
/test pull-kubevirt-build
/test pull-kubevirt-generate

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 24, 2020
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 24, 2020
@rmohr
Copy link
Member Author

rmohr commented Dec 24, 2020

/test all

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 25, 2020
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 28, 2020
@rmohr rmohr marked this pull request as ready for review December 28, 2020 13:30
@rmohr rmohr force-pushed the rpm-deps branch 2 times, most recently from 1dfa44c to dfdf194 Compare December 31, 2020 12:57
@rmohr rmohr changed the title [wip] Merge kubevirt/libvirt into kubevirt/kubevirt Merge kubevirt/libvirt into kubevirt/kubevirt Dec 31, 2020
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 31, 2020
@rmohr
Copy link
Member Author

rmohr commented Dec 31, 2020

Ready for reviews.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Prefer common-logos over fedlora-logs package.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
This target can be used to verify RPMs in the WORKSPACE in CI and on
local RPM updates.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Signed-off-by: Roman Mohr <rmohr@redhat.com>
A no longer needed leftover.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
Our `ldd` run target should get an up-to-date libvirt-devel tar
automatically. For an unknown reason it can provide an outdated version
if not explicitly built before. Working around this for now.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
The virt-operator image is a bad candidate and now tests broke, since it
is now a distroless container without the necessary dependencies.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
@rmohr
Copy link
Member Author

rmohr commented Jan 4, 2021

/retest

1 similar comment
@rmohr
Copy link
Member Author

rmohr commented Jan 4, 2021

/retest

Copy link
Member

@davidvossel davidvossel left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidvossel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2021
@kubevirt-bot kubevirt-bot merged commit 7cfb285 into kubevirt:master Jan 7, 2021
@kubevirt-bot
Copy link
Contributor

@rmohr: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubevirt-e2e-k8s-1.17 9b4a199 link /test pull-kubevirt-e2e-k8s-1.17
pull-kubevirt-e2e-kind-1.17-sriov 9b4a199 link /test pull-kubevirt-e2e-kind-1.17-sriov

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.

@rmohr rmohr mentioned this pull request Jan 14, 2021
Closed
fgimenez pushed a commit to fgimenez/kubevirt that referenced this pull request Feb 8, 2021
These images are not needed after kubevirt#4703

Signed-off-by: Federico Gimenez <fgimenez@redhat.com>
fgimenez pushed a commit to fgimenez/kubevirt that referenced this pull request Feb 10, 2021
These images are not needed after kubevirt#4703

Signed-off-by: Federico Gimenez <fgimenez@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/build-change Categorizes PRs as related to changing build files of virt-* components lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants