Skip to content

Conversation

natali-rs1985
Copy link
Contributor

@natali-rs1985 natali-rs1985 commented Sep 5, 2025

Change summary

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): clarify error message

Related Task(s)

Related PR(s)

How to test / Smoketest result

set vpp settings interface eth1 driver dpdk

vyos@vyos# commit
[ vpp ]
This system does not meet minimal requirements for VPP.
---
Total in the system:
Physical cores: 2
Logical cores: 2
---
Required:
Physical cores: 4
[[vpp]] failed
Commit failed
set vpp settings interface eth1 driver dpdk
set vpp settings cpu main-core 0
set vpp settings cpu workers 2

vyos@vyos# commit
[ vpp ]
Not enough free physical CPU cores for 2 VPP workers
---
Total in the system:
Physical cores: 2
Logical cores: 2
---
Required:
Physical cores: 2
---
Reserved:
For system: 2
VPP main thread: 1
---
Available:
Physical cores: 0
[[vpp]] failed
Commit failed
vyos@vyos# /usr/libexec/vyos/tests/smoke/cli/test_vpp.py
test_01_vpp_basic (__main__.TestVPP.test_01_vpp_basic) ... ok
test_02_vpp_vxlan (__main__.TestVPP.test_02_vpp_vxlan) ... ok
test_03_vpp_gre (__main__.TestVPP.test_03_vpp_gre) ... ok
test_04_vpp_geneve (__main__.TestVPP.test_04_vpp_geneve) ... skipped 'Skipping this test geneve index always is 0'
test_05_vpp_loopback (__main__.TestVPP.test_05_vpp_loopback) ... ok
test_06_vpp_bonding (__main__.TestVPP.test_06_vpp_bonding) ... skipped 'Skipping temporary bonding, sometimes get recursion T7117'
test_07_vpp_bridge (__main__.TestVPP.test_07_vpp_bridge) ... ok
test_08_vpp_ipip (__main__.TestVPP.test_08_vpp_ipip) ... ok
test_09_vpp_xconnect (__main__.TestVPP.test_09_vpp_xconnect) ... ok
test_10_vpp_driver_options (__main__.TestVPP.test_10_vpp_driver_options) ... ok
test_11_vpp_cpu_settings (__main__.TestVPP.test_11_vpp_cpu_settings) ... ok
test_12_vpp_cpu_corelist_workers (__main__.TestVPP.test_12_vpp_cpu_corelist_workers) ... ok
test_13_1_buffer_page_size (__main__.TestVPP.test_13_1_buffer_page_size) ... ok
test_13_2_statseg_page_size (__main__.TestVPP.test_13_2_statseg_page_size) ... ok
test_13_3_mem_page_size (__main__.TestVPP.test_13_3_mem_page_size) ... ok
test_14_mem_default_hugepage (__main__.TestVPP.test_14_mem_default_hugepage) ... ok
test_15_vpp_ipsec_xfrm_nl (__main__.TestVPP.test_15_vpp_ipsec_xfrm_nl) ... ok
test_16_vpp_cgnat (__main__.TestVPP.test_16_vpp_cgnat) ... ok
test_17_vpp_nat (__main__.TestVPP.test_17_vpp_nat) ... ok
test_18_vpp_sflow (__main__.TestVPP.test_18_vpp_sflow) ... ok
test_19_resource_limits (__main__.TestVPP.test_19_resource_limits) ... ok

----------------------------------------------------------------------
Ran 21 tests in 655.141s

OK (skipped=2)

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

github-actions bot commented Sep 5, 2025

👍
No issues in PR Title / Commit Title

@natali-rs1985 natali-rs1985 added the bp/circinus Create automatic backport for circinus label Sep 5, 2025
@natali-rs1985 natali-rs1985 marked this pull request as draft September 9, 2025 12:57
@natali-rs1985 natali-rs1985 force-pushed the T7783 branch 2 times, most recently from 7d6b494 to 2cf3360 Compare September 10, 2025 14:05
@natali-rs1985 natali-rs1985 changed the title T7783: VPP clarify error message for minimum CPU requirements T7783: T7786: VPP clarify error messages for CPU requirements Sep 10, 2025
@natali-rs1985 natali-rs1985 marked this pull request as ready for review September 10, 2025 14:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR clarifies VPP CPU requirement error messages by providing more detailed information about system CPU configuration and availability. The changes improve user experience by showing total system cores, required cores, and available cores with clear formatting.

  • Consolidates CPU verification logic to only run minimum CPU checks when workers are not explicitly configured
  • Introduces a new helper function to generate detailed CPU error messages with system information
  • Updates all CPU-related error messages to use consistent formatting and provide comprehensive details

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/conf_mode/vpp.py Modified CPU verification logic to conditionally check minimum requirements
python/vyos/vpp/config_verify.py Added detailed CPU error message generation and updated all CPU error messages
python/vyos/vpp/config_resource_checks/cpu.py Added system CPU information retrieval function using lscpu

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@zdc zdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

return all_core_numbers


def get_system_cpu_info():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this function needed? There's already vyos.utils.cpu.get_core_count() that returns the number of physical cores, and vyos.utils.cpu.get_cpus() for detailed information.

else ''
)

message = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this code use the tabulate module perhaps, like we do in op mode a lot?

Copy link

CI integration 👍 passed!

Details

CI logs

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

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My change request are addressed, let's merge it.

@dmbaturin dmbaturin merged commit 78b9618 into vyos:current Sep 16, 2025
18 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bp/circinus Create automatic backport for circinus current mirror-completed rebase

Development

Successfully merging this pull request may close these issues.

4 participants