-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add bond model #783
Closed
Closed
Add bond model #783
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
cfconrad
commented
Sep 29, 2023
cfconrad
force-pushed
the
pr-add-bond-model
branch
from
September 29, 2023 14:53
f7d3e41
to
bf67e3d
Compare
Adding the optional field hwaddr of type MacAddr to BondConfig. It is used to define a specific hwaddr for a bonding device.
It is possible to set a specific hwaddr for a bonding device. We sync BondConfig.hwaddr with 802-3-ethernet.assigned-mac-address.
cfconrad
force-pushed
the
pr-add-bond-model
branch
from
October 23, 2023 10:31
bf67e3d
to
c74a71d
Compare
Merged
close in favor of #885 |
teclator
added a commit
that referenced
this pull request
Dec 15, 2023
This PR adds support for configuring a Bond connection using Agama auto-installation. ## The model Initially, we thought each connection struct would take ownership of its ports (basically, other connections). However, after some discussion with the networking team, we agreed to keep a "reference" in the opposite direction (from the port to the controller). At this point, each connection that belongs to a bond keeps its parent UUID. ## Configuring a port When using the auto-installation you can define the port with something like this: ```rust { id: 'bond0', bond: { ports: ['eth0', 'eth1'], mode: 'active-backup', options: "primary=eth1" } }, { id: 'Wired Adapter 1', interface: 'eth1' } ``` In NetworkManager, it is mandatory to specify an interface name. However, Agama will use the `id` if you do not define the `interface`. About the ports, it is not required to define them (in the example above, `eth0` is missing). Agama will create a connection automatically. And, again, you can use the `id` or the `interface` to link both connections. ## Improving the D-Bus interface As the list of ports is not part of the `BondConnection` struct, it is not straightforward to expose that information in the D-Bus interface. After all, the code that exposes each connection over D-Bus only had access to the information of its specific connection (actually, it owns a clone of the connection). For that reason, starting with the [Bond](https://github.com/openSUSE/agama/blob/add_bonding_support/rust/agama-dbus-server/src/network/dbus/interfaces.rs#L312) interface, we implemented a better mechanism (based on message passing) to interact with the data model. We will open a separate PR to adapt the rest of interfaces (with more information about the problems it solves). ## What's next? * #918 * #924 * Fix a ton of issues detected by Clippy. ## References * @cfconrad started to work on bonding support on #783. ## Testing * Tested manually (see teclator#1). * Added some unit and integration tests.
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.
Problem
Solution
network::model
Testing