Skip to content

Conversation

@teclator
Copy link
Contributor

@teclator teclator commented Apr 22, 2025

Problem

It was agreed to install the NetworkManager config server package for both products avoiding the ethernet devices probing and automatic configuration.

Solution

Define the NetworkManager-config-server package as mandatory for SLES-16 and SLES_SAP-16. (see also #2291)

- gnome
mandatory_packages:
- NetworkManager
- NetworkManager-config-server
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to add comment here with reason why it is there ( link to bugzilla is enough for me ). It will help with future introspection...Also should it be in Leap16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not requested so far, @lkocman? what do you think?

@teclator teclator merged commit 2df9272 into master Apr 25, 2025
6 checks passed
@teclator teclator deleted the config_server branch April 25, 2025 13:47
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
jlausuch added a commit to jlausuch/os-autoinst-distri-opensuse that referenced this pull request Jun 2, 2025
https://jira.suse.com/browse/AGM-147

A new Agama feature make our interfaces in openQA not to get an IP,
therefore failing in most cases due to not resolving the network.
To be consistent with the previous behavior, we need to add some
new parameters in the boot process.

Related:
- https://trello.com/c/P6oGGmjH/4745-ui-handle-persistent-non-persistent-network-connections
- Added NetworkManager config server as mandatory package for SLES and SLES SAP agama-project/agama#2279
- Added inst.copy_network to kernel cmdline and config server no-auto-default  agama-project/agama#2291
- https://bugzilla.suse.com/show_bug.cgi?id=1241224
fsimorda pushed a commit to fsimorda/os-autoinst-distri-opensuse that referenced this pull request Jun 3, 2025
https://jira.suse.com/browse/AGM-147

A new Agama feature make our interfaces in openQA not to get an IP,
therefore failing in most cases due to not resolving the network.
To be consistent with the previous behavior, we need to add some
new parameters in the boot process.

Related:
- https://trello.com/c/P6oGGmjH/4745-ui-handle-persistent-non-persistent-network-connections
- Added NetworkManager config server as mandatory package for SLES and SLES SAP agama-project/agama#2279
- Added inst.copy_network to kernel cmdline and config server no-auto-default  agama-project/agama#2291
- https://bugzilla.suse.com/show_bug.cgi?id=1241224
dgdavid added a commit that referenced this pull request Jun 6, 2025
## Problem

With the current approach to network configuration in **SLE 16**, it is
possible that you end up with a system with no network at all.

Why? 
- We started copying all connections to the target system, but that
meant volatile connections were copied too and maybe the defaults are
not wanted in the target system so now only the persistent connections
are copied (the ones in **/etc/NetworkManager/system-connections**).
- Some products install NetworkManager-config-server package which
disables the auto-default DHCP probing on ethernet devices (see
#2279)
  - 

Agama should:

Warn the user.

Allow the user to get out of that situation at any time.

- https://bugzilla.suse.com/show_bug.cgi?id=1241969
-
https://trello.com/c/P6oGGmjH/4745-ui-handle-persistent-non-persistent-network-connections

## Solution
- The connections generated by nm-initrd-generator are moved instead of
copied to ensure them are seeing as permanent and not as in-memory only
by NM avoiding duplications and only the ones generated by
nm-initrd-generator will be copied (**TO BE FIXED:** ibft, nbft and
other kind of connections should be probably omitted).
- If no connection is going to be copied the user will be warned but by
now only in the networking section (there is no check of
**NetworkManager-config-server** package yet for showing the warn).
- The user can select which interfaces will be used for installation
only and switch between made them persistent or not.
- We have modified the way the connection is updated and we are now
using the Update2 and AddConnection2 methods using the
**NMSettingsAddConnection2Flags** and **NMSettingsUpdate2Flags** (see
https://networkmanager.dev/docs/api/latest/nm-dbus-types.html#NMSettingsConnectionFlags)


## Current Network State

In general,

**If an explicit network configuration through the kernel cmdline is
given then:**
1. Agama disables the auto default (no extra connections will be created
by NM when the installer is run.
2. The connections created in dracut will be persisted (moved from /run
to /etc)

**If no explicit network configuration through the kernel cmdline is
given then:**
1. In dracut there will be no disable of auto default and no move of any
connection to /etc.
2. When Agama is started it will check if there are no persistent
connections and in that case it will persist all the known by Agama
(move them from /run to /etc), that is the case of the ones generated by
NetworkManager like Wired 1, 2 3...

Agama UI allows to modify the persistency of the connections it manages
and in the future it could expose an option to modify the whole copy of
the confiugration (already supported in the backend) as well as allow to
modify the persistency of all the connections managed by NetworkManager.

The UI will also shown a warning when there are no persistent
connections configured but just in the Network section by now.

**Note:** The copy of the persisted connections (from /etc) at the end
of the installation is enabled by default (can be disabled with
**inst.copy_network=0**). If disabled, it will not copy anything even if
persisted in the UI.

Therefore, if no specific network configuration is provided which is the
"default path", the installed system will boot with the "defaults"
connections in etc having network after the installation, of course if
there is DHCP properly configured. For products which does not install
the **NetworkManager-config-server** package this should not be
neccesary and even a little bit annoying, but by now it is preferable
than not having network.

## Testing

- *Added a new unit test*
- *Tested manually*


## Screenshots

*If the fix affects the UI attach some screenshots here.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants