nuriel77/hornet-playbook

run gilt overlay fails

stricki opened this issue · 2 comments

I have tried to update my nodes using your script. In all cases (re-run the installation and even install hornet on a fresh server) the following error occurs:

`TASK [install gilt] ****************************************************************************************************************************************************************
changed: [localhost] => {"changed": true, "cmd": ["/usr/bin/pip3", "install", "python-gilt"], "name": ["python-gilt"], "requirements": null, "state": "present", "stderr": "", "stderr_lines": [], "stdout": "Collecting python-gilt\n Downloading python_gilt-1.2.3-py2.py3-none-any.whl (22 kB)\nCollecting colorama\n Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)\nRequirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from python-gilt) (5.3.1)\nCollecting click\n Downloading click-8.0.1-py3-none-any.whl (97 kB)\nCollecting fasteners\n Downloading fasteners-0.16-py2.py3-none-any.whl (28 kB)\nCollecting sh\n Downloading sh-1.14.2-py2.py3-none-any.whl (40 kB)\nRequirement already satisfied: six in /usr/lib/python3/dist-packages (from fasteners->python-gilt) (1.14.0)\nInstalling collected packages: colorama, click, fasteners, sh, python-gilt\nSuccessfully installed click-8.0.1 colorama-0.4.4 fasteners-0.16 python-gilt-1.2.3 sh-1.14.2\n", "stdout_lines": ["Collecting python-gilt", " Downloading python_gilt-1.2.3-py2.py3-none-any.whl (22 kB)", "Collecting colorama", " Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)", "Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from python-gilt) (5.3.1)", "Collecting click", " Downloading click-8.0.1-py3-none-any.whl (97 kB)", "Collecting fasteners", " Downloading fasteners-0.16-py2.py3-none-any.whl (28 kB)", "Collecting sh", " Downloading sh-1.14.2-py2.py3-none-any.whl (40 kB)", "Requirement already satisfied: six in /usr/lib/python3/dist-packages (from fasteners->python-gilt) (1.14.0)", "Installing collected packages: colorama, click, fasteners, sh, python-gilt", "Successfully installed click-8.0.1 colorama-0.4.4 fasteners-0.16 python-gilt-1.2.3 sh-1.14.2"], "version": null, "virtualenv": null}

TASK [run gilt overlay] ************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/local/bin/gilt", "--config", "gilt.yml", "overlay"], "delta": "0:00:00.304240", "end": "2021-06-03 09:59:28.700305", "msg": "non-zero return code", "rc": 1, "start": "2021-06-03 09:59:28.396065", "stderr": "Traceback (most recent call last):\n File "/usr/local/bin/gilt", line 8, in \n sys.exit(main())\n File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1668, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke\n return __callback(*args, **kwargs)\n File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func\n return f(get_current_context(), *args, **kwargs)\n File "/usr/local/lib/python3.8/dist-packages/gilt/shell.py", line 68, in overlay\n for c in config.config(filename):\n File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 60, in config\n return [Config(**d) for d in _get_config_generator(filename)]\n File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 60, in \n return [Config(**d) for d in _get_config_generator(filename)]\n File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 132, in _get_config_generator\n "version": d["version"],\nKeyError: 'version'", "stderr_lines": ["Traceback (most recent call last):", " File "/usr/local/bin/gilt", line 8, in ", " sys.exit(main())", " File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in call", " return self.main(*args, **kwargs)", " File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main", " rv = self.invoke(ctx)", " File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1668, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke", " return __callback(*args, **kwargs)", " File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func", " return f(get_current_context(), *args, **kwargs)", " File "/usr/local/lib/python3.8/dist-packages/gilt/shell.py", line 68, in overlay", " for c in config.config(filename):", " File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 60, in config", " return [Config(**d) for d in _get_config_generator(filename)]", " File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 60, in ", " return [Config(**d) for d in _get_config_generator(filename)]", " File "/usr/local/lib/python3.8/dist-packages/gilt/config.py", line 132, in _get_config_generator", " "version": d["version"],", "KeyError: 'version'"], "stdout": "", "stdout_lines": []}
`

@stricki thanks you for reporting.

Fixed here: e96d967

Please try again.

Wow that was fast! It's OK now. I tried both, re-running the script and also doing a fresh installation. Both worked. Thanks!