Giter Club home page Giter Club logo

ansible-k0s's Issues

Problem deploying additional controllers

When running your k0s role, the playbook runs into an error, that I am not able to debug.

Could you please take a look at it, I'm not sure why this error is happening or how to debug it properly.

Setup

Ansible Version:

ansible [core 2.13.4]
  config file = /home/kevin/workspace/adit/awx/ansible/ansible.cfg
  configured module search path = ['/home/kevin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/kevin/workspace/adit/awx/venv/lib/python3.10/site-packages/ansible
  ansible collection location = /home/kevin/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/kevin/workspace/adit/awx/venv/bin/ansible
  python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
  jinja version = 3.1.2
  libyaml = True

Playbook:

---
- hosts: all
  roles:
    - k0s

Group_Vars:

ansible_user: debian
k0s_cluster_nodes:
  initial_controller: "controller1"
  controllers: ["controller2", "controller3"]
  workers: ["worker1"]

Infrasetup:

  • 4 VMs
    • 3 Controllers
    • 1 Worker
  • OS: Debian 11

Problem

Expected behaviour

The role completes all necessary steps and sets up a complete cluster with k0s

Actual behavior

The cluster is created, but only with the initial_controller, the other controllers fail with the following error:

TASK [k0s : create k0s controller service with install command] ********************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
fatal: [controller3]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.40.131.234 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.561756-27647-148094266551000/AnsiballZ_k0s_install.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.561756-27647-148094266551000/AnsiballZ_k0s_install.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.561756-27647-148094266551000/AnsiballZ_k0s_install.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.k0s_install', init_globals=dict(_module_fqn='ansible.modules.k0s_install', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_k0s_install_payload_1_3z3zsv/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 240, in <module>\r\n  File \"/tmp/ansible_k0s_install_payload_1_3z3zsv/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 231, in main\r\n  File \"/tmp/ansible_k0s_install_payload_1_3z3zsv/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 59, in run\r\n  File \"/tmp/ansible_k0s_install_payload_1_3z3zsv/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 79, in k0s_install\r\n  File \"/usr/lib/python3.9/genericpath.py\", line 30, in isfile\r\n    st = os.stat(path)\r\nTypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
fatal: [controller2]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.40.131.89 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.5873406-27649-115115981473066/AnsiballZ_k0s_install.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.5873406-27649-115115981473066/AnsiballZ_k0s_install.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/debian/.ansible/tmp/ansible-tmp-1663931311.5873406-27649-115115981473066/AnsiballZ_k0s_install.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.k0s_install', init_globals=dict(_module_fqn='ansible.modules.k0s_install', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_k0s_install_payload_z0_svte8/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 240, in <module>\r\n  File \"/tmp/ansible_k0s_install_payload_z0_svte8/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 231, in main\r\n  File \"/tmp/ansible_k0s_install_payload_z0_svte8/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 59, in run\r\n  File \"/tmp/ansible_k0s_install_payload_z0_svte8/ansible_k0s_install_payload.zip/ansible/modules/k0s_install.py\", line 79, in k0s_install\r\n  File \"/usr/lib/python3.9/genericpath.py\", line 30, in isfile\r\n    st = os.stat(path)\r\nTypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.