Skip to content

Commit f04b7d7

Browse files
vivekrnvmssonicbld
authored andcommitted
[sflow]: Enable linux capabilities on sflow container for kernel 6.1.94 compatibility (sonic-net#19700)
Starting 6.1.94, Kernel mandates the process to have SYS_ADMIN/NET_ADMIN capability to join events/packets multicast group respectively PSAMPLE used packets and DROPMON uses events Ref: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=e03781879a0d https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=44ec98ea5ea9 Without this, the following error is observed and host-sflow couldn't use psample and NET_DB 2024 Jul 24 22:38:35.140784 r-tigris-04 ERR sflow#hsflowd: error joining PSAMPLE netlink group 20 : Operation not permitted 2024 Jul 24 22:38:35.849822 r-tigris-04 ERR sflow#hsflowd: error joining DROPMON netlink group 1 : Operation not permitted Signed-off-by: Vivek Reddy <[email protected]>
1 parent 0de5b9b commit f04b7d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/docker-sflow.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SFLOW_DBG)
3030
endif
3131

3232
$(DOCKER_SFLOW)_CONTAINER_NAME = sflow
33-
$(DOCKER_SFLOW)_RUN_OPT += -t
33+
$(DOCKER_SFLOW)_RUN_OPT += -t --cap-add=NET_ADMIN --cap-add=SYS_ADMIN
3434
$(DOCKER_SFLOW)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
3535
$(DOCKER_SFLOW)_RUN_OPT += -v /etc/timezone:/etc/timezone:ro
3636
$(DOCKER_SFLOW)_RUN_OPT += -v /host/warmboot:/var/warmboot

0 commit comments

Comments
 (0)