Skip to content

Commit

Permalink
[sflow]: Enable linux capabilities on sflow container for kernel 6.1.…
Browse files Browse the repository at this point in the history
…94 compatibility (#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 <vkarri@nvidia.com>
  • Loading branch information
vivekrnv authored Jul 26, 2024
1 parent f528412 commit f29ece8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/docker-sflow.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SFLOW_DBG)
endif

$(DOCKER_SFLOW)_CONTAINER_NAME = sflow
$(DOCKER_SFLOW)_RUN_OPT += -t
$(DOCKER_SFLOW)_RUN_OPT += -t --cap-add=NET_ADMIN --cap-add=SYS_ADMIN
$(DOCKER_SFLOW)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_SFLOW)_RUN_OPT += -v /etc/timezone:/etc/timezone:ro
$(DOCKER_SFLOW)_RUN_OPT += -v /host/warmboot:/var/warmboot
Expand Down

0 comments on commit f29ece8

Please sign in to comment.