@@ -30,6 +30,7 @@ EXTRA_DIST += \
rhel/usr_lib_systemd_system_openvswitch.service \
rhel/usr_lib_systemd_system_ovsdb-server.service \
rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
+ rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service \
rhel/usr_lib_systemd_system_ovn-controller.service \
rhel/usr_lib_systemd_system_ovn-controller-vtep.service \
rhel/usr_lib_systemd_system_ovn-northd.service \
@@ -259,7 +259,7 @@ install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \
install -p -D -m 0644 \
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch
-for service in openvswitch ovsdb-server ovs-vswitchd \
+for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \
ovn-controller ovn-controller-vtep ovn-northd; do
install -p -D -m 0644 \
rhel/usr_lib_systemd_system_${service}.service \
@@ -528,6 +528,7 @@ fi
%{_unitdir}/openvswitch.service
%{_unitdir}/ovsdb-server.service
%{_unitdir}/ovs-vswitchd.service
+%{_unitdir}/ovs-delete-transient-ports.service
%{_datadir}/openvswitch/scripts/openvswitch.init
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
new file mode 100644
@@ -0,0 +1,10 @@
+[Unit]
+Description=Open vSwitch Delete Transient Ports
+After=ovsdb-server.service
+Before=ovs-vswitchd.service
+AssertPathExists=/var/run/openvswitch/db.sock
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl delete-transient-ports
@@ -2,6 +2,7 @@
Description=Open vSwitch Database Unit
After=syslog.target network-pre.target
Before=network.target network.service
+Wants=ovs-delete-transient-ports.service
ReloadPropagatedFrom=openvswitch.service
PartOf=openvswitch.service