Bug 1659865 - dicover-tempest-config should configure options for heat-tempest-plugin
Summary: dicover-tempest-config should configure options for heat-tempest-plugin
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tempestconf
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: ---
Assignee: Chandan Kumar
QA Contact: Martin Kopec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-17 04:40 UTC by Keigo Noha
Modified: 2020-02-10 05:09 UTC (History)
4 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 645500 None None None 2019-04-24 13:48:31 UTC
OpenStack gerrit 673411 None None None 2019-07-31 14:15:58 UTC

Description Keigo Noha 2018-12-17 04:40:10 UTC
Description of problem:
dicover-tempest-config should add _member_ role to demo user in demo project.

The lack of the role assignment causes some tests in heat_tempest_plugin failed.


Version-Release number of selected component (if applicable):
python2-tempestconf-2.0.0-1.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Deploy an overcloud.
2. Setup tempest for the overcloud.
3. Make heat_plugin the only test for tempest.
4. Run tempest.

Actual results:
Several test are not passed by 'No auth_url configured'

Expected results:
All test which was stuck as 'No auth_url configured' are passed.

Additional info:
There is no additional information for the requirement of the role to demo user.

Comment 1 Chandan Kumar 2018-12-17 12:23:33 UTC
Thanks for reporting the bug, python-tempestconf currently lacks the support of generating tempest.conf for heat-tempest-plugin. I am marking this as a RFE and changing the component.
Currently, you can add the user role manually and pass it as a extra overrides with the discover-tempest-config cli.

Comment 3 Keigo Noha 2018-12-19 07:47:59 UTC
Hello Chandan,

Could you consider to include the following request?
Support side struggled how to write configuration for heat_plugin to run whole test properly.
If the configuration written in https://access.redhat.com/solutions/3559451 can be added by discover-tempest-config, it will be really helpful for the user and support side.

Best Regards,
Keigo Noha

Comment 4 Martin Kopec 2019-01-11 08:30:44 UTC
Hi Keigo,

we'll try to handle this RFE. Meanwhile, the configuration for heat_plugin needs to be added manually and that's either via python-tempest-config overrides [1]:
$ discover-tempest-config <parameters you normally use> service_available.heat_plugin True heat_plugin.username _member_  ...

or if you need to add more (all) of heat_plugin configuration options, so passing them via CLI would not be convenient, edit the tempest.conf file directly.


[1] https://docs.openstack.org/python-tempestconf/latest/user/usage.html#override-values

Regards,
Martin

Comment 6 Keigo Noha 2019-01-16 00:53:54 UTC
Hi Martin,

Thank you for your advice. I don't know that discover-tempest-config can add the parameter into it. As far as I know, some parameters are created by discover-tempest-config.
manual assignment to the command can set several predetermined values. But, the rest of the parameters need to be added into tempest.conf directly.
Currently, we have a temporary configuration guidance for heat_plugin. It is not a problem at this moment. So, I think this RFE will improve the user experience and ease to use tempest.

Regards,
Keigo Noha

Comment 19 Martin Kopec 2019-07-31 15:20:06 UTC
Based on my testing 'No auth_url configured' issue can be fixed by assigning 'member' role to demo user:
$ openstack role add --user demo --project demo member
It's also what the official tempest documentation suggests: https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/14/html-single/openstack_integration_test_suite_guide/index

I proposed a change to python-tempestconf so that it assigns the 'member' role to demo user: https://review.opendev.org/#/c/673411/

I noticed that the bug description is mentioning '_member_' role instead of 'member'. 
Rabi, could you, please, advise which role it should be?

I have one more question for you, Rabi, 3 tests failed with the following error (it can be seen in the upstream review 673411 and I also reproduced that in my RHOS deployment:

heat_tempest_plugin.tests.functional.test_encrypted_parameter.EncryptedParametersTest.test_db_encryption
heat_tempest_plugin.tests.functional.test_software_config.ParallelDeploymentsTest.test_deployments_metadata
heat_tempest_plugin.tests.functional.test_software_config.ParallelDeploymentsTest.test_deployments_timeout_failed

Traceback (most recent call last):
File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/heat_tempest_plugin/tests/functional/test_encrypted_parameter.py", line 61, in test_db_encryption
 parameters=parameters
File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/heat_tempest_plugin/common/test.py", line 689, in stack_create
 self._wait_for_stack_status(**kwargs)
File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/heat_tempest_plugin/common/test.py", line 442, in _wait_for_stack_status
 fail_regexp, is_action_cancelled):
File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/heat_tempest_plugin/common/test.py", line 405, in _verify_status
 stack_status_reason=stack.stack_status_reason)
heat_tempest_plugin.common.exceptions.StackBuildErrorException: Stack EncryptedParametersTest-201112037/10921462-ec36-43fa-9239-2ccbf286c77b is in CREATE_FAILED status due to 'Resource CREATE failed: ResourceInError: resources.server_with_encrypted_property: Went to status ERROR due to "Message: Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 7c9623b9-44ca-4c3d-8540-5423217fff45., Code: 500"'

I experimented a little and I found out that those 3 tests are passing when I copy heat_plugin.admin_username/admin_password to heat_plugin.username/password. It's weird, I thought that the plugin uses admin credentials when a test requires that. Or is there any other configuration step I need to do?

Thank you for your help!
Martin


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