Description
introduced by #2825
failure:
RunAnsibleModuleFail: run module shell failed, Ansible Results => {"changed": true, "cmd": "config load_minigraph -y &>/dev/null -o", "delta": "0:00:30.051135", "end": "2023-07-09 14:15:58.815148", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2023-07-09 14:15:28.764013", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
it is actually failing because of -o option calls override-config-table to overwrite configuration with golden_config_db.json.
in the test, golden_config_db.json could be empty or imcomplete config json files, which PR #2825 fail to support.
also noticed that, even handled incomplete config file format, test still fail to deserialize config_db:
File \"/usr/local/lib/python3.9/dist-packages/config/main.py\", line 1844, in override_config_db", " sonic_cfggen.FormatConverter.to_deserialized(config_input)", " File \"/usr/local/bin/sonic-cfggen\", line 185, in to_deserialized", " new_key = ConfigDBConnector.deserialize_key(key)", " File \"/usr/lib/python3/dist-packages/swsscommon/swsscommon.py\", line 2031, in deserialize_key", " tokens = key.split(separator)", "AttributeError: 'tuple' object has no attribute 'split'"]
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
Additional information you deem important (e.g. issue happens only occasionally)
Output of show version
Description
introduced by #2825
failure:
RunAnsibleModuleFail: run module shell failed, Ansible Results => {"changed": true, "cmd": "config load_minigraph -y &>/dev/null -o", "delta": "0:00:30.051135", "end": "2023-07-09 14:15:58.815148", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2023-07-09 14:15:28.764013", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
it is actually failing because of
-ooption callsoverride-config-tableto overwrite configuration with golden_config_db.json.in the test, golden_config_db.json could be empty or imcomplete config json files, which PR #2825 fail to support.
also noticed that, even handled incomplete config file format, test still fail to deserialize config_db:
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
Additional information you deem important (e.g. issue happens only occasionally)
Output of
show version