Code Monkey home page Code Monkey logo

Comments (5)

hardys avatar hardys commented on July 17, 2024

@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?

from dev-scripts.

asalkeld avatar asalkeld commented on July 17, 2024

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)]

from dev-scripts.

hardys avatar hardys commented on July 17, 2024

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.

from dev-scripts.

hardys avatar hardys commented on July 17, 2024

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:

https://github.com/metal3-io/metal3-dev-env/blob/master/vm-setup/roles/libvirt/templates/network.xml.j2#L37..L45

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?

from dev-scripts.

asalkeld avatar asalkeld commented on July 17, 2024

I am not sure @hardys it must have been pulled in as a dep. I'll keep an eye on it.

from dev-scripts.

Related Issues (20)

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.