[RH7] ve/kmod: make nfnetlink_log autoloadable upon request from a CT

Submitted by Pavel Tikhomirov on Oct. 29, 2020, 1:02 p.m.

Details

Message ID 20201029130202.24059-1-ptikhomirov@virtuozzo.com
State New
Series "ve/kmod: make nfnetlink_log autoloadable upon request from a CT"
Headers show

Commit Message

Pavel Tikhomirov Oct. 29, 2020, 1:02 p.m.
We see that k8s_weave-npc container fails with:

Thu Oct 29 09:19:53 2020 <5> ulogd.c:981 building new pluginstance stack: 'log1:NFLOG,base1:BASE,pcap1:PCAP'
Thu Oct 29 09:19:53 2020 <7> ulogd_inppkt_NFLOG.c:552 unable to bind to log group 86
Thu Oct 29 09:19:53 2020 <7> ulogd.c:948 error starting `log1'
Thu Oct 29 09:19:53 2020 <8> ulogd.c:1597 not even a single working plugin stack
Fatal error.

It needs nfnetlink_log module to be loaded. Need this to be able to run
kubernetes in centos-8 containers where it uses nft logs.

https://jira.sw.ru/browse/PSBM-121652

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
Looks like we don't have module autoload in vz8, so it can't be ported.

 kernel/kmod.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/kernel/kmod.c b/kernel/kmod.c
index de2bcfdc94d0..044689113e51 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -367,6 +367,10 @@  static struct {
 	{ "nf-logger-2-0",	VE_IP_IPTABLES			},
 	{ "nf-logger-7-0",	VE_IP_IPTABLES			}, /* bridge */
 	{ "nf-logger-10-0",	VE_IP_IPTABLES6			},
+
+	{ "nf-logger-2-1",      VE_IP_IPTABLES			},
+	{ "nf-logger-7-1",      VE_IP_IPTABLES			},
+	{ "nf-logger-10-1",     VE_IP_IPTABLES6			},
 };
 
 /*
@@ -471,6 +475,7 @@  static const char * const ve0_allowed_mod[] = {
 	"nfnetlink-subsys-1",		/* NFNL_SUBSYS_CTNETLINK */
 	"nfnetlink-subsys-2",		/* NFNL_SUBSYS_CTNETLINK_EXP */
 	"nfnetlink-subsys-3",		/* NFNL_SUBSYS_QUEUE */
+	"nfnetlink-subsys-4",		/* NFNL_SUBSYS_ULOG */
 
 	/* unix_diag */
 	"net-pf-16-proto-4-type-1",	/* PF_NETLINK, NETLINK_SOCK_DIAG, AF_LOCAL */