summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2019-09-16 15:28:01 +1000
committerIan Wienand <iwienand@redhat.com>2019-09-19 10:28:53 +1000
commit93d1d3be17b1f5dc9aeb40beebff4a2bec42311d (patch)
tree52ab5ece601ca55fb1dc9446521885a32fd335e3 /README.rst
parent9462c9e466e3c42143541775102a144d4f732a06 (diff)
downloadzuul-93d1d3be17b1f5dc9aeb40beebff4a2bec42311d.tar.gz
Support nodes setting 'auto' python-path
The nodepool "python-path" config variable makes it's way through from the node arguments and ends up as the "ansible_python_interpreter" variable for the inventory when running the job. Notably, Python 3 only distributions require this to be set to /usr/bin/python3 to avoid what can often be confusing red-herring errors (e.g. things like dnf packages incorrectly appearing to be missing on Fedora, for example [1]). Upstream is aware of this often confusing behaviour and has made an "ansible_python_interpreter" value of "auto" to, essentially, "do the right thing" [2] and choose the right python for the target environment. This is available in Ansible >=2.8 and will become default in 2.12. This allows, and defaults to, an interpreter value of "auto" when running with Ansible >=2.8. On the supported prior Ansible releases, "auto" will be translated into "/usr/bin/python2" to maintain backwards compatability. Of course a node explicity setting "python-path" already will override this. Nodepool is updated to set this by default with I02a1a618c8806b150049e91b644ec3c0cb826ba4. I think this is much more user friendly as it puts the work of figuring out what platform has what interpreter into Ansible. It alleviates the need for admins to know anything at all about "python-path" for node configurations unless they are actually doing something out of the ordinary like using a virtualenv. At the moment, if you put a modern Python-3 only distro into nodepool, Zuul always does the wrong thing by selecting /usr/bin/python2; you are left to debug the failures and need to know to go and manually update the python-path to Python 3. Documentation is updated. Detailed discussion is moved into the executor section; the README is simplified a bit to avoid confusion. A release note is added. A test-case is added. Note that it is also self-testing in that jobs using Ansible 2.8 use the updated value (c.f. I7cdcfc760975871f7fa9949da1015d7cec92ee67) [1] https://bugzilla.redhat.com/show_bug.cgi?id=1696404 [2] https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html Change-Id: I2b3bc6d4f873b7d653cfaccd1598464583c561e7
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/README.rst b/README.rst
index fb95f3f4d..7b737ca17 100644
--- a/README.rst
+++ b/README.rst
@@ -64,9 +64,8 @@ at the tops of individual source files.
Python Version Support
----------------------
-Zuul v3 requires Python 3. It does not support Python 2.
+Zuul requires Python 3. It does not support Python 2.
+
+Since Zuul uses Ansible to drive CI jobs, Zuul can run tests anywhere
+Ansible can, including Python 2 environments.
-As Ansible is used for the execution of jobs, it's important to note that
-while Ansible does support Python 3, not all of Ansible's modules do. Zuul
-currently sets ``ansible_python_interpreter`` to python2 so that remote
-content will be executed with Python 2.