Getting it working with Kolla Ansible
Hi,
Running on Ubuntu Noble with default Python 3.12 and Mitogen v0.3.19 from github.
Target nodes are Ubuntu Jammy,
Using Kolla Ansible to deploy OpenStack with is really slow and trying to speed it up with Mitogen
Getting errors like ModuleNotFound
failed: [herb] (item={'key': 'kolla-toolbox', 'value': {'container_name': 'kolla_toolbox', 'group': 'kolla-toolbox', 'enabled': True, 'image': 'repo.qumulus.io/kolla/dev/kolla-toolbox:latest', 'environment': {'ANSIBLE_NOCOLOR': '1', 'ANSIBLE_LIBRARY': '/usr/share/ansible', 'REQUESTS_CA_BUNDLE': ''}, 'privileged': True, 'volumes': ['/etc/kolla/kolla-toolbox/:/var/lib/kolla/config_files/:ro', '/etc/localtime:/etc/localtime:ro', '/etc/timezone:/etc/timezone:ro', '/dev/:/dev/', '/run/:/run/:shared', 'kolla_logs:/var/log/kolla/'], 'dimensions': {}}}) => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "ansible_loop_var": "item", "changed": true, "item": {"key": "kolla-toolbox", "value": {"container_name": "kolla_toolbox", "dimensions": {}, "enabled": true, "environment": {"ANSIBLE_LIBRARY": "/usr/share/ansible", "ANSIBLE_NOCOLOR": "1", "REQUESTS_CA_BUNDLE": ""}, "group": "kolla-toolbox", "image": "repo.qumulus.io/kolla/dev/kolla-toolbox:latest", "privileged": true, "volumes": ["/etc/kolla/kolla-toolbox/:/var/lib/kolla/config_files/:ro", "/etc/localtime:/etc/localtime:ro", "/etc/timezone:/etc/timezone:ro", "/dev/:/dev/", "/run/:/run/:shared", "kolla_logs:/var/log/kolla/"]}}, "msg": "'Traceback (most recent call last):\\n File \"master:/home/qcp_user/venv/share/kolla-ansible/ansible/library/kolla_container.py\", line 416, in main\\nModuleNotFoundError: No module named \\'ansible.module_utils.kolla_docker_worker\\'\\n'"}
failed: [mole] (item={'key': 'kolla-toolbox', 'value': {'container_name': 'kolla_toolbox', 'group': 'kolla-toolbox', 'enabled': True, 'image': 'repo.qumulus.io/kolla/dev/kolla-toolbox:latest', 'environment': {'ANSIBLE_NOCOLOR': '1', 'ANSIBLE_LIBRARY': '/usr/share/ansible', 'REQUESTS_CA_BUNDLE': ''}, 'privileged': True, 'volumes': ['/etc/kolla/kolla-toolbox/:/var/lib/kolla/config_files/:ro', '/etc/localtime:/etc/localtime:ro', '/etc/timezone:/etc/timezone:ro', '/dev/:/dev/', '/run/:/run/:shared', 'kolla_logs:/var/log/kolla/'], 'dimensions': {}}}) => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "ansible_loop_var": "item", "changed": true, "item": {"key": "kolla-toolbox", "value": {"container_name": "kolla_toolbox", "dimensions": {}, "enabled": true, "environment": {"ANSIBLE_LIBRARY": "/usr/share/ansible", "ANSIBLE_NOCOLOR": "1", "REQUESTS_CA_BUNDLE": ""}, "group": "kolla-toolbox", "image": "repo.qumulus.io/kolla/dev/kolla-toolbox:latest", "privileged": true, "volumes": ["/etc/kolla/kolla-toolbox/:/var/lib/kolla/config_files/:ro", "/etc/localtime:/etc/localtime:ro", "/etc/timezone:/etc/timezone:ro", "/dev/:/dev/", "/run/:/run/:shared", "kolla_logs:/var/log/kolla/"]}}, "msg": "'Traceback (most recent call last):\\n File \"master:/home/qcp_user/venv/share/kolla-ansible/ansible/library/kolla_container.py\", line 416, in main\\nModuleNotFoundError: No module named \\'ansible.module_utils.kolla_docker_worker\\'\\n'"}
failed: [herb] (item={'key': 'cron', 'value': {'container_name': 'cron', 'group': 'cron', 'enabled': True, 'image': 'repo.qumulus.io/kolla/dev/cron:latest', 'environment': {'KOLLA_LOGROTATE_SCHEDULE': 'daily'}, 'volumes': ['/etc/kolla/cron/:/var/lib/kolla/config_files/:ro', '/etc/localtime:/etc/localtime:ro', '/etc/timezone:/etc/timezone:ro', 'kolla_logs:/var/log/kolla/'], 'dimensions': {}}}) => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "ansible_loop_var": "item", "changed": true, "item": {"key": "cron", "value": {"container_name": "cron", "dimensions": {}, "enabled": true, "environment": {"KOLLA_LOGROTATE_SCHEDULE": "daily"}, "group": "cron", "image": "repo.qumulus.io/kolla/dev/cron:latest", "volumes": ["/etc/kolla/cron/:/var/lib/kolla/config_files/:ro", "/etc/localtime:/etc/localtime:ro", "/etc/timezone:/etc/timezone:ro", "kolla_logs:/var/log/kolla/"]}}, "msg": "'Traceback (most recent call last):\\n File \"master:/home/qcp_user/venv/share/kolla-ansible/ansible/library/kolla_container.py\", line 416, in main\\nModuleNotFoundError: No module named \\'ansible.module_utils.kolla_docker_worker\\'\\n'"}
Is there any chance I can get Mitogen working with Kolla Ansible or is it a mammoth task?
Thanks
Daniel
I don't know, I've not heard of Kolla Ansible before. It may be as simple as fixing or enhancing Ansible Collections support (there may be PRs in progress), or Kolla may be doing odd things that don't mesh with Mitogen's odd things.
Notes to self
- Ubuntu Noble is 24.04 LTS
- Jammy is 20.04
I've not heard of Kolla Ansible before
From https://github.com/openstack/kolla-ansible it appears to be a combination of
- playbooks, roles, inventories, plugins, modules, module-utils ... in https://github.com/openstack/kolla-ansible/tree/master/ansible
- installable Python package called "kolla_ansible" https://github.com/openstack/kolla-ansible/tree/master/kolla_ansible that wraps Ansible, and possibly does other things.
Sorry @moreati
I thought "everyone" had heard of kolla-ansible :).
Your summary was perfect
I have the same issue:
"msg": "'Traceback (most recent call last):\\n File \"master:/opt/kolla-ansible/ansible/library/kolla_container.py\", line 416, in main\\nModuleNotFoundError: No module named \\'ansible.module_utils.kolla_docker_worker\\'\\n'"
# kolla-ansible/ansible/library/kolla_container.py
def main():
module = generate_module()
cw: ContainerWorker = None
try:
if module.params.get('container_engine') == 'docker':
from ansible.module_utils.kolla_docker_worker import DockerWorker # this line report error
cw = DockerWorker(module)
else:
from ansible.module_utils.kolla_podman_worker import PodmanWorker
cw = PodmanWorker(module)
kolla_docker_worker path is kolla-ansible/ansible/module_utils/kolla_docker_worker.py, howere I don't know how to make it work.
I would be very grateful if mitogen could support kolla-ansible. I can help with any tests related to kolla-ansible. Thanks again