test_server_basic_ops failing with KeyErrors

Bug #1060373 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Critical
Jay Pipes

Bug Description

======================================================================
ERROR: test_001_create_keypair (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 42, in test_001_create_keypair
    self.keypair = self.compute_client.keypairs.create(kp_name)
  File "/opt/stack/python-novaclient/novaclient/v1_1/keypairs.py", line 58, in create
    return self._create('/os-keypairs', body, 'keypair')
  File "/opt/stack/python-novaclient/novaclient/base.py", line 148, in _create
    _resp, body = self.api.client.post(url, body=body)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 210, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 183, in _cs_request
    self.authenticate()
  File "/opt/stack/python-novaclient/novaclient/client.py", line 284, in authenticate
    keyring_key = "/".join(keys)
TypeError: sequence item 4: expected string, tuple found
-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:8774/v2/37a141c0960548d2ad0040e68fc6a9ca/servers/5a312a01-b6ce-418a-9236-17e2f6f93750
tempest.common.rest_client: ERROR: Request Body: None
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Tue, 02 Oct 2012 17:25:39 GMT', 'status': '404', 'content-length': '78', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-9c801787-79d0-4a40-8d27-1e23052e8c54'}
tempest.common.rest_client: ERROR: Response Body: {"itemNotFound": {"message": "The resource could not be found.", "code": 404}}
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_002_create_security_group (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 53, in test_002_create_security_group
    sg_desc)
  File "/opt/stack/python-novaclient/novaclient/v1_1/security_groups.py", line 43, in create
    return self._create('/os-security-groups', body, 'security_group')
  File "/opt/stack/python-novaclient/novaclient/base.py", line 148, in _create
    _resp, body = self.api.client.post(url, body=body)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 210, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 183, in _cs_request
    self.authenticate()
  File "/opt/stack/python-novaclient/novaclient/client.py", line 284, in authenticate
    keyring_key = "/".join(keys)
TypeError: sequence item 4: expected string, tuple found

======================================================================
ERROR: test_003_boot_instance (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 90, in test_003_boot_instance
    'key_name': self.get_resource('keypair').id
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'keypair'

======================================================================
ERROR: test_004_wait_on_active (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 103, in test_004_wait_on_active
    instance_id = self.get_resource('instance').id
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

======================================================================
ERROR: test_005_pause_server (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 107, in test_005_pause_server
    instance = self.get_resource('instance')
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

======================================================================
ERROR: test_006_unpause_server (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 115, in test_006_unpause_server
    instance = self.get_resource('instance')
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

======================================================================
ERROR: test_007_suspend_server (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 123, in test_007_suspend_server
    instance = self.get_resource('instance')
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

======================================================================
ERROR: test_008_resume_server (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 132, in test_008_resume_server
    instance = self.get_resource('instance')
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

======================================================================
ERROR: test_099_terminate_instance (tempest.tests.compute.test_server_basic_ops.TestServerBasicOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/compute/test_server_basic_ops.py", line 140, in test_099_terminate_instance
    instance = self.get_resource('instance')
  File "/home/jpipes/repos/tempest/tempest/test.py", line 57, in get_resource
    return self.resource_keys[key]
KeyError: 'instance'

After investigating, this is all due to a single erroneous trailing comma on line 130 in tempest/manager.py:

        service_type = self.config.compute.catalog_type,

Removing the trailing slash fixes the problem.

Changed in tempest:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/14066

Changed in tempest:
assignee: Sean Gallagher (torandu) → Jay Pipes (jaypipes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/14066
Committed: http://github.com/openstack/tempest/commit/444c3e64ed1347adcfc4204c1e585e2d91022722
Submitter: Jenkins
Branch: master

commit 444c3e64ed1347adcfc4204c1e585e2d91022722
Author: Jay Pipes <email address hidden>
Date: Thu Oct 4 19:26:35 2012 -0400

    Refactor list servers negative test and fix remaining gate bugs

    test_list_servers_negative had so many issues with it, it's hard
    to list them here... but at least the following has been fixed:

    * No longer will the test flatly delete all instances the tenant
      and alt tenant have during every test method run (!!)
    * Fixtures -- 2 active and 1 deleted server -- are created in the
      class' setUpClass() method instead of having test methods
      constantly re-launch instances -- this reduces the test time
      down about 3 minutes
    * Removed all non-negative tests
    * Removed all tests that were skipped due to bugs that have been
    * Skip the XML create_service() test for Identity Admin tests
      because of the upstream Keystone bug 1061738

    This patch also includes patches for bug fixes that Sean Gallagher
    contributed but needed to be rebased into this one in order
    to get the full gate to pass.

    Change-Id: I0b38cf045520d93031c7916dae2479daf69d0411
    fixes: LP bug #1059802
    fixes: LP bug #1060373
    fixes: LP bug #1061740
    fixes: LP bug #1061167

Changed in tempest:
status: In Progress → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.