Skip to content

T2:pfcwd:Fix the asic_id check - It fails for asic0#17858

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
rraghav-cisco:fix_asic_check_pfc_512
May 23, 2025
Merged

T2:pfcwd:Fix the asic_id check - It fails for asic0#17858
yejianquan merged 1 commit intosonic-net:masterfrom
rraghav-cisco:fix_asic_check_pfc_512

Conversation

@rraghav-cisco
Copy link
Contributor

Description of PR

Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?

Changed the check condition as mentioned above.

How did you verify/test it?

Verification in progress.

Any platform specific information?

Specific to cisco-8000.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rraghav-cisco
Copy link
Contributor Author

All pfcwd passed:

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
------------------------------------------------------------------- generated xml file: /run_logs/23341/2025-04-15-18-02-37/pfcwd_2025-04-15-18-02-37.xml --------------------------------------------------------------------
--------------------------------------------------------------------------------------------------- live log sessionfinish ---------------------------------------------------------------------------------------------------
22:14:21 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================================== short test summary info ===================================================================================================
SKIPPED [3] pfcwd/test_pfc_config.py: Forward action not supported in cisco-8000 / Pfcwd tests skipped on m0/mx testbed.
SKIPPED [3] pfcwd/test_pfcwd_cli.py: test requires topology in Mark(name='topology', args=('t0', 't1'), kwargs={})
SKIPPED [9] pfcwd/test_pfcwd_warm_reboot.py: Warm Reboot is not supported in T2 or in standalone topos. / Pfcwd tests skipped on m0/mx testbed.
================================================================================== 45 passed, 15 skipped, 1 warning in 15102.53s (4:11:42) ===================================================================================
DEBUG:tests.conftest:[log_custom_msg] item: <Function test_pfcwd_wb[async_storm-xx37-lc7]>

@rraghav-cisco
Copy link
Contributor Author

@abdosi , @sdszhang , @auspham : For viz.

@rraghav-cisco rraghav-cisco changed the title Fix the asic_id check - It fails for asic0 T2:pfcwd:Fix the asic_id check - It fails for asic0 Apr 16, 2025
@rraghav-cisco
Copy link
Contributor Author

@abdosi , @sdszhang , @auspham : Any comments ?

Copy link
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit fe78c4b into sonic-net:master May 23, 2025
16 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request May 23, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202405: Azure/sonic-mgmt.msft#324

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #18575

mssonicbld pushed a commit that referenced this pull request May 23, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]
bachalla pushed a commit to bachalla/sonic-mgmt that referenced this pull request Jun 2, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]

Signed-off-by: opcoder0 <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]

Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]

Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
Description of PR
Summary:
Fixes the issue:
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
E tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
E failed = True
E changed = True
E rc = 2
E cmd = show platform npu script -s set_pfc_time.py
E start = 2025-01-23 04:05:01.590011
E end = 2025-01-23 04:05:03.007243
E delta = 0:00:01.417232
E msg = non-zero return code
E invocation = {'module_args': {'_raw_params': 'show platform npu script -s set_pfc_time.py', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}
E _ansible_no_log = None
E stdout =
E stderr =
E Usage: show platform npu script [OPTIONS]
E Try "show platform npu script -h" for help.
E
E Error: Missing option "-n". Choose from:
E asic0,
E asic1,
E asic2.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
Pls see the description. "if asic_id" doesn't work if asic_id = 0. It has to be 'if asic_id == ""'.

How did you do it?
Changed the check condition as mentioned above.

How did you verify/test it?
Verification in progress.

Any platform specific information?
Specific to cisco-8000.

co-authorized by: [email protected]

Signed-off-by: Guy Shemesh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants