无法禁用 netplan-ovs-cleanup.service

无法禁用 netplan-ovs-cleanup.service

在 Ubuntu 20.04 LTS 上安装所有更新后,我在监控中遇到了这个问题。其中一个systemd服务仍然出现故障,我无法禁用它。

● netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup
 Loaded: loaded (/run/systemd/system/netplan-ovs-cleanup.service; enabled-runtime; vendor preset: enabled)
 Active: inactive (dead)
 Condition: start condition failed at Fri 2021-02-12 09:03:23 CET; 2h 22min ago
         └─ ConditionFileIsExecutable=/usr/bin/ovs-vsctl was not met

Feb 12 08:54:55 hostname systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
Feb 12 09:03:23 hostname systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.

我正在寻找一些.deb需要卸载的软件包,但是dpkg没有。

答案1

您应该能够使用以下命令禁用任何服务:

sudo systemctl disable servicename.service
sudo systemctl mask    servicename.service

第一个命令禁用该服务。第二个命令确保该服务稍后不会再次启动。

要恢复服务,unmask请执行以下操作enable

sudo systemctl unmask servicename.service
sudo systemctl enable servicename.service

相关内容