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

container: T6406: fix NameError: name 'vyos' is not defined #3547

Merged
merged 1 commit into from
May 30, 2024

Conversation

c-po
Copy link
Member

@c-po c-po commented May 29, 2024

Change Summary

Commit 7491056 ("T6406: rename cpus to cpu") did not import the function from the Python module. @nvollmar

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/container.py", line 490, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/container.py", line 132, in verify
    cores = vyos.cpu.get_core_count()
            ^^^^
NameError: name 'vyos' is not defined

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

container

Proposed changes

How to test

Smoketest result

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_container.py
test_basic (__main__.TestContainer.test_basic) ... ok
test_cpu_limit (__main__.TestContainer.test_cpu_limit) ... ok
test_dual_stack_network (__main__.TestContainer.test_dual_stack_network) ... ok
test_ipv4_network (__main__.TestContainer.test_ipv4_network) ... ok
test_ipv6_network (__main__.TestContainer.test_ipv6_network) ... ok
test_uid_gid (__main__.TestContainer.test_uid_gid) ... ok

----------------------------------------------------------------------
Ran 6 tests in 114.165s

OK

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

Commit 7491056 ("T6406: rename cpus to cpu") did not import the function
from the Python module.
@c-po c-po marked this pull request as ready for review May 29, 2024 21:46
@c-po c-po requested a review from a team as a code owner May 29, 2024 21:46
@c-po
Copy link
Member Author

c-po commented May 29, 2024

@Mergifyio backport sagitta

@c-po c-po enabled auto-merge May 29, 2024 22:01
Copy link
Contributor

mergify bot commented May 29, 2024

backport sagitta

✅ Backports have been created

@c-po c-po merged commit 138be55 into vyos:current May 30, 2024
9 checks passed
c-po added a commit that referenced this pull request May 30, 2024
container: T6406: fix NameError: name 'vyos' is not defined (backport #3547)
@c-po c-po deleted the container-fixes branch May 30, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants