Bug 1730058 - AttributeError: 'str' object has no attribute 'decode'
Summary: AttributeError: 'str' object has no attribute 'decode'
Keywords:
Status: ON_DEV
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-novajoin-tests-tempest
Version: 15.0 (Stein)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Raildo Mascena de Sousa Filho
QA Contact: Pavan
URL:
Whiteboard:
Depends On:
Blocks: 1624486 1624488
TreeView+ depends on / blocked
 
Reported: 2019-07-15 18:15 UTC by Pavan
Modified: 2020-02-12 04:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
OpenStack gerrit 670829 None MERGED Removing decode(UTF-8) to make python compatible 2020-02-12 22:58:31 UTC

Description Pavan 2019-07-15 18:15:08 UTC
Description of problem:
The following novajoin_tempest_plugin tests end up with AttributeError: 'str' object has no attribute 'decode'

{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.test_hosts_are_registered [0.001313s] ... FAILED
{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.t
est_verify_compact_services_created [1.821128s] ... FAILED
{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.test_verify_controller_managed_services [0.500519s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/tests/scenario/test_tripleo_deployment.py", line 101, in test_verify_controller_managed_services'
    b'    verify_certs=True)'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py", line 246, in verify_managed_services'
    b'    self.verify_service(service, host, verify_certs)'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py", line 200, in verify_service'
    b'    self.verify_host_registered_with_ipa(host, add_domain=False)'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py", line 64, in wrapper_retry_with_timeout'
    b'    result = func(*args, **kwargs)'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py", line 75, in verify_host_registered_with_ipa'
    b'    result = self.ipa_client.find_host(host)'
    b'  File "/usr/lib/python3.6/site-packages/novajoin_tempest_plugin/ipa/ipa_client.py", line 166, in find_host'
    b"    params = [hostname.decode('UTF-8')]"
    b"AttributeError: 'str' object has no attribute 'decode'"
    b''


Version-Release number of selected component (if applicable):
RHOS_TRUNK-15.0-RHEL-8-20190708.n.2

How reproducible:


Steps to Reproduce:
1. Deploy RHOS-15 with 'passed_phase1' or the latest puddle
2. Install 'openstack-tempest-all' and 'python3-novajoin-tests-tempest' packages
3. source /home/stack/overcloudrc
4. On the undercloud /home/stack dir, create workspace for tempest

(undercloud) [stack@undercloud-0 ~]$ tempest init novajoin_tempest
2019-07-15 10:27:23.909 1025847 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf

5. cd novajoin_tempest
6. Configure the tempest.conf as per novajoin tempest tests 

discover-tempest-config --out etc/tempest.conf --deployer-input ~/tempest-deployer-input.conf --debug --create identity.uri $OS_AUTH_URL auth.admin_password $OS_PASSWORD auth.admin_username $OS_USERNAME auth.use_dynamic_credentials true network.tenant_network_cidr 172.17.2.0/24 validation.connect_method 'fixed' validation.network_for_ssh 'ctlplane' compute.allow_tenant_isolation 'True' object-storage.operator_role 'swiftoperator' novajoin.tripleo_controllers 'controller-0,controller-1,controller-2' novajoin.tripleo_computes 'compute-0,compute-1' novajoin.tripleo_undercloud 'undercloud-0' novajoin.flavor_tag baremetal image.image_path http://download-node-02.eng.bos.redhat.com/qa/rhts/lookaside/security-dfg/python-novajoin/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 image.http_image http://download-node-02.eng.bos.redhat.com/qa/rhts/lookaside/security-dfg/python-novajoin/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 validation.image_ssh_user fedora

7. execute novajoin tempest tests

(overcloud) [stack@undercloud-0 novajoin]$ tempest run --regex novajoin_tempest_plugin

Actual results:
{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.test_hosts_are_registered [0.001313s] ... FAILED
{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.t
est_verify_compact_services_created [1.821128s] ... FAILED
{2}novajoin_tempest_plugin.tests.scenario.test_tripleo_deployment.TripleOTest.test_verify_controller_managed_services [0.500519s] ... FAILED


Expected results:
Tests pass/ok

Additional info:
access the undercloud sos report here: https://drive.google.com/open?id=149fU1k9p52q9khOAWvprgiLxHbE8_T7P


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