Open asalkeld opened 3 years ago
@asalkeld Hmm this normally happens when there's an error in the j2 template but I don't think anything changed in that area (the metal3-dev-env version we use is pinned ref https://github.com/openshift-metal3/dev-scripts/blob/master/01_install_requirements.sh#L22)
I wonder if this is related to the ansible version - what version are you using?
ansible --version ansible 2.9.8 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/angus/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.6/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Ok not the ansible version, looks the same as my environment.
I suspect the assisted install changed the environment in some way that's altered the variables input to the j2 templating - probably the easiest way to debug is hack https://github.com/metal3-io/metal3-dev-env/blob/master/vm-setup/roles/libvirt/tasks/network_setup_tasks.yml#L34 to move the "template", "network.xml.j2"
part into an explicit task as IIRC that yields a clearer error on failure than doing it inside the lookup.
If you can dump the vars consumed in the template as a task that may also show us what the difference is.
Ok having debugged in the environment provided by @asalkeld I discovered this is caused by an old version of python-jinja2:
$ sudo pip3 freeze | grep Jinja2
Jinja2==2.7.2
$ rpm -qa | grep -i jinja
python3-jinja2-2.10.1-2.el8_0.noarch
It seems something pip installed an old 2.7.2 version, which lacks namespace support (added in 2.10) so this part of the templating breaks:
Unfortunately the error generated isn't super clear, and evidently we're lacking sufficient validation of the required version.
Looking at the logs it seems that ansible/jinja2 was already installed on the first run of 01_install_requirements.sh
- any idea what would have installed that @asalkeld - could it have used a pinned j2 version?
I am not sure @hardys it must have been pulled in as a dep. I'll keep an eye on it.
Describe the bug I am trying to bring up a cluster and keep getting the below anisble error when runing "TASK [libvirt : Create libvirt networks]".
To Reproduce Note: I have had an assisted-installer cluster on this machine before (but ran a "make destoy" in that repo first).
My config.sh has the following set CI_TOKEN PERSONAL_PULL_SECRET OPENSHIFT_RELEASE_TYPE=ci
I ran
observed behavior