tripleo client discrepancy in generating ansible.conf

Bug #1881254 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
Medium
Unassigned

Bug Description

There is "openstack tripleo config generate ansible" https://opendev.org/openstack/python-tripleoclient/src/branch/master/setup.cfg#L49 interface that relies on GenerateAnsibleConfig and uses tripleo_common.actions.ansible as a shared lib. Historically that lib also was used for generating ansible.cfg for Mistral ansible executions as well.

Since some time ago it seems we've had a discrepancy in configuration methods though. Now we have a second place that ensures ansible.cfg: https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/utils.py#L611

Those must be unified and not conflict to each other. Otherwise running the aforementioned CLI command by a user overwrites the config generated with the latter code and vice versa.

Changed in tripleo:
importance: Undecided → Medium
status: New → Triaged
milestone: none → victoria-1
tags: added: tech-debt ux
Revision history for this message
Kevin Carter (kevin-carter) wrote :

Since we've switched execution to ansible-runner and removed mistral, we're are doing our best to not use an ansible.cfg file all together. The code within tripleoclient to create an ansible.cfg [0] file, if one doesn't exist, contains only one option; this is the only option not able to be expressed in environment variables [1].

Just as a note, if a user provides an ANSIBLE_CFG file or if one is discovered, we don't replace the file, we simply append the option we require [2]. If you're seeing this method replace a provided ansible.cfg file, not append it, then that is a bug; however, as this stands today it looks like everything is working as intended.

[0] https://github.com/openstack/python-tripleoclient/blob/7b2ea578f60377d3d6e3048697d932e48ea149e2/tripleoclient/utils.py#L611-L627
[1] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_POLL_INTERVAL
[2] https://github.com/openstack/python-tripleoclient/blob/7b2ea578f60377d3d6e3048697d932e48ea149e2/tripleoclient/utils.py#L616-L624

Changed in tripleo:
status: Triaged → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-tripleoclient (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/732166

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/732166
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=ed470de9919b8dd7ec5e2e8ab70eeaac933f7252
Submitter: Zuul
Branch: master

commit ed470de9919b8dd7ec5e2e8ab70eeaac933f7252
Author: Bogdan Dobrelya <email address hidden>
Date: Mon Jun 1 10:59:50 2020 +0200

    Use tripleo custom stdout plugins in utils

    Iff8eec43bd73bc6486f56e741e740869d1b8acbb adjusted ansible config for
    custom 'tripleo_dense' and 'tripleo_profile_tasks' plugins.

    That was not sufficient because of bug/1881254.

    Align settings provided by run_ansible_playbook utility with that
    Iff8eec43bd73bc6486f56e741e740869d1b8acbb provides for tripleo_common
    shared ansible configuration module. That is to have:
    - better coverage in CI jobs
    - users experience as well.

    Callbacks whitelist defaults switches to
    tripleo_dense,tripleo_profile_tasks. And default output callback
    becomes tripleo_dense.

    Change-Id: I5e8bc9ac5cbf4a042b5cd7e27578092062839726
    Related-Bug: #1881254

Revision history for this message
Alex Schultz (alex-schultz) wrote :

This wasn't really a bug. we just hand't landed the implementation yet. Oh well https://review.opendev.org/#/c/726481/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-tripleoclient (stable/ussuri)

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/741018

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-tripleoclient (stable/ussuri)

Reviewed: https://review.opendev.org/741018
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=f3ebd58f38da5c2d1d76ffb413c2d6abf613d607
Submitter: Zuul
Branch: stable/ussuri

commit f3ebd58f38da5c2d1d76ffb413c2d6abf613d607
Author: Bogdan Dobrelya <email address hidden>
Date: Mon Jun 1 10:59:50 2020 +0200

    Use tripleo custom stdout plugins in utils

    Iff8eec43bd73bc6486f56e741e740869d1b8acbb adjusted ansible config for
    custom 'tripleo_dense' and 'tripleo_profile_tasks' plugins.

    That was not sufficient because of bug/1881254.

    Align settings provided by run_ansible_playbook utility with that
    Iff8eec43bd73bc6486f56e741e740869d1b8acbb provides for tripleo_common
    shared ansible configuration module. That is to have:
    - better coverage in CI jobs
    - users experience as well.

    Callbacks whitelist defaults switches to
    tripleo_dense,tripleo_profile_tasks. And default output callback
    becomes tripleo_dense.

    Change-Id: I5e8bc9ac5cbf4a042b5cd7e27578092062839726
    Related-Bug: #1881254
    (cherry picked from commit ed470de9919b8dd7ec5e2e8ab70eeaac933f7252)

tags: added: in-stable-ussuri
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.