sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
200 stars 732 forks source link

[GCU] - Test Cases under GCU are Failing due to "ConfigDB fail to validate Yang" in T0 #10692

Open mithun2498 opened 1 year ago

mithun2498 commented 1 year ago

Description The following test cases under Generic Config Updater is failing due to "Failed: SETUP FAILURE: ConfigDB fail to validate Yang."

Case List:

  1. generic_config_updater/test_bgpl.py
  2. generic_config_updater/test_portchannel_interface.py
  3. generic_config_updater/test_eth_interface.py
  4. generic_config_updater/test_bgp_speaker.py
  5. generic_config_updater/test_vlan_interface.py
  6. generic_config_updater/test_ipv6.py

Steps to reproduce the issue:

  1. Run these cases in a physical testbed.

Describe the results you received: GCU cases are resulting in error.

Describe the results you expected: Expecting the case to PASS.

**Error:**

__ ERROR at setup of test_ipv6_suite ___

duthosts = [] rand_one_dut_hostname = 'dev-msn2700-01'

@pytest.fixture(scope="module", autouse=True)
def verify_configdb_with_empty_input(duthosts, rand_one_dut_hostname):
    """Fail immediately if empty input test failure

    Args:
        duthosts: list of DUTs.
        rand_one_dut_hostname: Hostname of a random chosen dut

    Returns:
        None.
    """
    duthost = duthosts[rand_one_dut_hostname]
    json_patch = []
    tmpfile = generate_tmpfile(duthost)

    try:
        output = apply_patch(duthost, json_data=json_patch, dest_file=tmpfile)
        if output['rc'] or "Patch applied successfully" not in output['stdout']:
            pytest.fail(
                "SETUP FAILURE: ConfigDB fail to validate Yang. rc:{} msg:{}"
              .format(output['rc'], output['stdout'])

) E Failed: SETUP FAILURE: ConfigDB fail to validate Yang. rc:2 msg:Patch Applier: Patch application starting. E Patch Applier: Patch: [] E Patch Applier: Getting current config db. E Patch Applier: Simulating the target full config after applying the patch. E Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb. E Patch Applier: Sorting patch updates.

duthost = duthosts = [] json_patch = [] output = {'stderr_lines': [u'Failed to apply patch', u'Usage: config apply-patch [OPTIO...s.'], u'start': u'2023-06-19 01:12:24.872105', u'msg': u'non-zero return code'} rand_one_dut_hostname = 'dev-msn2700-01' tmpfile = u'/tmp/tmp.Y3ByScIdaw'

generic_config_updater/conftest.py:105: Failed

mithun2498 commented 8 months ago

Hello @wangxin @yxieca ,

The test case (generic_config_updater | test_syslog.py) is consistently failing in T0 topology. Kindly help me on this!

yxieca commented 8 months ago

@qiluo-msft can you assign someone to take a look?