BeyondTheClouds / enos

Experimental eNvironment for OpenStack :monkey:
https://beyondtheclouds.github.io/enos/
GNU General Public License v3.0
30 stars 22 forks source link

Fix Docker registry mirror configuration #346

Closed rcherrueau closed 2 years ago

rcherrueau commented 2 years ago

Kolla-ansible overwrites the Docker daemon configuration that is setup by enoslib. This PR adds a specific Docker custom configuration for kolla-ansible that reflects enoslib setup.

Fix https://github.com/BeyondTheClouds/enos/issues/345

jonglezb commented 2 years ago

Hi, thanks a lot for the fix @rcherrueau ! Sorry, I was not available last week to test it.

I just tried your branch and it fails with:

PLAY [Apply role chrony] *********************************************************************************************************************************************************************************************************************

TASK [common : include_tasks] ****************************************************************************************************************************************************************************************************************
included: /home/bjonglez/enos/enos_2022-03-28_14-37-32/kolla-ansible-venv-88163955/share/kolla-ansible/ansible/roles/common/tasks/deploy.yml for dahu-6-kavlan-4.grenoble.grid5000.fr, dahu-28-kavlan-4.grenoble.grid5000.fr, dahu-13-kavlan-4.grenoble.grid5000.fr

TASK [common : Ensuring config directories exist] ********************************************************************************************************************************************************************************************
fatal: [dahu-6-kavlan-4.grenoble.grid5000.fr]: FAILED! => {"msg": "The conditional check 'service | service_enabled_and_mapped_to_host' failed. The error was: No filter named 'service_enabled_and_mapped_to_host' found.\n\nThe error appears to be in '/home/bjonglez/enos/enos_2022-03-28_14-37-32/kolla-ansible-venv-88163955/share/kolla-ansible/ansible/roles/common/tasks/config.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Ensuring config directories exist\n  ^ here\n"}

The error is probably unrelated to your changes, but Enos was working last time I tried a few weeks ago, so this is strange.

I'll give it another go this week.

rcherrueau commented 2 years ago

Arf ... this is a another issue due to a new version of Jinja2 published on last Friday (2022-03-22) [0]. This new version removes the contextfilter decorator that is used by kolla-ansible filters [1]. Therefore, the filter service_enabled_and_mapped_to_host does not work anymore.

A fix has been published [2], but I don't know if this is going to be backport to ussuri.

In the meantime, I fix it on our side.

[0] https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0 [1] https://github.com/openstack/kolla-ansible/blob/stable/ussuri/kolla_ansible/filters.py#L37-L38 [2] https://opendev.org/openstack/kolla-ansible/commit/fc2292b230fb2be03acb2273f097c566f59ba8fc

jonglezb commented 2 years ago

Looks good, thanks! It's bad that Jinja doesn't follow semantic versioning...

jonglezb commented 2 years ago

In the meantime the fix was backported to ussuri: https://github.com/openstack/kolla-ansible/commit/9e84db53dc08da09209704c5f5fdd86170cd909e

rcherrueau commented 2 years ago

In the meantime the fix was backported to ussuri: openstack/kolla-ansible@9e84db5

Great, I should revert the last commit then. However, I cannot test this until next Friday.

jonglezb commented 2 years ago

Actually, without your fix, deployment still fails. I guess that's because Enos uses released versions of kolla-ansible from pypi, and that hasn't been updated since a few months.

So, your fix is still needed.

rcherrueau commented 2 years ago

OK then, let's merge this!