Sriov compute deployment failed due to invalid hiera data parsing

Bug #1906260 reported by mohamed heib
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
New
Undecided
Unassigned

Bug Description

Description
===========
I tried to deploy openstack train using tripleO but the deployment process has failed in the sriov compute deployment due to invalid data parsing in script derive_pci_passthrough_whitelist.py.

in the script above the following two functions tries to parsing hiera returns values to json format without checking if this value are json deserialized object and that cause the script to fail since hiera return values in ruby format (eg {"key"=>"value"}) and expected json format (e.g {"key":"value"}).

Steps to reproduce
==================
 deploy sriov compute (openstack train)
 during the sriov deploument check the derive_pci_passthrough_whitelist.py rc.

Expected result
===============
   deployment process pass successfully
Actual result
=============
   deployment process failed.

Environment
===========
   Openstack train

Logs:

fatal: [computeovsdpdksriov-0]: FAILED! => {
    "changed": true,
    "cmd": [
        "/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py"
    ],
    "delta": "0:00:00.935068",
    "end": "2020-06-17 07:39:29.564575",
    "invocation": {
        "module_args": {
            "_raw_params": "/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2020-06-17 07:39:28.629507",
    "stderr": "Traceback (most recent call last):\n File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py\", line 310, in <modu
le>\n user_configs, system_configs)\n File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py\", line 277, in generate_combine
d_configuration\n pf = get_pf_name_from_phy_network(user_config['physical_network'])\n File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthro
ugh_whitelist.py\", line 242, in get_pf_name_from_phy_network\n phys_dev_mappings = json.loads(out)\n File \"/usr/lib64/python3.6/json/__init__.py\", line 3
54, in loads\n return _default_decoder.decode(s)\n File \"/usr/lib64/python3.6/json/decoder.py\", line 339, in decode\n obj, end = self.raw_decode(s, idx
=_w(s, 0).end())\n File \"/usr/lib64/python3.6/json/decoder.py\", line 357, in raw_decode\n raise JSONDecodeError(\"Expecting value\", s, err.value) from No
ne\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)",
    "stderr_lines": [
        "Traceback (most recent call last):",
        " File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py\", line 310, in <module>",
        " user_configs, system_configs)",
        " File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py\", line 277, in generate_combined_configuration",
        " pf = get_pf_name_from_phy_network(user_config['physical_network'])",
        " File \"/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py\", line 242, in get_pf_name_from_phy_network",
        " phys_dev_mappings = json.loads(out)",
        " File \"/usr/lib64/python3.6/json/__init__.py\", line 354, in loads",
        " return _default_decoder.decode(s)",
        " File \"/usr/lib64/python3.6/json/decoder.py\", line 339, in decode",
        " obj, end = self.raw_decode(s, idx=_w(s, 0).end())",
        " File \"/usr/lib64/python3.6/json/decoder.py\", line 357, in raw_decode",
        " raise JSONDecodeError(\"Expecting value\", s, err.value) from None",
        "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
    ],
    "stdout": "",
    "stdout_lines": []
}

mohamed heib (mheib)
summary: - Sr Iov compute deployment failed due to invalid hiera data parsing
+ Sriov compute deployment failed due to invalid hiera data parsing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.