Skip to content
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

ncm-network: provide a better way to cleanup inactive connections #1635

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

aka7
Copy link
Contributor

@aka7 aka7 commented Dec 5, 2023

New approach to cleaning up inactive connections so have clean output after the run.

This also fixes an issue where active connnections named 'Wired connection ethX' are deleted before network changes are applied. This is means in some edge cases if first ncm-network run fails then you have no networking. Therefore no need to delete any auto connections created by NetworkManager, instead we just cleanup connections which are inactive at the end.

Wired connection ethX is created by NM automatically, to stop this one can install NetworkManage-config-server package, which stops NM creating such auto connections automaticailly.

provide option to turned this off.

  • Why the change is necessary.
    to cleanup connections which have been made inactive after ncm run is completed with nmstate.

  • What backwards incompatibility it may introduce.
    None, this change is to nmstate backend.

@aka7 aka7 force-pushed the ncm_network_fix branch 2 times, most recently from 64d1f50 to 9976af0 Compare December 5, 2023 17:40
@aka7 aka7 requested review from jrha, jouvin and stdweird December 5, 2023 18:02
@aka7 aka7 marked this pull request as draft December 5, 2023 21:39
@aka7 aka7 marked this pull request as ready for review December 6, 2023 13:37
@aka7 aka7 requested a review from ned21 December 8, 2023 15:55
ncm-network/src/main/perl/nmstate.pm Outdated Show resolved Hide resolved
ncm-network/src/main/perl/nmstate.pm Outdated Show resolved Hide resolved
New approach to cleaning up inactive connections to have clean output after the run.

This also fixes an issue where active connnections named 'Wired connection ethX' are deleted
before network changes are applied. This is means in some edge cases
if first ncm-network run fails then you have no networking.
Therefore no need to delete any auto connections created by NetworkManager, instead
we just cleanup connections which are inactive at the end.

Wired connection ethX is created by NM automatically, to stop this one can install NetworkManage-config-server package,
which stops NM creating such auto connections automaticailly.

provide option to turned this off.
@ned21
Copy link
Contributor

ned21 commented Dec 11, 2023

Thanks for the improvement. LGTM but I will leave someone outside of MS to do the actual approval.

@jrha jrha added this to the 23.12 milestone Dec 18, 2023
@jrha jrha merged commit 00d516b into quattor:master Dec 20, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants