Description of problem: In OSP17 when executing the command: openstack overcloud admin authorize a traceback occurs: undercloud) [stack@undercloud-0 ~]$ openstack overcloud admin authorize /usr/lib/python3.9/site-packages/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (pyparsing). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' 2022-05-12 23:14:42.346 193153 INFO tripleoclient.utils.utils [-] Running Ansible playbook: /usr/share/ansible/tripleo-playbooks/cli-enable-ssh-admin.yaml, Working directory: /home/stack/overcloud-deploy/overcloud/config-download/overcloud, Playbook directory: /usr/share/ansible/tripleo-playbooks 2022-05-12 23:14:42.349 193153 INFO tripleoclient.utils.utils [-] Temporary directory [ /tmp/tripleo8eacg9c6 ] cleaned up 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize [-] Exception occured while running the command: TypeError: Object of type Host is not JSON serializable 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize Traceback (most recent call last): 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/runner_config.py", line 408, in prepare_command 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize cmdline_args = self.loader.load_file('args', string_types, encoding=None) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/loader.py", line 165, in load_file 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize contents = parsed_data = self.get_contents(path) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/loader.py", line 98, in get_contents 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize raise ConfigurationError('specified path does not exist %s' % path) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize ansible_runner.exceptions.ConfigurationError: specified path does not exist /home/stack/overcloud-deploy/overcloud/config-download/overcloud/args 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize During handling of the above exception, another exception occurred: 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize Traceback (most recent call last): 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/tripleoclient/command.py", line 34, in run 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize super(Command, self).run(parsed_args) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/osc_lib/command/command.py", line 39, in run 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize return super(Command, self).run(parsed_args) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/cliff/command.py", line 186, in run 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize return_code = self.take_action(parsed_args) or 0 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/tripleoclient/v1/overcloud_admin.py", line 117, in take_action 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize oooutils.run_ansible_playbook( 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/tripleoclient/utils.py", line 669, in run_ansible_playbook 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize runner_config.prepare() 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/runner_config.py", line 199, in prepare 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize self.prepare_command() 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/runner_config.py", line 415, in prepare_command 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize self.command = self.generate_ansible_command() 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib/python3.9/site-packages/ansible_runner/runner_config.py", line 512, in generate_ansible_command 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize extra_vars_list.append("\"{}\":{}".format(k, json.dumps(self.extra_vars[k]))) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib64/python3.9/json/__init__.py", line 231, in dumps 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize return _default_encoder.encode(obj) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib64/python3.9/json/encoder.py", line 199, in encode 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize chunks = self.iterencode(o, _one_shot=True) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib64/python3.9/json/encoder.py", line 257, in iterencode 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize return _iterencode(o, 0) 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize File "/usr/lib64/python3.9/json/encoder.py", line 179, in default 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize raise TypeError(f'Object of type {o.__class__.__name__} ' 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize TypeError: Object of type Host is not JSON serializable 2022-05-12 23:14:42.350 193153 ERROR tripleoclient.v1.overcloud_admin.AdminAuthorize 2022-05-12 23:14:42.354 193153 ERROR openstack [-] Object of type Host is not JSON serializable 2022-05-12 23:14:42.354 193153 INFO osc_lib.shell [-] END return value: 1 Version-Release number of selected component (if applicable): RHOS-17.0-RHEL-9-20220511.n.1 How reproducible: Every time Steps to Reproduce: 1. Enter the command: openstack overcloud admin authorize from undercloud command line 2. 3. Actual results: Command generates a traceback Expected results: Command executes with no traceback Additional info:
It looks like InventoryManager returns of list of type Hosts instead of a list of strings now: https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/utils.py#L3230-L3233 I submitted a patch that should fix this: https://review.opendev.org/c/openstack/python-tripleoclient/+/841817
Wallaby backport for osp17: https://review.opendev.org/c/openstack/python-tripleoclient/+/847662
Executed successfully during Phase 3 for RHOS-17.0-RHEL-9-20220708.n.1. From logs (omitting start of log to keep output from being too long): 2022-07-10 12:20:13.015 | "cmd": "source /home/stack/stackrc\nopenstack overcloud admin authorize\n", 2022-07-10 12:20:14.035 | PLAY [Validate TripleO Admin Access] ******************************************* 2022-07-10 12:20:14.039 | 2022-07-10 12:20:11.887252 | 525400d1-dbfc-92aa-24b4-00000000003f | TASK | Ping host 2022-07-10 12:20:14.043 | 2022-07-10 12:20:12.282866 | 525400d1-dbfc-92aa-24b4-00000000003f | OK | Ping host | undercloud 2022-07-10 12:20:14.048 | 2022-07-10 12:20:12.286508 | 525400d1-dbfc-92aa-24b4-00000000003f | TIMING | Ping host | undercloud | 0:00:09.787664 | 0.39s 2022-07-10 12:20:14.053 | 2022-07-10 12:20:12.287782 | 525400d1-dbfc-92aa-24b4-00000000003f | OK | Ping host | localhost 2022-07-10 12:20:14.057 | 2022-07-10 12:20:12.288927 | 525400d1-dbfc-92aa-24b4-00000000003f | TIMING | Ping host | localhost | 0:00:09.790129 | 0.40s 2022-07-10 12:20:14.063 | 2022-07-10 12:20:12.321149 | 525400d1-dbfc-92aa-24b4-00000000003f | OK | Ping host | ceph-0 2022-07-10 12:20:14.067 | 2022-07-10 12:20:12.322657 | 525400d1-dbfc-92aa-24b4-00000000003f | TIMING | Ping host | ceph-0 | 0:00:09.823849 | 0.38s 2022-07-10 12:20:14.074 | 2022-07-10 12:20:12.335006 | 525400d1-dbfc-92aa-24b4-00000000003f | OK | Ping host | compute-0 2022-07-10 12:20:14.078 | 2022-07-10 12:20:12.336741 | 525400d1-dbfc-92aa-24b4-00000000003f | TIMING | Ping host | compute-0 | 0:00:09.837930 | 0.42s 2022-07-10 12:20:14.083 | 2022-07-10 12:20:12.348798 | 525400d1-dbfc-92aa-24b4-00000000003f | OK | Ping host | controller-0 2022-07-10 12:20:14.089 | 2022-07-10 12:20:12.351310 | 525400d1-dbfc-92aa-24b4-00000000003f | TIMING | Ping host | controller-0 | 0:00:09.852507 | 0.42s 2022-07-10 12:20:14.094 | 2022-07-10 12:20:14.098 | PLAY RECAP ********************************************************************* 2022-07-10 12:20:14.103 | ceph-0 : ok=9 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 2022-07-10 12:20:14.108 | compute-0 : ok=9 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 2022-07-10 12:20:14.114 | controller-0 : ok=9 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 2022-07-10 12:20:14.120 | localhost : ok=20 changed=2 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0 2022-07-10 12:20:14.127 | undercloud : ok=9 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 2022-07-10 12:20:14.134 | 2022-07-10 12:20:12.373903 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-07-10 12:20:14.140 | 2022-07-10 12:20:12.374520 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Tasks: 30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-07-10 12:20:14.146 | 2022-07-10 12:20:12.375555 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Elapsed Time: 0:00:09.876767 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-07-10 12:20:14.150 | 2022-07-10 12:20:12.376579 | UUID | Info | Host | Task Name | Run Time 2022-07-10 12:20:14.155 | 2022-07-10 12:20:12.378092 | 525400d1-dbfc-92aa-24b4-00000000002b | SUMMARY | compute-0 | tripleo_create_admin : grant admin rights to user {{ tripleo_admin_user }} | 1.16s 2022-07-10 12:20:14.160 | 2022-07-10 12:20:12.378699 | 525400d1-dbfc-92aa-24b4-00000000002b | SUMMARY | controller-0 | tripleo_create_admin : grant admin rights to user {{ tripleo_admin_user }} | 1.15s 2022-07-10 12:20:14.164 | 2022-07-10 12:20:12.379729 | 525400d1-dbfc-92aa-24b4-00000000002b | SUMMARY | ceph-0 | tripleo_create_admin : grant admin rights to user {{ tripleo_admin_user }} | 1.06s 2022-07-10 12:20:14.168 | 2022-07-10 12:20:12.380760 | 525400d1-dbfc-92aa-24b4-00000000002b | SUMMARY | localhost | tripleo_create_admin : grant admin rights to user {{ tripleo_admin_user }} | 1.05s 2022-07-10 12:20:14.172 | 2022-07-10 12:20:12.381797 | 525400d1-dbfc-92aa-24b4-00000000002b | SUMMARY | undercloud | tripleo_create_admin : grant admin rights to user {{ tripleo_admin_user }} | 1.04s 2022-07-10 12:20:14.176 | 2022-07-10 12:20:12.382837 | 525400d1-dbfc-92aa-24b4-00000000003c | SUMMARY | compute-0 | Gather facts with an active connection | 0.80s 2022-07-10 12:20:14.179 | 2022-07-10 12:20:12.383902 | 525400d1-dbfc-92aa-24b4-00000000003c | SUMMARY | controller-0 | Gather facts with an active connection | 0.80s 2022-07-10 12:20:14.183 | 2022-07-10 12:20:12.385009 | 525400d1-dbfc-92aa-24b4-00000000003c | SUMMARY | localhost | Gather facts with an active connection | 0.79s 2022-07-10 12:20:14.186 | 2022-07-10 12:20:12.386062 | 525400d1-dbfc-92aa-24b4-00000000003b | SUMMARY | controller-0 | Wait for connection to become available | 0.76s 2022-07-10 12:20:14.191 | 2022-07-10 12:20:12.387087 | 525400d1-dbfc-92aa-24b4-00000000003c | SUMMARY | undercloud | Gather facts with an active connection | 0.76s 2022-07-10 12:20:14.194 | 2022-07-10 12:20:12.388113 | 525400d1-dbfc-92aa-24b4-00000000003c | SUMMARY | ceph-0 | Gather facts with an active connection | 0.75s 2022-07-10 12:20:14.197 | 2022-07-10 12:20:12.389146 | 525400d1-dbfc-92aa-24b4-00000000003b | SUMMARY | compute-0 | Wait for connection to become available | 0.68s 2022-07-10 12:20:14.201 | 2022-07-10 12:20:12.390169 | 525400d1-dbfc-92aa-24b4-00000000001f | SUMMARY | localhost | Ensure user can ssh to localhost | 0.65s 2022-07-10 12:20:14.204 | 2022-07-10 12:20:12.391269 | 525400d1-dbfc-92aa-24b4-00000000003b | SUMMARY | ceph-0 | Wait for connection to become available | 0.63s 2022-07-10 12:20:14.207 | 2022-07-10 12:20:12.392311 | 525400d1-dbfc-92aa-24b4-000000000011 | SUMMARY | localhost | Ensure ssh key pair | 0.57s 2022-07-10 12:20:14.210 | 2022-07-10 12:20:12.393332 | 525400d1-dbfc-92aa-24b4-000000000034 | SUMMARY | localhost | tripleo_create_admin : authorize TripleO key for user {{ tripleo_admin_user }} | 0.56s 2022-07-10 12:20:14.214 | 2022-07-10 12:20:12.395310 | 525400d1-dbfc-92aa-24b4-000000000034 | SUMMARY | compute-0 | tripleo_create_admin : authorize TripleO key for user {{ tripleo_admin_user }} | 0.54s 2022-07-10 12:20:14.216 | 2022-07-10 12:20:12.395804 | 525400d1-dbfc-92aa-24b4-000000000034 | SUMMARY | controller-0 | tripleo_create_admin : authorize TripleO key for user {{ tripleo_admin_user }} | 0.52s 2022-07-10 12:20:14.222 | 2022-07-10 12:20:12.396876 | 525400d1-dbfc-92aa-24b4-000000000034 | SUMMARY | undercloud | tripleo_create_admin : authorize TripleO key for user {{ tripleo_admin_user }} | 0.51s 2022-07-10 12:20:14.228 | 2022-07-10 12:20:12.397922 | 525400d1-dbfc-92aa-24b4-000000000034 | SUMMARY | ceph-0 | tripleo_create_admin : authorize TripleO key for user {{ tripleo_admin_user }} | 0.49s 2022-07-10 12:20:14.233 | 2022-07-10 12:20:12.398937 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Summary Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-07-10 12:20:14.238 | 2022-07-10 12:20:12.605 148176 INFO tripleoclient.utils.utils [-] Temporary directory [ /tmp/tripleoaousxgbm ] cleaned up 2022-07-10 12:20:14.242 | 2022-07-10 12:20:12.606 148176 INFO tripleoclient.utils.utils [-] Ansible execution success. playbook: /usr/share/ansible/tripleo-playbooks/cli-enable-ssh-admin.yaml 2022-07-10 12:20:14.249 | 2022-07-10 12:20:12.607 148176 INFO osc_lib.shell [-] END return value: None 2022-07-10 12:20:14.253 |
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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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/RHEA-2022:6543