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

nat64: T6627: call check_kmod within standard config function (backport #3927) #3931

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 2, 2024

Change Summary

The config mode script nat64.py calls the modprobe utility check_kmod outside of the standard functions, leading to an OSError when run under configd. Current behavior of configd will re-run the script within the CLI context, leading to config and smoketest success; as that behavior will be changed in the future to accommodate all scripts running within the configd context (T6608), correct now.

There are several other config scripts that use this pattern, which will be all changed in a separate PR. The nat64.py script deserved special attention as it provides an example of state configuration informing the syntax verification stage, which should be kept in mind as we move to distinguishing syntax verification from system state verification.

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

Proposed changes

How to test

Confirmation provided in task. Success in smoketest and journalctl output, below.

Smoketest result

vyos@vyos:/usr/libexec/vyos/tests/smoke/cli$ ./test_nat64.py
test_snat64 (__main__.TestNAT64.test_snat64) ... ok

----------------------------------------------------------------------
Ran 1 test in 3.788s

OK
vyos@vyos:/usr/libexec/vyos/tests/smoke/cli$ journalctl -u vyos-configd --no-pager

...
Aug 01 16:43:35 vyos vyos-configd[4299]: Received message: {"type": "node", "last": true, "data": "/usr/libexec/vyos/conf_mode/nat64.py"}
...
Aug 01 16:43:35 vyos vyos-configd[4299]: Sending response 1
...

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

This is an automatic backport of pull request #3927 done by [Mergify](https://mergify.com).

Functions called from config scripts outside of the standard functions
get_config/verify/generate/apply will not be called when run under
configd. Move as appropriate for the general config script structure and
the specific script requirements.

(cherry picked from commit aeb5197)
@mergify mergify bot requested a review from a team as a code owner August 2, 2024 13:47
@mergify mergify bot requested review from dmbaturin, sarthurdev, zdc, jestabro, c-po and nicolas-fort and removed request for a team August 2, 2024 13:47
Copy link

github-actions bot commented Aug 2, 2024

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented Aug 2, 2024

👍
No issues in unused-imports

@sever-sever sever-sever merged commit a22cad7 into circinus Aug 3, 2024
8 checks passed
@mergify mergify bot deleted the mergify/bp/circinus/pr-3927 branch August 3, 2024 15:14
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.

3 participants