Skip to content

Commit

Permalink
Merge pull request #3554 from vyos/mergify/bp/sagitta/pr-3547
Browse files Browse the repository at this point in the history
container: T6406: fix NameError: name 'vyos' is not defined (backport #3547)
  • Loading branch information
c-po authored May 30, 2024
2 parents 8d50163 + 11a45cf commit 8facd62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/conf_mode/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from vyos.configdict import is_node_changed
from vyos.configverify import verify_vrf
from vyos.ifconfig import Interface
from vyos.cpu import get_core_count
from vyos.utils.file import write_file
from vyos.utils.process import call
from vyos.utils.process import cmd
Expand Down Expand Up @@ -129,7 +130,7 @@ def verify(container):
f'to the system! Container "{name}" will not be started!')

if 'cpu_quota' in container_config:
cores = vyos.cpu.get_core_count()
cores = get_core_count()
if Decimal(container_config['cpu_quota']) > cores:
raise ConfigError(f'Cannot set limit to more cores than available "{name}"!')

Expand Down

0 comments on commit 8facd62

Please sign in to comment.