senlin local temptest fail

Bug #1678625 reported by XueFeng Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
XueFeng Liu

Bug Description

Maybe two reasons cause this problem:
1.Tempest use "use_dynamic_credentials=True" by default.
2.And in Ocata release "nova key-pair show" was changed.

In senlin gate, we can use "export KEEP_LOCALRC=1" to avoid this problem.
But in local temptest, it seems there is no good way to avoid.

Following is the log:
root@Nova:/opt/stack/tempest# ./run_tempest.sh -N senlin.tests.tempest.functional.test_node_basic.TestNodeUpdate.test_node_update_profile
WARNING: This script is deprecated and will be removed in the near future. Please migrate to tempest run or another method of launching a test runner
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --load-list /tmp/tmp6fGgbn
{0} senlin.tests.tempest.functional.test_node_basic.TestNodeUpdate.test_node_update_profile [2.137250s] ... FAILED

==============================
Failed 1 tests - output below:
==============================

senlin.tests.tempest.functional.test_node_basic.TestNodeUpdate.test_node_update_profile[functional,id-361e051d-b55b-4943-8a01-462f6fc5be43]
-------------------------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/opt/stack/senlin/senlin/tests/tempest/functional/test_node_basic.py", line 84, in setUp
        self.profile_id = utils.create_a_profile(self)
      File "/opt/stack/senlin/senlin/tests/tempest/common/utils.py", line 51, in create_a_profile
        res = base.client.create_obj('profiles', params)
      File "/opt/stack/senlin/senlin/tests/tempest/common/clustering_client.py", line 64, in create_obj
        resp, body = self.post(uri, body=jsonutils.dumps(attrs))
      File "tempest/lib/common/rest_client.py", line 276, in post
        return self.request('POST', url, extra_headers, headers, body, chunked)
      File "tempest/lib/common/rest_client.py", line 664, in request
        self._error_checker(resp, resp_body)
      File "tempest/lib/common/rest_client.py", line 827, in _error_checker
        message=message)
    tempest.lib.exceptions.ServerFault: Got server fault
    Details: No Keypair found for oskey

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2017-04-02 22:19:23,102 16387 INFO [tempest.lib.common.rest_client] Request (TestNodeUpdate:setUp): 500 POST http://172.16.1.62:8778/v1/profiles 2.133s
    2017-04-02 22:19:23,102 16387 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'openstack-api-version': 'clustering latest', 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
            Body: {"profile": {"metadata": null, "name": "tempest-created-profile-1810931689", "spec": {"version": "1.0", "type": "os.nova.server", "properties": {"key_name": "oskey", "flavor": "1", "name": "new-server-test", "image": "cirros-0.3.5-x86_64-disk", "networks": [{"network": "private"}]}}}}
        Response - Headers: {'status': '500', u'content-length': '238', 'content-location': 'http://172.16.1.62:8778/v1/profiles', u'date': 'Sun, 02 Apr 2017 14:19:23 GMT', u'content-type': 'application/json; charset=UTF-8', u'connection': 'close', u'x-openstack-request-id': 'req-b0ce955b-2281-492c-ab86-49fb64701dea'}
            Body: {"code": 500, "error": {"code": 500, "message": "No Keypair found for oskey", "type": "InternalError"}, "explanation": "The server has either erred or is incapable of performing the requested operation.", "title": "Internal Server Error"}

======
Totals
======
Ran: 1 tests in 14.0000 sec.
 - Passed: 0
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 1
Sum of execute time for each test: 2.1372 sec.

==============
Worker Balance
==============
 - Worker 0 (1 tests) => 0:00:02.137250

No tests were successful during the run

Revision history for this message
XueFeng Liu (jonnary-liu) wrote :

Maybe two reason cause this problem:
1.Temptest use "use_dynamic_credentials=True" by default.
2.And in Ocata release "nova key-pair show" was changed.

In senlin gate, we can use "export KEEP_LOCALRC=1" to avoid this problem.
But in local temptest, it seems there is no good way to avoid.

Changed in senlin:
assignee: nobody → XueFeng Liu (jonnary-liu)
status: New → In Progress
description: updated
description: updated
Revision history for this message
Qiming Teng (tengqim) wrote :

The api and functional tests are both based on tempest. However, they are supposed to run with openstack_test as the cloud_backend. If not, the real cloud backend will be invoked thus introducing some tempest specific authentication and parameter setting problems.

Changed in senlin:
status: In Progress → Opinion
Changed in senlin:
status: Opinion → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/455331
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=18c054a0437abe16818c6279f8e5fd4473d84d10
Submitter: Jenkins
Branch: master

commit 18c054a0437abe16818c6279f8e5fd4473d84d10
Author: jonnary <email address hidden>
Date: Fri Apr 14 15:02:05 2017 +0800

    Supports nova server non-admin integration test

    This patch supports nova server dynamical non-admin user integration test.

    Change-Id: I1df48dc4a7b430f199924c438a0a06fbaebc7a19
    Closes-Bug:#1678625
    Implements-blueprint:support-keypair-add-delete-and-solve-tempest

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 4.0.0.0b2

This issue was fixed in the openstack/senlin 4.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.