neilmunday / Salt-Minion-Inventory

Salt Minion Inventory provides a web based interface to your SaltStack minions to view their state.
GNU General Public License v3.0
36 stars 4 forks source link

inventory.audit: Exception occured when propertiesChanged=False #33

Closed seamus-45 closed 4 years ago

seamus-45 commented 4 years ago

Issue description:

There is no any checks, when the minion properties does not changed only server_id field populated, and then exception raised:

salt/run/20201103071527850579/ret       {
    "_stamp": "2020-11-03T07:15:27.856485",
    "fun": "runner.inventory.audit",
    "fun_args": [
        "2020-11-03T07:15:27.842318",
        {
            "server_id": 1789550377
        },
        false
    ],
    "jid": "20201103071527850579",
    "return": "Exception occurred in runner inventory.audit: Traceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/salt/client/mixins.py\", line 397, in low\n    data[\"return\"] = func(*args, **kwargs)\n  File \"/var/lib/salt/runners/inventory.py\", line 149, in audit\n    vendorId = __getVendorId(db, cursor, properties[\"manufacturer\"])\nKeyError: 'manufacturer'\n",
    "success": false,
    "user": "Reactor"
}

I am investigating why Reactor proccess is leaking memory and suggested that this might be the reason