Skip to content

Remove rsyslog plugin from all non eventd containers#21338

Merged
qiluo-msft merged 5 commits intosonic-net:masterfrom
zbud-msft:dev/zainbudhwani/remove_rsyslog_plugin_from_containers
Feb 12, 2025
Merged

Remove rsyslog plugin from all non eventd containers#21338
qiluo-msft merged 5 commits intosonic-net:masterfrom
zbud-msft:dev/zainbudhwani/remove_rsyslog_plugin_from_containers

Conversation

@zbud-msft
Copy link
Contributor

@zbud-msft zbud-msft commented Jan 7, 2025

Why I did it

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.

Work item tracking
  • Microsoft ADO (number only):30569670

How I did it

  • 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.

How to verify it

Tested on all elastic pipeline for 6 different HWSKUs

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

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)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zbud-msft zbud-msft marked this pull request as ready for review January 11, 2025 01:13
@zbud-msft zbud-msft requested review from qiluo-msft and stepanblyschak and removed request for lguohan, qiluo-msft and xumia January 11, 2025 01:13
"parse_json": "monit_regex.json"
},
{
"name": "sshd",
Copy link
Collaborator

@qiluo-msft qiluo-msft Jan 11, 2025

Choose a reason for hiding this comment

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

sshd

why remove? I cannot find info in PR description. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated PR description, but that event is not being supported.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will close this comment. but still could you help me understand "sshd regex and zebra regex are removed because those events are currently not being supported." sshd does not support or regex does not support or eventd does not support?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eventd will not support sshd
zebra regex is no longer supported.

qiluo-msft
qiluo-msft previously approved these changes Feb 1, 2025
Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

with one question in comment

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 57c02e3 into sonic-net:master Feb 12, 2025
21 checks passed
zbud-msft added a commit to zbud-msft/sonic-buildimage that referenced this pull request Feb 12, 2025
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
kperumalbfn pushed a commit that referenced this pull request Feb 12, 2025
[202411]Remove rsyslog plugin from all non eventd containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants