Skip to content

Conversation

@johannbg
Copy link
Collaborator

Let's make systemd-networkd a proper network provider which should fix #737
Node that this PR adds dependencies on the dbus module ( since it provides networkd dbus files ) as well as sysusers ( which replaces the grep passwd section from the existing module ) and should not be merged until I have provided the rest of the modules hostnamed, timesyncd,resolved etc. ( read as do not enable automerge ) which will provide the libraries in the existing module.

Changes

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Fixes #

@johannbg johannbg requested review from danimo and haraldh as code owners April 14, 2021 14:44
@github-actions github-actions bot added modules Issue tracker for all modules network Issues related to the network module systemd-networkd Issues related to the systemd-networkd module labels Apr 14, 2021
@johannbg johannbg force-pushed the NETWORKD branch 3 times, most recently from 2687b8a to de8fb6b Compare April 20, 2021 15:40
Comment on lines 10 to 14
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
require_binaries ip || return 1
require_binaries networkctl || return 1
require_binaries "$systemdutildir"/systemd-networkd || return 1
require_binaries "$systemdutildir"/systemd-network-generator || return 1
require_binaries "$systemdutildir"/systemd-networkd-wait-online || return 1
require_binaries \
ip networkctl \
"$systemdutildir"/systemd-networkd \
"$systemdutildir"/systemd-network-generator \
"$systemdutildir"/systemd-networkd-wait-online \
|| return 1

@haraldh
Copy link
Collaborator

haraldh commented Apr 22, 2021

Would be cool to introduce the test cases like for NM:

test/TEST-21-NFS-NM/Makefile
test/TEST-31-ISCSI-NM/Makefile
test/TEST-36-ISCSI-MULTI-NM/Makefile
test/TEST-41-NBD-NM/Makefile
test/TEST-51-MULTINIC-NM/Makefile
test/TEST-61-BONDBRIDGEVLANIFCFG-NM/Makefile

with networkd... relevant code changes:

diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 5a46f3d5..868f62b8 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -2,10 +2,13 @@
 
 if [[ $NM ]]; then
     USE_NETWORK="network-manager"
-    OMIT_NETWORK="network-legacy"
+    OMIT_NETWORK="network-legacy systemd-networkd"
+elif [[ $SNWD ]]; then
+    USE_NETWORK="systemd-networkd"
+    OMIT_NETWORK="network-legacy network-manager"
 else
     USE_NETWORK="network-legacy"
-    OMIT_NETWORK="network-manager"
+    OMIT_NETWORK="network-manager systemd-networkd"
 fi

also for

test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh

Maybe refactor things into test/test-functions

@johannbg
Copy link
Collaborator Author

Would be cool to introduce the test cases like for NM:

test/TEST-21-NFS-NM/Makefile
test/TEST-31-ISCSI-NM/Makefile
test/TEST-36-ISCSI-MULTI-NM/Makefile
test/TEST-41-NBD-NM/Makefile
test/TEST-51-MULTINIC-NM/Makefile
test/TEST-61-BONDBRIDGEVLANIFCFG-NM/Makefile

with networkd... relevant code changes:

diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 5a46f3d5..868f62b8 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -2,10 +2,13 @@
 
 if [[ $NM ]]; then
     USE_NETWORK="network-manager"
-    OMIT_NETWORK="network-legacy"
+    OMIT_NETWORK="network-legacy systemd-networkd"
+elif [[ $SNWD ]]; then
+    USE_NETWORK="systemd-networkd"
+    OMIT_NETWORK="network-legacy network-manager"
 else
     USE_NETWORK="network-legacy"
-    OMIT_NETWORK="network-manager"
+    OMIT_NETWORK="network-manager systemd-networkd"
 fi

also for

test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh

Maybe refactor things into test/test-functions

Create an issue for it and assign it to me I need to take a stab at writing test case :)

@haraldh
Copy link
Collaborator

haraldh commented Apr 22, 2021

Create an issue for it and assign it to me I need to take a stab at writing test case :)

@johannbg #1386

Make systemd-networkd a proper network service provider. Fixes dracutdevs#737
@johannbg johannbg requested a review from haraldh April 22, 2021 12:32
@haraldh haraldh merged commit ea77975 into dracutdevs:master Apr 22, 2021
@johannbg johannbg deleted the NETWORKD branch April 22, 2021 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules Issue tracker for all modules network Issues related to the network module systemd-networkd Issues related to the systemd-networkd module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

systemd-networkd should be a network service provider

2 participants