forked from agama-project/agama
-
Notifications
You must be signed in to change notification settings - Fork 0
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
HackWeek Project: Learn to develop some Rust terminal UI for Agama #1
Open
teclator
wants to merge
15
commits into
master
Choose a base branch
from
add_bonding_support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
teclator
force-pushed
the
add_bonding_support
branch
from
November 21, 2023 14:50
92c4da4
to
a6de236
Compare
teclator
force-pushed
the
add_bonding_support
branch
from
November 22, 2023 21:09
a12fb55
to
ce58dac
Compare
teclator
added a commit
to agama-project/agama
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.
During this HackWeek some of us wanted to play a little bit with some Rust TUI frameworks in order to provide and alternative way to interact with the Agama installer. (see https://hackweek.opensuse.org/23/projects/tui-interface-for-agama)
So, following @ancorgs idea I was learning and playing a little bit with https://github.com/ratatui-org/ratatui and with https://github.com/veeso/tui-realm.
After learning some basics I tried to create an interface for configuring a Bond with some of the system available devices but as the Bond support in Agama is still in process I wasn't able to finish the POC but it is almost done.
In this branch and repository we can see the changes about the bonding support I was working before and during the Hackweek and also the TUI done for creating the bond.
Update: After last changes it already creates a bond configuration.
Screenshots