Bug 2266206 - Task Generate container puppet configs for step 1 fails with TypeError
Summary: Task Generate container puppet configs for step 1 fails with TypeError
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 17.1 (Wallaby)
Hardware: All
OS: All
high
high
Target Milestone: z3
: 17.1
Assignee: Rabi Mishra
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-27 04:13 UTC by Rabi Mishra
Modified: 2024-05-22 20:42 UTC (History)
5 users (show)

Fixed In Version: tripleo-ansible-3.3.1-17.1.20231101230828.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-22 20:42:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-31510 0 None None None 2024-02-27 04:16:34 UTC
Red Hat Product Errata RHSA-2024:2736 0 None None None 2024-05-22 20:42:54 UTC

Internal Links: 2267924

Description Rabi Mishra 2024-02-27 04:13:00 UTC
Description of problem:

When there are multiple puppet_config key defined with the same config_volumes but different set of volumes, tripleo-ansible can't not merge the definitions correctly and fails with Traceback.

2024-02-26 14:36:14,809 p=930699 u=stack n=ansible | 2024-02-26 14:36:14.808371 | 000c29ab-81c7-7a1e-a0cb-0000000034c4 |       TASK | Generate container puppe
t configs for step 1
2024-02-26 14:36:15,293 p=930699 u=stack n=ansible | An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeErro
r: 'NoneType' object is not iterable
2024-02-26 14:36:15,295 p=930699 u=stack n=ansible | 2024-02-26 14:36:15.294583 | 000c29ab-81c7-7a1e-a0cb-0000000034c4 |      FATAL | Generate container puppe
t configs for step 1 | compute-0 | error={"changed": false, "module_stderr": "Traceback (most recent call last):
  File \"<stdin>\", line 107, in <module>
 
 File \"<stdin>\", line 99, in _ansiballz_main
  File \"<stdin>\", line 47, in invoke_module
  File \"/usr/lib64/python3.9/runpy.py\", line 225, in run_modu
le
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code
    _run_code
(code, mod_globals, init_globals,
  File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_contain
er_puppet_config_payload_x2gzbo4b/ansible_container_puppet_config_payload.zip/ansible/modules/container_puppet_config.py\", line 550, in <module>
  File \"/t
mp/ansible_container_puppet_config_payload_x2gzbo4b/ansible_container_puppet_config_payload.zip/ansible/modules/container_puppet_config.py\", line 546, in mai
n
  File \"/tmp/ansible_container_puppet_config_payload_x2gzbo4b/ansible_container_puppet_config_payload.zip/ansible/modules/container_puppet_config.py\", li
ne 162, in __init__
  File \"/tmp/ansible_container_puppet_config_payload_x2gzbo4b/ansible_container_puppet_config_payload.zip/ansible/modules/container_pupp
et_config.py\", line 213, in _merge_volumes_configs
TypeError: 'NoneType' object is not iterable
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/
stderr for the exact error", "rc": 1}
~~~~

at compute side /var/log/messages

~~~
Feb 26 12:36:09 compute-0 python3[17494]: ansible-file Invoked with path=/var/lib/container-puppet/puppetlabs state=directory setype=svirt_sandbox_file_t sele
vel=s0 recurse=True force=False follow=True modification_time_format=%Y%m%d%H%M.%S access_time_format=%Y%m%d%H%M.%S unsafe_writes=False _original_basename=Non
e _diff_peek=None src=None modification_time=None access_time=None mode=None owner=None group=None seuser=None serole=None attributes=None
Feb 26 12:36:10 compute-0 python3[17510]: ansible-stat Invoked with path=/var/lib/container-puppet/puppetlabs/facter.conf follow=False get_md5=False get_check
sum=True get_mime=True get_attributes=True checksum_algorithm=sha1
Feb 26 12:36:10 compute-0 python3[17558]: ansible-ansible.legacy.stat Invoked with path=/var/lib/container-puppet/puppetlabs/facter.conf follow=False get_chec
ksum=True checksum_algorithm=sha1 get_md5=False get_mime=True get_attributes=True
Feb 26 12:36:11 compute-0 python3[17601]: ansible-ansible.legacy.copy Invoked with dest=/var/lib/container-puppet/puppetlabs/facter.conf setype=svirt_sandbox_
file_t selevel=s0 src=/home/tripleo-admin/.ansible/tmp/ansible-tmp-1708950970.6072736-1043543-178933700922936/source _original_basename=tmp4mh9wyvh follow=Fal
se checksum=53908622cb869db5e2e2a68e737aa2ab1a872111 backup=False force=True unsafe_writes=False content=NOT_LOGGING_PARAMETER validate=None directory_mode=No
ne remote_src=None local_follow=None mode=None owner=None group=None seuser=None serole=None attributes=None
Feb 26 12:36:11 compute-0 python3[17631]: ansible-file Invoked with path=/opt/puppetlabs/facter state=absent recurse=False force=False follow=True modificatio
n_time_format=%Y%m%d%H%M.%S access_time_format=%Y%m%d%H%M.%S unsafe_writes=False _original_basename=None _diff_peek=None src=None modification_time=None acces
s_time=None mode=None owner=None group=None seuser=None serole=None selevel=None setype=None attributes=None
Feb 26 12:36:13 compute-0 python3[17751]: ansible-ansible.posix.synchronize Invoked with src=/opt/puppetlabs/ dest=/var/lib/container-puppet/puppetlabs/ _loca
l_rsync_path=rsync _local_rsync_password=NOT_LOGGING_PARAMETER rsync_path=None delete=False _substitute_controller=False archive=True checksum=False compress=
True existing_only=False dirs=False copy_links=False set_remote_user=True rsync_timeout=0 rsync_opts=[] ssh_connection_multiplexing=False partial=False verify
_host=False mode=push dest_port=None private_key=None recursive=None links=None perms=None times=None owner=None group=None ssh_args=None link_dest=None
Feb 26 12:36:14 compute-0 python3[17770]: ansible-file Invoked with path=/var/lib/tripleo-config/container-puppet-config mode=448 recurse=True setype=containe
r_file_t force=False follow=True modification_time_format=%Y%m%d%H%M.%S access_time_format=%Y%m%d%H%M.%S unsafe_writes=False state=None _original_basename=Non
e _diff_peek=None src=None modification_time=None access_time=None owner=None group=None seuser=None serole=None selevel=None attributes=None
------>
Feb 26 12:36:15 compute-0 python3[17786]: ansible-container_puppet_config Invoked with check_mode=False config_vol_prefix=/var/lib/config-data debug=False net_host=True no_archive=False puppet_config=/var/lib/container-puppet/container-puppet.json short_hostname=compute-0 step=1 update_config_hash_only=False
~~~


Version-Release number of selected component (if applicable):
17.1

How reproducible:
All the time.


Actual results:
Ansible fails with TypeError: 'NoneType' object is not iterable.

Expected results:
Should not fail with error.

Comment 20 errata-xmlrpc 2024-05-22 20:42:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: openstack-tripleo-heat-templates and tripleo-ansible update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:2736


Note You need to log in before you can comment on or make changes to this bug.