Skip to content

Remove rsyslog plugin from all non eventd containers (#21338)#21720

Merged
kperumalbfn merged 1 commit intosonic-net:202411from
zbud-msft:dev/zainbudhwani/remove_rsyslog_plugin_from_containers_202411
Feb 12, 2025
Merged

Remove rsyslog plugin from all non eventd containers (#21338)#21720
kperumalbfn merged 1 commit intosonic-net:202411from
zbud-msft:dev/zainbudhwani/remove_rsyslog_plugin_from_containers_202411

Conversation

@zbud-msft
Copy link
Contributor

Fixes Issue #21227

  • As of current, we have rsyslog_plugin and corresponding regex and configuration files in containers like bgp, swss, dhcp_relay. These binaries and files are built as part of the docker container itself.

  • This change removes that dependency by storing all rsyslog_plugin regex and conference files in the eventd docker container, and at runtime copying them to the host.

  • Fixes the issue that some images will not be able to publish certain events like "bgp-state", or "dhcp-relay-discard" due to reuse of docker containers during where eventd was disabled.

  • Removed all rsyslog plugin configuration and regex files from containers such as bgp, swss, dhcp_relay. All files for configuration and regexes are built inside eventd docker container. When eventd docker is started, it will copy these files to the host and restart rsyslog.

  • sshd regex and zebra regex are removed because those events are currently not being supported.

  • Possible race condition with rsyslog-config is avoided due to "After" and since rsyslog-config.service is type oneshot, rsyslog-config.sh is guaranteed to complete before eventd.service is called.

Tested on all elastic pipeline for 6 different HWSKUs

Arista-7260CX, Arista720DT, Mellanox2700, Cisco 8102, Nokia M0, Arista 7060CX

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Fixes Issue sonic-net#21227

- As of current, we have rsyslog_plugin and corresponding regex and configuration files in containers like bgp, swss, dhcp_relay. These binaries and files are built as part of the docker container itself.

- This change removes that dependency by storing all rsyslog_plugin regex and conference files in the eventd docker container, and at runtime copying them to the host.

- Fixes the issue that some images will not be able to publish certain events like "bgp-state", or "dhcp-relay-discard" due to reuse of docker containers during where eventd was disabled.

- Removed all rsyslog plugin configuration and regex files from containers such as bgp, swss, dhcp_relay. All files for configuration and regexes are built inside eventd docker container. When eventd docker is started, it will copy these files to the host and restart rsyslog.
- sshd regex and zebra regex are removed because those events are currently not being supported.
- Possible race condition with rsyslog-config is avoided due to "After" and since rsyslog-config.service is type oneshot, rsyslog-config.sh is guaranteed to complete before eventd.service is called.

Tested on all elastic pipeline for 6 different HWSKUs

Arista-7260CX, Arista720DT, Mellanox2700, Cisco 8102, Nokia M0, Arista 7060CX
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kperumalbfn kperumalbfn enabled auto-merge (squash) February 12, 2025 20:21
@kperumalbfn kperumalbfn merged commit 9e21293 into sonic-net:202411 Feb 12, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants