Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-openstackclient 5.5.0 breaks teflo_openstack_client_plugin #5

Closed
greg-hellings opened this issue Mar 23, 2021 · 2 comments · Fixed by #6
Closed

python-openstackclient 5.5.0 breaks teflo_openstack_client_plugin #5

greg-hellings opened this issue Mar 23, 2021 · 2 comments · Fixed by #6

Comments

@greg-hellings
Copy link

Teflo no longer works with python-openstackclient 5.5.0 released over this past weekend. The behavior of the client library with respect to networks has changed, as per this release note from the library:

"The networks and properties fields of the server list command will now be rendered as objects. In addition, the power_state field will now be humanized and rendered as a string value when using the table formatter."

This leads to the following error during provisioning:

2021-03-23 10:00:31,807 ERROR [teflo.tasks.provision.run:67] Failed to provision asset psi-c0-osp16-test-autobot-ceph-mon
2021-03-23 10:00:31,808 ERROR [teflo.tasks.provision.run:69] 'dict' object has no attribute 'replace'
2021-03-23 10:00:31,809 ERROR [blaster.blast.run:90] A exception was raised while processing task: psi-c0-osp16-test-autobot-ceph-mon method: run
Traceback (most recent call last):
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/blaster/blast.py", line 83, in run
    value = getattr(task_obj, method)()
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo/tasks/provision.py", line 65, in run
    return self.provisioner.create()
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo/provisioners/asset_provisioner.py", line 86, in create
    res = self.plugin.create()
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo_openstack_client_plugin/os_client_provisioner.py", line 363, in create
    results.extend(self._process_create_results(result, cp_opt, name))
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo_openstack_client_plugin/os_client_provisioner.py", line 226, in _process_create_results
    resp = generate_cbn_response(resp, self.config_params.get('public_network', None))
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo_openstack_client_plugin/helpers/os_client_helper.py", line 109, in generate_cbn_response
    ip_add = parse_network_addresses_to_dict(r, public_net_key)
  File "/var/home/ghelling/src/oasis/C0/.tox/teflo/lib/python3.9/site-packages/teflo_openstack_client_plugin/helpers/os_client_helper.py", line 133, in parse_network_addresses_to_dict
    addresses = json_resp.get('addresses').replace(' ', '').split(';')
AttributeError: 'dict' object has no attribute 'replace'
@rujutashinde
Copy link
Collaborator

@greg-hellings yup I am working on this bug right now https://projects.engineering.redhat.com/browse/CCITCARBON-279
I will have the fix in develop branch once reviewed and will have it in the master next week

@rujutashinde
Copy link
Collaborator

closed with #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants