[generic_config_updater] Add diagnostic logging for vlanintf_validato… #4105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…r failures
Add enhanced error logging to diagnose vlanintf_validator failures when flushing neighbor entries for deleted VLAN interface IPs.
These minimal logging additions only activate on errors, providing zero overhead during normal operation while enabling root cause analysis when the validator fails.
This could help in the investigatation of sonic-net/sonic-buildimage#23680
What I did
Added diagnostic logging to
vlanintf_validatorto identify the root cause when neighbor flush operations fail during VLAN interface IP removal. Previously, the validator would fail silently with only a generic error message, making it impossible to diagnose the actual failure reason.How I did it
Enhanced
command_wrapper()function to:capture_output=TrueAdded error logging in
vlanintf_validator()to:Updated unit tests in
service_validator_test.pyto reflect the original command formatHow to verify it
Normal operation (no errors):
Error scenario:
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)