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

T5714: op-cmd: Fix for "show log vpn ipsec/all" #2442

Merged
merged 1 commit into from Dec 2, 2023

Conversation

srividya0208
Copy link
Contributor

Change Summary

No results shown for this command "show log vpn ipsec" . Now changed to journalctl to view logs

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

ipsec

Proposed changes

change the command from this:
cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon
to
journalctl --no-hostname -b /usr/lib/ipsec/charon | tee

How to test

Run this command to check the logs:
show log vpn ipsec

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team November 6, 2023 16:08
op-mode-definitions/show-log.xml.in Outdated Show resolved Hide resolved
No results shown for this command "show log vpn ipsec"
Changed to journalctl
</leafNode>
<leafNode name="ipsec">
<properties>
<help>Show log for IPSec</help>
</properties>
<command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon</command>
<command>journalctl --no-hostname -b /usr/lib/ipsec/charon | tee</command>
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need tee here if we do not write to a file?

@dmbaturin dmbaturin merged commit d8fe108 into vyos:equuleus Dec 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants