TASK [keystone : Check keystone containers] does not works with Jinja 2.9.5

Bug #1662633 reported by Manik Sidana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Invalid
Undecided
Manik Sidana

Bug Description

While running kolla-ansible deploy, I got the below error
TASK [keystone : Check keystone containers] ************************************
skipping: [localhost] => (item={'key': u'keystone-fernet', 'value': {u'enabled': False, u'image': u'kolla/centos-binary-keystone-fernet:4.0.0', u'group': u'keystone', u'volumes': [u'/etc/kolla//keystone-fernet/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'kolla_logs:/var/log/kolla/', u'keystone_fernet_tokens:/etc/keystone/fernet-keys'], u'container_name': u'keystone_fernet'}})
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TemplateRuntimeError: no test named 'equalto'
fatal: [localhost]: FAILED! => {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}

Reason: 'equalto' is not present in Jinja2 2.9.5.
kolla-ansible has below condition on Jinja2
Jinja2!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4,>=2.8 # BSD License (3 clause)
Due to this, Jinja2.9.5 got installed on my System and I had to downgrade Jinja2 to 2.8 using pip install Jinja2==2.8

Environment details:
kolla-mitaka
Ubuntu 14.04
CentOS binary docker images
ansible version 2.2.1

Manik Sidana (manik019)
Changed in kolla-ansible:
assignee: nobody → Manik Sidana (maniksidana019)
Revision history for this message
Manik Sidana (manik019) wrote :
Revision history for this message
Manik Sidana (manik019) wrote :

[Update]

Based on Jeffrey's suggestion [jeffrey.zhang@99cloud.net], pushing changes to global-requirements.txt

Review Link: https://review.openstack.org/430541

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

i think equalto exist since jinja 2.8 [0]. Are u sure you are using 2.9.5?

[0] https://github.com/pallets/jinja/blob/master/jinja2/tests.py#L106

Revision history for this message
Manik Sidana (manik019) wrote :

Yes, I used 2.9.5 and got this error. It went through when I downgraded to Jinja2 2.8

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

jinja2 have this function. i tested it, it works.

Changed in kolla-ansible:
status: New → Incomplete
Revision history for this message
Manik Sidana (manik019) wrote :

Did you try kolla-ansible deploy with 2.9.5 ?
Although "equalto" was added in version 2.8, but I got this error with 2.9.5.

Also, I noticed that global-requirements.txt is excluding 2.9.0 - 2.9.4 versions of Jinja2. https://github.com/openstack/requirements/blob/master/global-requirements.txt#L77

Revision history for this message
Manik Sidana (manik019) wrote :

I think its better to exclude 2.9.5 since this is a development version. The highest stable version is 2.9.
Please suggest

Revision history for this message
Major Hayden (rackerhacker) wrote :

The 'equalto' test does seem to exist in Jinja2 2.9.5: https://github.com/pallets/jinja/blob/09f8b2b2d1cfca7e5b231cf3773bef2a952b6312/jinja2/tests.py#L181

I'm using it in Jinja 2.9.5 right now.

Revision history for this message
julien du Bois (masterdubs) wrote :

same issue with 2.9.5 fixed with pip install https://github.com/pallets/jinja/zipball/master

Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Were you able to reproduce the issue? Jinja2.9.5 have equalto tests as referenced by #8.

Please, provide more information, an output of ``pip freeze`` on kolla deploy node.

Changed in kolla-ansible:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.