ansible
ansible copied to clipboard
Python crash with prometheus role
$ uname -a
Darwin johns-mbp.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
$ ansible --version
ansible [core 2.11.7]
config file = /Users/jmaguire/src/my-ansible/ansible.cfg
configured module search path = ['/Users/jmaguire/src/my-ansible/library']
ansible python module location = /opt/homebrew/lib/python3.9/site-packages/ansible
ansible collection location = /Users/jmaguire/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible
python version = 3.9.17 (main, Jun 6 2023, 14:33:55) [Clang 14.0.3 (clang-1403.0.22.14.1)]
jinja version = 3.0.3
libyaml = True
---
- name: Provision Prometheus
hosts: prometheus
roles:
- role: prometheus.prometheus.prometheus
tags: [ prom ]
...
TASK [prometheus.prometheus.prometheus : Discover latest version] *********************************************************************************************
task path: /Users/jmaguire/.ansible/collections/ansible_collections/prometheus/prometheus/roles/prometheus/tasks/preflight.yml:76
skipping: [tornado.johnmaguire.me] => {
"changed": false,
"skip_reason": "Conditional result was False"
}
TASK [prometheus.prometheus.prometheus : Get checksum list] ***************************************************************************************************
task path: /Users/jmaguire/.ansible/collections/ansible_collections/prometheus/prometheus/roles/prometheus/tasks/preflight.yml:93
url lookup connecting to https://github.com/prometheus/prometheus/releases/download/v2.44.0/sha256sums.txt
objc[49407]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[49407]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
ERROR! A worker was found in a dead state
What helped me is
export no_proxy='*'
What helped me is
export no_proxy='*'
It's work! But why?
I believe this is caused by a known issue with python on mac os, please try the workaround from the ansible docs.
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#running-on-macos-as-a-controller