-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add libvirt environment #700
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rabugopsl If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This seems like it's living in a very similar space to |
b465174 to
89ae602
Compare
This environment has a different purpose. It's designed for local use instead of remote and CI integration. It's a tool to generate disposable libvirt environments for local testing, demoing and development. |
I don't really have a horse in this race, but want to be clear in terms of the project goals. openshift4-libvirt-gcp is absolutely for "local" development/testing. It just happens that my implementation is conducive to CI applications in that it uses Packer to construct the host image. |
|
/test e2e-aws |
tests/libvirt-environment/Dockerfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already out of date. Also, as a general rule I use registry.fedoraproject.org/fedora to bypass the Docker hub which can lag (and there's trust issues).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FROM clause has been updated accordingly
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit shouldn't be necessary anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if clause removed
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point the installer itself is going to pin for releases.
For development, see the code here https://github.com/ironcladlou/openshift4-libvirt-gcp/blob/master/tools/update-rhcos-image#L5
(Which is also what the installer itself is doing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind downloading the image is to have it cached locally to speed the installation by removing the need to download it each time the installer is run. The code has been updated to incorporate Dan's update process.
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to allow the user the choice of podman too.
I don't think --privileged is really necessary, just --device /dev/kvm right? Or, hmm, maybe libvirt wants to control networking.
It would be interesting to see if the installer works with a session libvirt i.e. qemu:///session - but I doubt it since it wants to set up a bridge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reads more) oh I see you're running libvirtd inside the container; interesting. And with the container doing a bridged network by default? Then libvirt is setting up a bridge to the bridge? Impressive that works...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --privileged flag is what allows docker to offer the full nested virtualization capabilities to the containerized environment. I tried running the container by passing all available devices and offering all possible capabilities but it turns out that docker's service enables additional hardware layers only if the said flag is enabled.
Podman was also tested as an alternative to run the container. However, the --privileged flag in podman does not offer the same hardware capabilities as docker's and the nested virtualization is not properly provided.
The containerized environment was also tested using command just exec virsh --connect qemu:///session ... and the virsh commands were able to list and retrieve all domain related information.
The reason to use this subnet is to separate the cluster's network interfaces from the host's to make every successive container run as independent as possible from the underlying host.
|
/test e2e-libvirt |
|
/test e2e-aws |
2 similar comments
|
/test e2e-aws |
|
/test e2e-aws |
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add ignore to the .gitignore for this directory?
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the long flags in all of these commands? I think they are more descriptive.
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this line?
tests/libvirt-environment/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to mention that jq is also required.
tests/libvirt-environment/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/desgined/designed/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to commit these credentials.
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should tell the docker daemon to ignore the ignore directory, since the client sends the entire image over to the daemon even though it isn't used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing the following error:
Error: Failed to synchronize cache for repo 'updates'
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing space
tests/libvirt-environment/Justfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing space
2671311 to
b6b9001
Compare
|
@rabugopsl: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. |
|
This looks stale, also code-ready team already has a solution to test libvirt on gcp instance. /close |
|
@abhinavdahiya: Closed this PR. DetailsIn 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. |
This branch adds a disposable, general purpose containerized environment for libvirt tests.
This containerized environment is designed to free developers and new comers from having to set up the libvirt environment on their own and just focus their attention on the installation process.
It uses
dockerandjustto create a containerized cluster in which tests and code changes may be tested.