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

utils: T7095: make vrf and netns arguments aware of the shell #4323

Open
wants to merge 2 commits into
base: current
Choose a base branch
from

Conversation

xeluior
Copy link
Contributor

@xeluior xeluior commented Jan 28, 2025

Change summary

Changes the vrf and netns functionality in the utils/process.py to be aware of whether the shell is required or not. Fixes a regression they introduced that broke callers passing a list rather than a string to the popen (and family) of util functions, notably breaking the git commit-archive functionality.

I also removed the auth parameter as it was not fully implemented, was not used, was not documented, and I could not find any examples of the form it would take, making it difficult to integrate into the refactor.

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)

https://vyos.dev/T7095

Bug introduced in https://vyos.dev/T6975

Related PR(s)

How to test / Smoketest result

configure
set system config-management commit-archive location git://<git url>.git
commit

Prior to this patch, the commit-archive will fail with an error similar to the following.

Archiving config...
  git://<git url>.git Unable to upload "git://<git url>.git/config.boot-vyos-dev2.20250127_165226": [Errno 2] No such file or directory: " ['git', 'clone', '<git url>.git', '/tmp/git-commit-archive-0l3qtm5h/repository', '--depth=1']"
run-parts: /etc/commit/post-hooks.d/02vyos-commit-archive exited with return code 1

After this change the functionality works again.

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

Copy link

👍
No issues in PR Title / Commit Title

Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant