Skip to content

Building sonic VS image : FAIL: test_buffers_dell6100_render_template (tests.test_j2files.TestJ2Files) #18358

@TafkaMax

Description

@TafkaMax

Description

Building Sonic VS image on a Ubuntu 22.04 VM with nested virt support fails this test case. For reference the log file included in this issue has all of the information needed aswell to go into detail.

I ran this on the master branch.

Steps to reproduce the issue:

  1. Ubuntu 22.04 VM
  2. .gitlab-ci.yml file with the following information
stages:
  - build

variables:
  UNATTENDED: 1

.build_sonic:
  stage: build
  timeout: 5h
  before_script:
    - docker info
    - export PATH="~/.local/bin:$PATH"
    - pip3 install --user j2cli --quiet
    - git clone --recurse-submodules https://github.com/sonic-net/sonic-buildimage.git
    - cd sonic-buildimage
    # Not needed, if we do not need "patching" functionality.
    #- git restore .
    #- cd ..
    #- ./apply-patches.sh sonic-buildimage/sonic-slave-buster/Dockerfile.user.j2
    #- ./apply-patches.sh sonic-buildimage/sonic-slave-bullseye/Dockerfile.user.j2
    #- ./apply-patches.sh sonic-buildimage/sonic-slave-bookworm/Dockerfile.user.j2
    #- cd sonic-buildimage
    # We need to reset builds here. Resetting it later on, will reset our custom changes aswell.
    - git checkout "$CI_COMMIT_REF_NAME"
    - git restore .
    - make reset
    #- cp ../patches/sonic-config.mk rules/sonic-config.mk
    #- cp ../patches/sonic-platform-common.mk rules/sonic-platform-common.mk
    #- cp ../patches/device_info.py src/sonic-py-common/sonic_py_common/device_info.py
    - sed -i 's/INCLUDE_ICCPD = n/INCLUDE_ICCPD = y/' rules/config
    - sed -i 's/INCLUDE_RESTAPI = n/INCLUDE_RESTAPI = y/' rules/config
    - sed -i 's/INCLUDE_FIPS ?= y/INCLUDE_FIPS = n/' rules/config
    - sed -i 's/BUILD_MULTIASIC_KVM = n/BUILD_MULTIASIC_KVM = y/' rules/config
    - sed -i 's/SONIC_CONFIG_BUILD_JOBS = 1/SONIC_CONFIG_BUILD_JOBS = 4/g' rules/config
  script:
    - make init
    - make configure PLATFORM=$PLATFORM
    - make list
    - make SONIC_BUILD_JOBS=4 target/sonic-vs.bin
    - make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz
  artifacts:
    name: $TARGET
    paths:
      - target/$TARGET
  when: manual

build_sonic_vs_x64:
  extends: .build_sonic
  variables:
    PLATFORM: vs
    PLATFORM_ARCH: amd64
    TARGET: sonic-vs.img.gz
  when: manual

build_sonic_broadcom_x64:
  extends: .build_sonic
  variables:
    PLATFORM: broadcom
    PLATFORM_ARCH: amd64
    TARGET: sonic-broadcom.bin
  when: manual

Describe the results you received:

Added build log output as file. Adding important bits here:

======================================================================
FAIL: test_buffers_dell6100_render_template (tests.test_j2files.TestJ2Files)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sonic/src/sonic-config-engine/tests/test_j2files.py", line 570, in test_buffers_dell6100_render_template
    self._test_buffers_render_template('dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100', 'sample-dell-6100-t0-minigraph.xml', 'buffers.json.j2', 'buffers-dell6100.json', copy_files=True)
  File "/sonic/src/sonic-config-engine/tests/test_j2files.py", line 567, in _test_buffers_render_template
    assert match, diff
AssertionError: --- /sonic/src/sonic-config-engine/tests/sample_output/py2/buffers-dell6100.json	
Ran 220 tests in 107.202s
FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=220 errors=0 failures=1>
ue"} --var-json ACL_RULE
    Output: 
    Running sonic-cfggen -a {"key1":"value"} --var-json INTERFACE
    Output: 
    Running sonic-cfggen -y /sonic/src/sonic-config-engine/tests/test.yml -a {"key1":"value"} -t /sonic/src/sonic-config-engine/tests/test.j2,/sonic/src/sonic-config-engine/tests/output -t /sonic/src/sonic-config-engine/tests/test2.j2,/sonic/src/sonic-config-engine/tests/output2
    Output: 
    Running sonic-cfggen -a {"key1_1": "value1_1", "key1_2": "value1_2", "key2_2": "value2_2", "key2_1": "value2_1"} -t /sonic/src/sonic-config-engine/tests/sample-template-1.json.j2,config-db -t /sonic/src/sonic-config-engine/tests/sample-template-2.json.j2,config-db --print-data
    Output: (10 lines, 214 bytes)
    Running sonic-cfggen -m /sonic/src/sonic-config-engine/tests/simple-sample-graph.xml -p /sonic/src/sonic-config-engine/tests/t0-sample-port-config.ini --var-json VLAN_MEMBER
    Output: (17 lines, 352 bytes)
    Running sonic-cfggen -m /sonic/src/sonic-config-engine/tests/sample_graph.xml -p /sonic/src/sonic-config-engine/tests/t0-sample-port-config.ini -v SNMP_AGENT_ADDRESS_CONFIG.keys()|list
    Output: ['192.168.200.15|161|', '100.0.0.7|161|', '100.0.0.6|161|']
error: Test failed: <unittest.runner.TextTestResult run=220 errors=0 failures=1>
[  FAIL LOG END  ] [ target/python-wheels/buster/sonic_config_engine-1.0-py2-none-any.whl ]
make: *** [slave.mk:926: target/python-wheels/buster/sonic_config_engine-1.0-py2-none-any.whl] Error 1

sonic-build.log

Describe the results you expected:

Output of show version:

N/A

Output of show techsupport:

N/A

Additional information you deem important (e.g. issue happens only occasionally):

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triagedthis issue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions