ansible 2.12 breaks undercloud install

Bug #1951020 reported by David Vallee Delisle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Unassigned

Bug Description

Since today, centos9 ships with ansible2.12 and the default ansible.cfg is empty [1].

This apparently breaks undercloud install [2]

Today:
ansible-core-2.12.0-1.el9.x86_64

Last week:
ansible-core-2.11.6-1.el9.x86_64

[1]
~~~
[stack@undercloud-0 ~]$ cat ./undercloud-ansible-dwewukwo/ansible.cfg
# Since Ansible 2.12 (core):
# To generate an example config file (a "disabled" one with all default settings, commented out):
# $ ansible-config init --disabled > ansible.cfg
#
# Also you can now have a more complete file by including existing plugins:
# ansible-config init --disabled -t all > ansible.cfg

# For previous versions of Ansible you can check for examples in the 'stable' branches of each version
# Note that this file was always incomplete and lagging changes to configuration settings

# for example, for 2.9: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg
~~~

[2]
~~~
Deployment Failed!

ERROR: Heat log files: /home/stack/tripleo-deploy/undercloud/heat_launcher/tripleo_deploy-vfkla4sv

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Exception: No section: 'defaults'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/tripleo_deploy.py", line 1436, in take_action
    self._standalone_deploy(parsed_args)
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/tripleo_deploy.py", line 1299, in _standalone_deploy
    ansible.write_default_ansible_cfg(
  File "/usr/lib/python3.9/site-packages/tripleo_common/utils/ansible.py", line 89, in write_default_ansible_cfg
    config.set('defaults', 'retry_files_enabled', 'False')
  File "/usr/lib64/python3.9/configparser.py", line 1204, in set
    super().set(section, option, value)
  File "/usr/lib64/python3.9/configparser.py", line 902, in set
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'defaults'
None
No section: 'defaults'
~~~

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)
Changed in tripleo:
status: New → In Progress
Revision history for this message
David Vallee Delisle (valleedelisle) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/818029
Committed: https://opendev.org/openstack/tripleo-common/commit/02c44076e6722d8b96fbf6d30da9abb8dcbe539a
Submitter: "Zuul (22348)"
Branch: master

commit 02c44076e6722d8b96fbf6d30da9abb8dcbe539a
Author: David Vallee Delisle <email address hidden>
Date: Mon Nov 15 18:20:50 2021 -0500

    Running ansible-config before writing default config

    Since ansible 2.12, the default config is completely empty and this
    breaks the undercloud install process.

    We need to run ansible-config beforehand to generate a boilerplace
    config.

    Closes-bug: #1951020
    Change-Id: I544d117e03037c8a4744139c36bc63b978c489dd

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-common/+/818475

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/818475
Committed: https://opendev.org/openstack/tripleo-common/commit/93269dccb0d416e8c4e999a799c66f62089e606f
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 93269dccb0d416e8c4e999a799c66f62089e606f
Author: David Vallee Delisle <email address hidden>
Date: Mon Nov 15 18:20:50 2021 -0500

    Running ansible-config before writing default config

    Since ansible 2.12, the default config is completely empty and this
    breaks the undercloud install process.

    We need to run ansible-config beforehand to generate a boilerplace
    config.

    Closes-bug: #1951020
    Change-Id: I544d117e03037c8a4744139c36bc63b978c489dd
    (cherry picked from commit 02c44076e6722d8b96fbf6d30da9abb8dcbe539a)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 16.3.0

This issue was fixed in the openstack/tripleo-common 16.3.0 release.

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.