Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker-fpm-frr] limit privileged flag for bgp container #14932

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG)

$(DOCKER_FPM_FRR)_CONTAINER_NAME = bgp
$(DOCKER_FPM_FRR)_RUN_OPT += --privileged -t
$(DOCKER_FPM_FRR)_RUN_OPT += -t --cap-add=NET_ADMIN --cap-add=SYS_ADMIN
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is sys_admin required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zebra will unexpectedly exited due to missing the required capabilities.

May  2 22:36:14.048947 str-s6000-acs-10 INFO bgp#supervisord: zebra privs_init: initial cap_set_proc failed: Operation not permitted
May  2 22:36:14.049851 str-s6000-acs-10 INFO bgp#supervisord: zebra Wanted caps: cap_net_admin,cap_net_raw,cap_sys_admin=p
May  2 22:36:14.050687 str-s6000-acs-10 INFO bgp#supervisord: zebra Have   caps: cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_admin,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=p
May  2 22:36:14.064956 str-s6000-acs-10 INFO bgp#supervisord 2023-05-02 22:36:14,061 INFO exited: zebra (exit status 1; not expected)

$(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

$(DOCKER_FPM_FRR)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
Expand Down