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

Change system dependencies for "post" systemd service #680

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Change system dependencies for "post" systemd service
This is required to be compatible with OVS installations, which use SysV init scripts (wrapped with systemd-sysv-generator).
On such systems, OVS may depend on the network-online.target, so the start order of services changes (OVS will start after the "post" service).
The proposed solution is to add the following explicit dependencies
After: openvswitch-switch.service
Before: kubelet.service.

Note:  the dependency is ignored if the openvswitch-switch.service is not found.
Signed-off-by: Yury Kulazhenkov <[email protected]>
ykulazhenkov committed Apr 12, 2024
commit 1841fbe3f482f544e672bb8cca4b6450c75530b7
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
contents: |
[Unit]
Description=Configures SRIOV NIC - post network configuration
After=systemd-networkd-wait-online.service NetworkManager-wait-online.service
Before=network-online.target
After=systemd-networkd-wait-online.service NetworkManager-wait-online.service openvswitch-switch.service
Before=kubelet.service

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase post
StandardOutput=journal+console

[Install]
WantedBy=network-online.target
WantedBy=multi-user.target
enabled: true
name: sriov-config-post-network.service
Original file line number Diff line number Diff line change
@@ -33,15 +33,15 @@ spec:
# Removal of this file signals firstboot completion
ConditionPathExists=!/etc/ignition-machine-config-encapsulated.json
Description=Configures SRIOV NIC - post network configuration
After=systemd-networkd-wait-online.service NetworkManager-wait-online.service
Before=network-online.target
After=systemd-networkd-wait-online.service NetworkManager-wait-online.service openvswitch-switch.service
Before=kubelet.service

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase post
StandardOutput=journal+console

[Install]
WantedBy=network-online.target
WantedBy=multi-user.target
enabled: true
name: "sriov-config-post-network.service"