Search code examples
pythondockerpipansibleopenstack

Kolla-ansible openstack: Docker version failure


I have encountered a problem during a deploy of openstack pike.

There's an error running pre-check command.

Kolla-ansible version 6.0.0.0rc2, Ubuntu Server 16 LTS [error][1]

I've found out that the required docker version is >=2.4.6.

My current is 1.12.6.

fatal: [localhost]: FAILED! => {"msg": "The conditional check 'result | failed or result.stdout | regex_replace('.(\\d+\\.\\d+\\.\\d+).', '\\1') | version_compare(docker_version_min, '<')' failed. The error was: template error while templating string: no filter named 'failed'. String: {% if result | failed or result.stdout | regex_replace('.(\\d+\\.\\d+\\.\\d+).', '\\1') | version_compare(docker_version_min, '<') %} True {% else %} False {% endif %}"}

So, I tried to upgrade it by running command

sudo pip install -U docker==2.4.2

But docker version still says it is 1.12.6 and an error occurs.

My question is: do I have to upgrade docker in other way, change something in kolla-ansible playbooks, or maybe something else?

PS I know pike, Ubuntu srv 16 and 6.0.0.0rc2 are a little bit outdated, but its just for my university project :)


Solution

  • failed is not a filter but a test.

    Using tests with the filter syntax used to be allowed. It has been deprecated in ansible 2.5 (with warnings) and totally removed in ansible 2.9.

    The correct syntax is:

    result is failed