kpatch.service: make sure it starts before networking services

A binary patch may be used to fix network-related issues, so it is better to
apply it before networking services have started.

We encountered a situation in Virtuozzo 7, when the older kernels
conflicted with a new NetworkManager, ip utility and other system
components (https://www.mail-archive.com/devel@openvz.org/msg35123.html).

Binary patches were provided for these kernels to fix the issue but were
loaded after networking services in some cases. As a result, NetworkManager
and some other system components failed to work properly.

Let us make sure the patches are applied earlier during boot.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
This commit is contained in:
Evgenii Shatokhin 2019-05-07 15:58:24 +03:00
parent fcc7dad42a
commit 94b1edfbd2
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description="Apply kpatch kernel patches" Description="Apply kpatch kernel patches"
ConditionKernelCommandLine=!kpatch.enable=0 ConditionKernelCommandLine=!kpatch.enable=0
Before=network-pre.target
Wants=network-pre.target
[Service] [Service]
Type=oneshot Type=oneshot