-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(compose): Add basic networking support #1044
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LucaSeri
force-pushed
the
compose-networking
branch
from
December 8, 2023 12:40
e887659
to
8d9aa70
Compare
jake-ciolek
reviewed
Dec 22, 2023
LucaSeri
force-pushed
the
compose-networking
branch
from
February 4, 2024 12:47
8d9aa70
to
1ca2dfc
Compare
LucaSeri
force-pushed
the
compose-networking
branch
2 times, most recently
from
February 21, 2024 09:39
5e28428
to
e493076
Compare
LucaSeri
force-pushed
the
compose-networking
branch
from
February 22, 2024 09:03
e493076
to
2b69586
Compare
This check should be done by the other internals in kraft (build, pkg, run, etc.) so we have a predictable behaviour. Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
This allows us to be aware of the networks that belong to the project. Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
Introduce checks related to networks as well as a way to assign IPs to services within their networks. Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
These functions are general purpose util functions that are meant to be used outside of the bridge package. This is particularly useful since importing the bridge package prevents kraftkit from building natively on MacOS. Signed-off-by: Luca Seritan <luca.seritan@gmail.com> Co-authored-by: Alexander Jung <alex@unikraft.io>
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
This allows to only instantiate the machine and network controllers once, which is more efficient and makes handling races easier. Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
LucaSeri
force-pushed
the
compose-networking
branch
from
February 29, 2024 12:55
d5d28bf
to
3694c7a
Compare
Prior to this, running something like: kraft run --network name:: (with no IP) would cause the mask of the network to be appended to the empty IP, which in turn would prevent the driver from allocating an address. Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
nderjung
approved these changes
Feb 29, 2024
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.
Great work! Thanks so much!
LucaSeri
force-pushed
the
compose-networking
branch
from
February 29, 2024 13:01
3694c7a
to
be2a1b3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisite checklist
make fmt
on your commit series before opening this PR;Description of changes
This PR introduces networking support for compose projects. Currently, because networks have to be "fully" specified, the syntax is quite verbose:
This could be improved on by introducing a way to automatically allocate networks.
Additionally, this PR introduces a commit that makes networking thread-safe: running multiple kernels in parallel would result in the network controller not being updated properly.
You can find an example of a working application here:
https://github.com/LucaSeri/kraft-compose-examples/tree/main/ping-pong
Depends on: #1042, #1024