openstack.osa.linear plugin cause issues with loops

Bug #2007849 reported by Damian Dąbrowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Damian Dąbrowski

Bug Description

When openstack.osa.linear strategy plugin is enabled, loops do not work as expected('with_items' is not affected, only 'loop' is problematic).
For ex., conditionals like "item is defined" does not work.

How to reproduce:
https://paste.openstack.org/show/bZYEWVlPOJvzzYciLRBW/

Does anybody know why we have that plugin? Maybe it's not needed anymore?
Or maybe someone knows how to fix it?

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-plugins (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/openstack-ansible/+/874482

Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
Damian Dąbrowski (damiandabrowski) wrote :

So I deployed AIO environment locally with and without this plugin and compared time spent on running setup-openstack.yml

Result: I didn't notice any performance degradation:

current state(with openstack.osa.linear strategy plugin enabled):
    setup-openstack.yml(first run): 54min
    setup-openstack.yml(another run): 25min

without openstack.osa.linear strategy plugin:
    setup-openstack.yml(first run): 52min
    setup-openstack.yml(another run): 24min

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Well, strategy plugins usually step in when targeting multiple hosts. There no use of them with single host in play.

If you have some time, can you kindly check also with using affinity, when multiple containers will be targeted at the same time?

One easy way would be to check infra scenario, where 3 containers for rabbit, galera, repo and keystone? are created.

Revision history for this message
Damian Dąbrowski (damiandabrowski) wrote :

on my AIO I added affinity=3 to keystone containers and checked the time spent on:
- os-keystone-install.yml
- setup-hosts.yml

Looks good IMO

os-keystone-install:
    with openstack.osa.linear strategy plugin enabled:
        first run: 6m47s
        another run: 3m
    without openstack.osa.linear strategy plugin:
        first run: 7m1s
        another run: 2m55s

setup-hosts.yml(on already configured hosts so tasks didn't change anything):
    with openstack.osa.linear strategy plugin enabled: 5m33s
    without openstack.osa.linear strategy plugin: 5m43s

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible/+/874482
Committed: https://opendev.org/openstack/openstack-ansible/commit/8a05eda535c33375556701fd25ed82449de7b14b
Submitter: "Zuul (22348)"
Branch: master

commit 8a05eda535c33375556701fd25ed82449de7b14b
Author: Damian Dabrowski <email address hidden>
Date: Mon Feb 20 19:12:08 2023 +0100

    Do not use openstack.osa.linear strategy plugin

    Custom linear plugin was added long time ago.
    Nowadays it causes issues with loop conditionals.
    It's not really needed these times. Everything works fine without it.
    I also didn't notice any performance degradation after disabling it on
    my AIO.

    Closes-Bug: #2007849
    Change-Id: I566004cfeaa4d562265f22adc044cff3458430d1

Changed in openstack-ansible:
status: In Progress → Fix Released
Changed in openstack-ansible:
assignee: nobody → Damian Dąbrowski (damiandabrowski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-plugins (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/874425
Committed: https://opendev.org/openstack/openstack-ansible-plugins/commit/a4628e636975442b9881aff9519fdfdfa83ffdf4
Submitter: "Zuul (22348)"
Branch: master

commit a4628e636975442b9881aff9519fdfdfa83ffdf4
Author: Damian Dabrowski <email address hidden>
Date: Wed Feb 22 22:41:58 2023 +0100

    Do not use openstack.osa.linear strategy plugin

    Custom linear plugin was added long time ago.
    Nowadays it causes issues with loop conditionals.
    It's not really needed these times. Everything works fine without it.
    I also didn't notice any performance degradation after disabling it on
    my AIO.

    Closes-Bug: #2007849
    Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/874482
    Change-Id: I607ea3f06dc3cd5d68dcffb291a958664a41baf1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 27.0.0.0rc1

This issue was fixed in the openstack/openstack-ansible 27.0.0.0rc1 release candidate.

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.