Skip to content
Closed
Changes from all commits
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
19 changes: 19 additions & 0 deletions templates/common/_base/units/ovs-notification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ovs-notification.service
enabled: {{if eq .NetworkType "OVNKubernetes"}}true{{else if eq .NetworkType "OpenShiftSDN"}}true{{else}}false{{end}}
contents: |
[Unit]
Description=Creates a file to let the OVS pod know OVS is running on systemd.
Wants=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service openvswitch.service
Before=network-online.target kubelet.service

[Service]
# Need oneshot to delay kubelet
Type=oneshot
# Create the file in a tmpfs so that the file gets deleted on restart
ExecStart=/usr/bin/touch /var/run/openvswitch/ovs-notification
StandardOutput=journal+console
StandardError=journal+console

[Install]
WantedBy=network-online.target
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Author

Choose a reason for hiding this comment

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

This is part of the network so I'd say we can't consider the network completely setup until this unit is complete. I would also make sense in the network.target but I think network-online.target is the most logical place.

Anyway I don't feel strongly enough about this to block the PR while we discuss where it should go, so if you want it somewhere else I'll move it.

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't right to say wanted by network online target, but then in runtime this is running before network online target