Skip to content

Commit

Permalink
ovs: disable StartLimitBurst in the ovs-cleanup service
Browse files Browse the repository at this point in the history
With systemd 255, the ovs integration test is hitting this limit and the
test fails due to that. As it's a oneshot service, it should be OK to
disable this limit.
  • Loading branch information
daniloegea committed Jan 8, 2024
1 parent 6f4fbc0 commit 068b296
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/openvswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ write_ovs_systemd_unit(const char* id, const GString* cmds, const char* rootdir,
}

g_string_append(s, "\n[Service]\nType=oneshot\nTimeoutStartSec=10s\n");
/* During tests the rate in which the netplan-ovs-cleanup service is started/stopped
* might exceed StartLimitBurst.
*/
if (cleanup)
g_string_append(s, "StartLimitBurst=0\n");
g_string_append(s, cmds->str);

g_string_free_to_file(s, rootdir, path, NULL);
Expand Down
2 changes: 1 addition & 1 deletion tests/generator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
OVS_BR_EMPTY = _OVS_BASE + 'After=netplan-ovs-cleanup.service\nBefore=network.target\nWants=network.target\n\n[Service]\n\
Type=oneshot\nTimeoutStartSec=10s\nExecStart=/usr/bin/ovs-vsctl --may-exist add-br %(iface)s\n' + OVS_BR_DEFAULT
OVS_CLEANUP = _OVS_BASE + 'ConditionFileIsExecutable=/usr/bin/ovs-vsctl\nBefore=network.target\nWants=network.target\n\n\
[Service]\nType=oneshot\nTimeoutStartSec=10s\nExecStart=/usr/sbin/netplan apply --only-ovs-cleanup\n'
[Service]\nType=oneshot\nTimeoutStartSec=10s\nStartLimitBurst=0\nExecStart=/usr/sbin/netplan apply --only-ovs-cleanup\n'
UDEV_MAC_RULE = 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", ATTR{address}=="%s", NAME="%s"\n'
UDEV_NO_MAC_RULE = 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", NAME="%s"\n'
UDEV_SRIOV_RULE = 'ACTION=="add", SUBSYSTEM=="net", ATTRS{sriov_totalvfs}=="?*", RUN+="/usr/sbin/netplan apply --sriov-only"\n'
Expand Down

0 comments on commit 068b296

Please sign in to comment.