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

configd: T3411: Extend redirect_stdout to subprocesses #777

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

jestabro
Copy link
Contributor

Change Summary

Extend the redirect_stdout contextmanager in vyos-configd to redirect stdout from subprocesses.

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)

Component(s) name

Proposed changes

Instead of using the contextlib provided redirect_stdout, we provide a simple contextmanager which will additionally redirect stdout from subprocesses.

How to test

touch /config/vyos.ifconfig.debug
set interfaces ethernet eth0 description 'TEST'
[one will see full debug info in console]
reboot
[one will find full debug info in /tmp/vyos-configd-script-stdout]

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

@jestabro jestabro self-assigned this Mar 16, 2021
@jestabro jestabro merged commit f9d568d into vyos:current Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants