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

vendor wicked service units #1798

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Nov 2, 2021

Issue number:
N/A

Description of changes:
This makes it easier to pass new options, for example to change the log output level for debugging purposes. Drop the auto4 service and helper binary, since we don't use auto4.

I also cleaned up references to services and environment files that we don't use.

Testing done:
Built an AMI, verified that networking still works.

Diff of upstream units for reference:

❯ for i in *.service ; do git diff --word-diff --no-index wicked-version-0.6.66/etc/systemd/$i.in $i ; done
diff --git a/wicked-version-0.6.66/etc/systemd/wickedd-dhcp4.service.in b/wickedd-dhcp4.service
index 5d9af3d9..2a5868fe 100644
--- a/wicked-version-0.6.66/etc/systemd/wickedd-dhcp4.service.in
+++ b/wickedd-dhcp4.service
@@ -1,18 +1,13 @@
[Unit]
Description=wicked DHCPv4 supplicant service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target[-SuSEfirewall2_init.service-]
Before=wickedd.service wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
[-EnvironmentFile=-/etc/sysconfig/network/config-]
[-ExecStart=@wicked_supplicantdir@/wickedd-dhcp4-]{+ExecStart=/usr/libexec/wicked/bin/wickedd-dhcp4+} --systemd --foreground
StandardError=null
Restart=on-abort

[-[Install]-]
[-Alias=dbus-org.opensuse.Network.DHCP4.service-]

diff --git a/wicked-version-0.6.66/etc/systemd/wickedd-dhcp6.service.in b/wickedd-dhcp6.service
index 61e3fc93..a15c9488 100644
--- a/wicked-version-0.6.66/etc/systemd/wickedd-dhcp6.service.in
+++ b/wickedd-dhcp6.service
@@ -1,18 +1,13 @@
[Unit]
Description=wicked DHCPv6 supplicant service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target[-SuSEfirewall2_init.service-]
Before=wickedd.service wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
[-EnvironmentFile=-/etc/sysconfig/network/config-]
[-ExecStart=@wicked_supplicantdir@/wickedd-dhcp6-]{+ExecStart=/usr/libexec/wicked/bin/wickedd-dhcp6+} --systemd --foreground
StandardError=null
Restart=on-abort

[-[Install]-]
[-Alias=dbus-org.opensuse.Network.DHCP6.service-]

diff --git a/wicked-version-0.6.66/etc/systemd/wickedd-nanny.service.in b/wickedd-nanny.service
index d039ff37..b8640a7b 100644
--- a/wicked-version-0.6.66/etc/systemd/wickedd-nanny.service.in
+++ b/wickedd-nanny.service
@@ -1,18 +1,13 @@
[Unit]
Description=wicked network nanny service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target[-SuSEfirewall2_init.service-] wickedd.service
Before=wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
[-EnvironmentFile=-/etc/sysconfig/network/config-]
[-ExecStart=@wicked_sbindir@/wickedd-nanny-]{+ExecStart=/usr/sbin/wickedd-nanny+} --systemd --foreground
StandardError=null
Restart=on-abort

[-[Install]-]
[-Alias=dbus-org.opensuse.Network.Nanny.service-]

diff --git a/wicked-version-0.6.66/etc/systemd/wickedd.service.in b/wickedd.service
index 4988716d..058dc28c 100644
--- a/wicked-version-0.6.66/etc/systemd/wickedd.service.in
+++ b/wickedd.service
@@ -1,20 +1,18 @@
[Unit]
Description=wicked network management service daemon
Requisite=dbus.service
Wants=wickedd-nanny.service wickedd-dhcp6.service wickedd-dhcp4.service[-wickedd-auto4.service-] systemd-udev-settle.service
After=local-fs.target dbus.service[-isdn.service rdma.service-] network-pre.target[-SuSEfirewall2_init.service-] systemd-udev-settle.service[-openvswitch.service-]
Before=wickedd-nanny.service wicked.service network.target

[Service]
Type=notify
LimitCORE=infinity
[-EnvironmentFile=-/etc/sysconfig/network/config-]
[-ExecStart=@wicked_sbindir@/wickedd-]{+ExecStart=/usr/sbin/wickedd+} --systemd --foreground
StandardError=null
Restart=on-abort

[Install]
Also=wickedd-nanny.service
[-Also=wickedd-auto4.service-]
Also=wickedd-dhcp4.service
Also=wickedd-dhcp6.service

diff --git a/wicked-version-0.6.66/etc/systemd/wicked.service.in b/wicked.service
index 0503b2cf..ab72e20d 100644
--- a/wicked-version-0.6.66/etc/systemd/wicked.service.in
+++ b/wicked.service
@@ -8,13 +8,11 @@ Before=network-online.target network.target
Type=oneshot
RemainAfterExit=yes
LimitCORE=infinity
[-EnvironmentFile=-/etc/sysconfig/network/config-]
[-ExecStart=@wicked_sbindir@/wicked-]{+ExecStart=/usr/sbin/wicked+} --systemd ifup all
[-ExecStop=@wicked_sbindir@/wicked-]{+ExecStop=/usr/sbin/wicked+} --systemd ifdown all
[-ExecReload=@wicked_sbindir@/wicked-]{+ExecReload=/usr/sbin/wicked+} --systemd ifreload all

[Install]
WantedBy=multi-user.target network-online.target
Alias=network.service
Also=wickedd.service

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@bcressey bcressey requested review from tjkirch and jpculp November 2, 2021 00:14
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🍔

Source22: wickedd-dhcp4.service
Source23: wickedd-dhcp6.service
Source24: wickedd-nanny.service

%if %{without bootstrap}
Source99: constants.xml
%endif
Copy link
Contributor

Choose a reason for hiding this comment

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

If we don't use auto4, can we also remove autoip4 in 0002-exclude-unused-components.patch?

This makes it easier to pass new options, for example to change the
log output level for debugging purposes.

Drop the auto4 service and helper binary, since we don't use auto4.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@jpculp jpculp mentioned this pull request Nov 2, 2021
3 tasks
@bcressey bcressey merged commit 9933233 into bottlerocket-os:develop Nov 2, 2021
@bcressey bcressey deleted the wicked-units branch November 2, 2021 21:27
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.

4 participants