Skip to content

[arp_update] Use parent script PID for logger calls#24569

Closed
theasianpianist wants to merge 1 commit intosonic-net:masterfrom
theasianpianist:arp-update-logger-fix
Closed

[arp_update] Use parent script PID for logger calls#24569
theasianpianist wants to merge 1 commit intosonic-net:masterfrom
theasianpianist:arp-update-logger-fix

Conversation

@theasianpianist
Copy link
Copy Markdown
Contributor

Why I did it

The previous fix for this issue #19219 is flawed (see https://github.com/sonic-net/sonic-buildimage/pull/19219/files#r2196157069)

Work item tracking
  • Microsoft ADO 33733907:

How I did it

How to verify it

Add a lot of neighbor entries to a device, then delete them manually from APPL_DB. Run the arp_update script and verify that logs are written for each neighbor and that rsyslogd memory usage remains constant.

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

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

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)

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Copilot AI review requested due to automatic review settings November 19, 2025 02:53
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a flaw in the previous logger implementation in the arp_update script. The change corrects how the process ID is passed to the logger command to ensure proper logging with the parent script's PID, preventing memory issues in rsyslogd.

Key changes:

  • Modified the logger function to use --id="$$" instead of -i "$$" for proper PID specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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