tox tests fail intermittently on multiple runs

Bug #1294850 reported by Nikhil Manchanda
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Undecided
Nikhil Manchanda

Bug Description

When running the tox tests multiple time, some of the tox test tests (both fake and unit) fail intermittently because the error messages returned as part of the "Validation Error" response are in a different order than what the tests expect.

Output from one such failed run follows:

proboscis.case.MethodTest (tearDown) ... SKIP: Failure in <function test_bad_change_user_password at 0x4d94c08>

======================================================================
FAIL: proboscis.case.MethodTest (test_bad_change_user_password)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
    compatability.capture_type_error(s_func)
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
    func()
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
    func(test_case.state.get_state())
  File "/mnt/opt/stack/trove/trove/tests/api/mgmt/malformed_json.py", line 199, in test_bad_change_user_password
    % (password, password))
AssertionError: Validation error: users[0] 'password' is a required property; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'; users[0]['name'] u'' is too short != Validation error: users[0] 'password' is a required property; users[0]['name'] u'' is too short; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'
-------------------- >> begin captured stdout << ---------------------
CREATING os_admin @ %

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
trove.openstack.common.wsgi: DEBUG: Empty body provided in request
trove.common.wsgi: DEBUG: Getting schema for type:show
trove.instance.service: INFO: req : 'GET /v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143 HTTP/1.1

Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: localhost:8779
User-Agent: python-troveclient
X-Auth-Project-Id: 2500
X-Auth-Token: 2500
X-Identity-Status: Confirmed
X-Role: 2500
X-Tenant-Id: 2500
X-Tenant-Name: 2500
X-User-Id: 2500
X-User-Name: 2500'

trove.instance.service: INFO: Showing a database instance for tenant '2500'
trove.instance.service: INFO: id : '713cf3bd-52b3-4d0f-bf72-92ac0c107143'

trove.instance.models: INFO: datastore status=new
trove.instance.views: DEBUG: {'name': u'qe_instance', 'status': 'BUILD', 'volume': {'size': 1}, 'flavor': {'links': [{'rel': 'self', 'href': u'https://localhost:8779/v1.0/2500/flavors/1'}, {'rel': 'bookmark', 'href': u'https://localhost:8779/flavors/1'}], 'id': '1'}, 'links': [{'rel': 'self', 'href': u'https://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143'}, {'rel': 'bookmark', 'href': u'https://localhost:8779/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143'}], 'id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'datastore': {'type': u'mysql', 'version': u'mysql-5.5'}}
troveclient.compat.client: DEBUG: REQ: curl -i http://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143 -X GET -H "X-Auth-Token: 2500" -H "User-Agent: python-troveclient" -H "Content-Type: application/json" -H "X-Auth-Project-Id: 2500" -H "Accept: application/json"

troveclient.compat.client: DEBUG: RESP:{'content-location': u'http://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'content-type': 'application/json', 'content-length': '696', 'status': '200'} {"instance": {"name": "qe_instance", "status": "BUILD", "volume": {"size": 1}, "hostname": "713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay", "flavor": {"links": [{"rel": "self", "href": "https://localhost:8779/v1.0/2500/flavors/1"}, {"rel": "bookmark", "href": "https://localhost:8779/flavors/1"}], "id": "1"}, "created": "2014-03-19T20:33:32", "links": [{"rel": "self", "href": "https://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143"}, {"rel": "bookmark", "href": "https://localhost:8779/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143"}], "updated": "2014-03-19T20:33:32", "id": "713cf3bd-52b3-4d0f-bf72-92ac0c107143", "datastore": {"type": "mysql", "version": "mysql-5.5"}}}

trove.tests.fakes.nova: ERROR: Couldn't find server id None, collection={'FAKE_bdbe5bc5-cb20-4faf-8da1-803523cd7681': <trove.tests.fakes.nova.FakeServer object at 0x594a490>, 'FAKE_1d90b3d5-c22c-44c6-ab2c-a0d399865f8d': <trove.tests.fakes.nova.FakeServer object at 0x5ff51d0>, 'FAKE_cd84ce14-6551-4a6c-9359-9731b5f87ae5': <trove.tests.fakes.nova.FakeServer object at 0x5c6d490>, 'FAKE_c5f3e311-ab79-4800-8622-2d8a2f1521a9': <trove.tests.fakes.nova.FakeServer object at 0x57cf650>}
trove.instance.models: DEBUG: Could not find nova server_id(None)
trove.common.exception: ERROR: Cannot find compute instance None for instance dfcbfd93-dca5-4b14-a691-aac9d20ce5a3.
trove.instance.models: ERROR: COMPUTE ID = None
trove.tests.fakes.nova: ERROR: Couldn't find server id None, collection={'FAKE_bdbe5bc5-cb20-4faf-8da1-803523cd7681': <trove.tests.fakes.nova.FakeServer object at 0x594a490>, 'FAKE_1d90b3d5-c22c-44c6-ab2c-a0d399865f8d': <trove.tests.fakes.nova.FakeServer object at 0x5ff51d0>, 'FAKE_cd84ce14-6551-4a6c-9359-9731b5f87ae5': <trove.tests.fakes.nova.FakeServer object at 0x5c6d490>, 'FAKE_c5f3e311-ab79-4800-8622-2d8a2f1521a9': <trove.tests.fakes.nova.FakeServer object at 0x57cf650>}
trove.instance.models: INFO: service status=new
trove.instance.models: DEBUG: Setting instance dfcbfd93-dca5-4b14-a691-aac9d20ce5a3 to deleted...
trove.db.models: DEBUG: Saving DBInstance: {u'volume_id': u'FAKE_VOL_ff34c6c5-dc8b-4ee0-bdf0-7a1e2c6c6d1a', u'task_id': 1, u'name': u'test_SERVER_ERROR', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x5aa5750>, u'volume_size': 1, u'server_status': None, u'hostname': None, u'compute_instance_id': None, u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 153280), u'configuration_id': None, u'flavor_id': 1, 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 611608), u'task_start_time': None, u'task_description': 'No tasks for the instance.', u'datastore_version_id': u'b00000b0-00b0-0b00-00b0-000b000000bb', u'id': u'dfcbfd93-dca5-4b14-a691-aac9d20ce5a3', u'deleted_at': datetime.datetime(2014, 3, 19, 20, 33, 32, 609062), u'tenant_id': u'admin-1000', u'deleted': True}
trove.db.models: DEBUG: Deleting SecurityGroupRule: {u'parent_group_id': None, u'from_port': 3306, u'group_id': u'FAKE_SECGRP_fddc329b-2597-41c2-8c3f-3102a25eabea', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 219391), u'protocol': u'tcp', u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 629216), '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x57da610>, u'id': u'FAKE_SECGRP_RULE_527d42f7-17fb-4994-a7dd-be00d8faa3b2', u'deleted': False, u'deleted_at': None, u'cidr': u'0.0.0.0/0', u'to_port': 3306}
trove.instance.models: INFO: service status=new
trove.taskmanager.models: DEBUG: begin create_instance for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.db.models: DEBUG: Saving SecurityGroup: {u'name': u'SecGroup_713cf3bd-52b3-4d0f-bf72-92ac0c107143', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x61be3d0>, u'description': u'Security Group for 713cf3bd-52b3-4d0f-bf72-92ac0c107143', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 642354), u'user': u'2500', 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 642443), u'id': 'FAKE_SECGRP_dc0caebd-a451-455e-89ac-e0fd35941da2', u'tenant_id': u'2500', u'deleted': False}
trove.db.models: DEBUG: Saving SecurityGroupInstanceAssociation: {'_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x5c8e050>, u'instance_id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', u'security_group_id': 'FAKE_SECGRP_dc0caebd-a451-455e-89ac-e0fd35941da2', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 647094), 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 647206), u'id': '8bd4ec95-6da0-49c6-93f0-b3422ac030e1', u'deleted': False}
trove.db.models: DEBUG: Saving SecurityGroupRule: {u'from_port': 3306, u'group_id': 'FAKE_SECGRP_dc0caebd-a451-455e-89ac-e0fd35941da2', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 652230), u'protocol': 'tcp', 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 652311), '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x61c3fd0>, u'id': 'FAKE_SECGRP_RULE_6388ea60-8381-42e9-82f4-8aef3c85ae5c', u'to_port': 3306, u'cidr': '0.0.0.0/0', u'deleted': False}
trove.taskmanager.models: DEBUG: Successfully created security group for instance: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.taskmanager.models: DEBUG: begin _create_server_volume_individually for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.taskmanager.models: DEBUG: trove volume support = True
trove.taskmanager.models: INFO: Entering create_volume
trove.taskmanager.models: DEBUG: begin _create_volume for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.tests.fakes.nova: DEBUG: Fake volume created FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c with status BUILD
trove.tests.fakes.nova: INFO: FAKE_VOLUMES_DB : {'FAKE_VOL_a9290e27-3a22-4a42-adc4-c63a4954a900': FakeVolume(id=FAKE_VOL_a9290e27-3a22-4a42-adc4-c63a4954a900, size=2, name=mysql-043ee76a-37e8-4d40-8cc2-d9532108aa5c, description=mysql volume for 043ee76a-37e8-4d40-8cc2-d9532108aa5c, _current_status=in-use), 'FAKE_VOL_8093606c-86a3-4b2f-ba5d-8b95aed1fc52': FakeVolume(id=FAKE_VOL_8093606c-86a3-4b2f-ba5d-8b95aed1fc52, size=1, name=mysql-56264306-7de7-4c61-baa1-12005336291b, description=mysql volume for 56264306-7de7-4c61-baa1-12005336291b, _current_status=in-use), 'FAKE_VOL_385fcf86-0600-4cc5-93a8-608b23246c9e': FakeVolume(id=FAKE_VOL_385fcf86-0600-4cc5-93a8-608b23246c9e, size=13, name=mysql-0c9f0ede-5cda-40ac-b1e2-60245178bb2e, description=mysql volume for 0c9f0ede-5cda-40ac-b1e2-60245178bb2e, _current_status=BUILD), 'FAKE_VOL_9e5d90a5-3608-4e26-9366-4f7fc51dc728': FakeVolume(id=FAKE_VOL_9e5d90a5-3608-4e26-9366-4f7fc51dc728, size=9, name=mysql-e85c7742-46c4-41dc-8c07-4f23efa0d249, description=mysql volume for e85c7742-46c4-41dc-8c07-4f23efa0d249, _current_status=error), 'FAKE_VOL_0853e9c9-2e32-41aa-991b-26574bda60e2': FakeVolume(id=FAKE_VOL_0853e9c9-2e32-41aa-991b-26574bda60e2, size=1, name=mysql-0881443f-7389-4fd3-af0a-fdc080c492c3, description=mysql volume for 0881443f-7389-4fd3-af0a-fdc080c492c3, _current_status=in-use), 'FAKE_VOL_5663995f-649a-448d-9bc3-2a63f5825b96': FakeVolume(id=FAKE_VOL_5663995f-649a-448d-9bc3-2a63f5825b96, size=1, name=mysql-dcc56c54-1f6c-41e9-b126-c85120ac8275, description=mysql volume for dcc56c54-1f6c-41e9-b126-c85120ac8275, _current_status=in-use), 'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c': FakeVolume(id=FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c, size=1, name=mysql-713cf3bd-52b3-4d0f-bf72-92ac0c107143, description=mysql volume for 713cf3bd-52b3-4d0f-bf72-92ac0c107143, _current_status=BUILD), 'FAKE_VOL_e070901c-94c5-46ed-8485-f3703ae55674': FakeVolume(id=FAKE_VOL_e070901c-94c5-46ed-8485-f3703ae55674, size=1, name=mysql-4bcfcd54-f8e0-49d0-8089-6e69a5dd0497, description=mysql volume for 4bcfcd54-f8e0-49d0-8089-6e69a5dd0497, _current_status=in-use), 'FAKE_VOL_ff34c6c5-dc8b-4ee0-bdf0-7a1e2c6c6d1a': FakeVolume(id=FAKE_VOL_ff34c6c5-dc8b-4ee0-bdf0-7a1e2c6c6d1a, size=1, name=mysql-dfcbfd93-dca5-4b14-a691-aac9d20ce5a3, description=mysql volume for dfcbfd93-dca5-4b14-a691-aac9d20ce5a3, _current_status=available), 'FAKE_VOL_7e48713d-39c1-4491-b6ee-e9c1e79a322b': FakeVolume(id=FAKE_VOL_7e48713d-39c1-4491-b6ee-e9c1e79a322b, size=1, name=mysql-77b6d927-39e0-44d1-b9ad-d2068b4d346d, description=mysql volume for 77b6d927-39e0-44d1-b9ad-d2068b4d346d, _current_status=in-use), 'FAKE_VOL_f307e46b-d03b-4b9c-abaf-572c74641d2a': FakeVolume(id=FAKE_VOL_f307e46b-d03b-4b9c-abaf-572c74641d2a, size=5, name=mysql-514fa516-d0b3-476b-96f3-21774f5c7784, description=mysql volume for 514fa516-d0b3-476b-96f3-21774f5c7784, _current_status=in-use), 'FAKE_VOL_9611f578-d8a7-43a4-8b03-69404f1e73e7': FakeVolume(id=FAKE_VOL_9611f578-d8a7-43a4-8b03-69404f1e73e7, size=1, name=mysql-6e98116a-1b7e-4897-9300-6390d91edcc9, description=mysql volume for 6e98116a-1b7e-4897-9300-6390d91edcc9, _current_status=in-use), 'FAKE_VOL_0ba6041b-aafc-46ac-97dd-7b2c36f1faff': FakeVolume(id=FAKE_VOL_0ba6041b-aafc-46ac-97dd-7b2c36f1faff, size=2, name=mysql-16425ef1-8524-4978-a183-8e112751b59d, description=mysql volume for 16425ef1-8524-4978-a183-8e112751b59d, _current_status=in-use)}
trove.db.models: DEBUG: Saving DBInstance: {u'volume_id': 'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c', u'task_id': 5, u'name': u'qe_instance', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x5a9f210>, u'volume_size': 1, u'server_status': None, u'hostname': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay', u'compute_instance_id': None, u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 529013), u'configuration_id': None, u'flavor_id': 1, 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 660772), u'task_start_time': None, u'task_description': u'The instance is building.', u'datastore_version_id': u'b00000b0-00b0-0b00-00b0-000b000000bb', u'id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', u'deleted_at': None, u'tenant_id': u'2500', u'deleted': False}
trove.taskmanager.models: DEBUG: end _create_volume for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.taskmanager.models: DEBUG: Created volume FakeVolume(id=FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c, size=1, name=mysql-713cf3bd-52b3-4d0f-bf72-92ac0c107143, description=mysql volume for 713cf3bd-52b3-4d0f-bf72-92ac0c107143, _current_status=available)
trove.taskmanager.models: DEBUG: block_device = {'vdb': 'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c::1:1'}
trove.taskmanager.models: DEBUG: volume = [{'size': 1, 'id': 'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c'}]
trove.taskmanager.models: DEBUG: device_path = /dev/vdb
trove.taskmanager.models: DEBUG: mount_point = /var/lib/mysql
trove.tests.fakes.nova: INFO: FAKE_SERVERS_DB : {'FAKE_bdbe5bc5-cb20-4faf-8da1-803523cd7681': <trove.tests.fakes.nova.FakeServer object at 0x594a490>, 'FAKE_1d90b3d5-c22c-44c6-ab2c-a0d399865f8d': <trove.tests.fakes.nova.FakeServer object at 0x5ff51d0>, 'FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc': <trove.tests.fakes.nova.FakeServer object at 0x568fa10>, 'FAKE_cd84ce14-6551-4a6c-9359-9731b5f87ae5': <trove.tests.fakes.nova.FakeServer object at 0x5c6d490>, 'FAKE_c5f3e311-ab79-4800-8622-2d8a2f1521a9': <trove.tests.fakes.nova.FakeServer object at 0x57cf650>}
trove.taskmanager.models: DEBUG: Created new compute instance FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.db.models: DEBUG: Saving DBInstance: {u'volume_id': u'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c', u'task_id': 5, u'name': u'qe_instance', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x5c7ea90>, u'volume_size': 1, u'server_status': None, u'hostname': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay', u'compute_instance_id': 'FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 529013), u'configuration_id': None, u'flavor_id': 1, 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 670616), u'task_start_time': None, u'task_description': u'The instance is building.', u'datastore_version_id': u'b00000b0-00b0-0b00-00b0-000b000000bb', u'id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', u'deleted_at': None, u'tenant_id': u'2500', u'deleted': False}
trove.taskmanager.models: DEBUG: end _create_server_volume_individually for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.taskmanager.models: INFO: Entering guest_prepare
trove.tests.fakes.guestagent: DEBUG: users... []
trove.tests.fakes.guestagent: DEBUG: databases... [{'_name': u'firstdb', '_collate': u'latin2_general_ci', '_character_set': u'latin2'}]
trove.instance.models: INFO: Settting task status to NONE on instance 713cf3bd-52b3-4d0f-bf72-92ac0c107143...
trove.db.models: DEBUG: Saving DBInstance: {u'volume_id': u'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c', u'task_id': 1, u'name': u'qe_instance', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x61befd0>, u'volume_size': 1, u'server_status': None, u'hostname': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay', u'compute_instance_id': u'FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc', u'created': datetime.datetime(2014, 3, 19, 20, 33, 32, 529013), u'configuration_id': None, u'flavor_id': 1, 'errors': {}, u'updated': datetime.datetime(2014, 3, 19, 20, 33, 32, 681467), u'task_start_time': None, u'task_description': 'No tasks for the instance.', u'datastore_version_id': u'b00000b0-00b0-0b00-00b0-000b000000bb', u'id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', u'deleted_at': None, u'tenant_id': u'2500', u'deleted': False}
trove.taskmanager.models: DEBUG: <eventlet.greenthread.GreenThread object at 0x51769b0>: Creating dns entry for instance: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.taskmanager.models: DEBUG: trove dns support = True
trove.taskmanager.models: INFO: Polling for ip addresses: ${'private': [{'addr': '123.123.123.123'}]}
trove.taskmanager.models: INFO: Creating dns entry...
trove.tests.fakes.dns: DEBUG: Mapping instance_id 713cf3bd-52b3-4d0f-bf72-92ac0c107143 to hostname 713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay
trove.dns.manager: DEBUG: Creating entry address { name:713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay, content:None, type:A, zone:None }.
trove.tests.fakes.dns: DEBUG: Adding fake DNS entry for hostname 713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay.
trove.taskmanager.models: DEBUG: Successfully created DNS entry for instance: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.guestagent.models: DEBUG: Saving AgentHeartBeat: {'errors': {}, u'id': '8b748740-95b7-41dc-a072-657d2790ee98', '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x61cba10>, u'updated_at': datetime.datetime(2014, 3, 19, 20, 33, 32, 696294), u'instance_id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143'}
trove.taskmanager.models: DEBUG: Sending event: trove.instance.create, {'nova_volume_id': u'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c', 'state_description': 'BUILD', 'instance_id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'volume_size': 1, 'instance_name': u'qe_instance', 'instance_size': 512, 'created_at': '2014-03-19T20:33:32Z', 'tenant_id': u'2500', 'name': u'qe_instance', 'state': 'BUILD', 'instance_type': 'm1.tiny', 'launched_at': '2014-03-19T20:33:32Z', 'instance_type_id': 1, 'region': 'LOCAL_DEV', 'service_id': '123', 'nova_instance_id': u'FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc', 'availability_zone': 'nova', 'user_id': u'2500'}
trove.tests.util.usage: DEBUG: Received Usage Notification: {'event_type': 'trove.instance.create', 'priority': 'INFO', 'message_id': '8a8e7c22-82c9-409e-8dbf-d9f02421a08f', 'publisher_id': '0.0.0.0', 'payload': {'nova_volume_id': u'FAKE_VOL_092bc133-debc-4569-b033-16a20a918a9c', 'name': u'qe_instance', 'state': 'BUILD', 'state_description': 'BUILD', 'instance_id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'launched_at': '2014-03-19T20:33:32Z', 'instance_type_id': 1, 'region': 'LOCAL_DEV', 'service_id': '123', 'created_at': '2014-03-19T20:33:32Z', 'availability_zone': 'nova', 'user_id': u'2500', 'volume_size': 1, 'instance_name': u'qe_instance', 'instance_type': 'm1.tiny', 'nova_instance_id': u'FAKE_b95054bd-480b-4335-b6e8-71815bfc8bdc', 'instance_size': 512, 'tenant_id': u'2500'}, 'timestamp': '2014-03-19 20:33:32.707111'}
trove.tests.util.usage: DEBUG: Message Queue for 713cf3bd-52b3-4d0f-bf72-92ac0c107143 now has 1 messages
trove.taskmanager.models: DEBUG: end create_instance for id: 713cf3bd-52b3-4d0f-bf72-92ac0c107143
trove.openstack.common.wsgi: DEBUG: Empty body provided in request
trove.common.wsgi: DEBUG: Getting schema for type:show
trove.instance.service: INFO: req : 'GET /v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143 HTTP/1.1

Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: localhost:8779
User-Agent: python-troveclient
X-Auth-Project-Id: 2500
X-Auth-Token: 2500
X-Identity-Status: Confirmed
X-Role: 2500
X-Tenant-Id: 2500
X-Tenant-Name: 2500
X-User-Id: 2500
X-User-Name: 2500'

trove.instance.service: INFO: Showing a database instance for tenant '2500'
trove.instance.service: INFO: id : '713cf3bd-52b3-4d0f-bf72-92ac0c107143'

trove.instance.models: INFO: datastore status=running
trove.instance.views: DEBUG: {'name': u'qe_instance', 'status': 'ACTIVE', 'volume': {'size': 1}, 'flavor': {'links': [{'rel': 'self', 'href': u'https://localhost:8779/v1.0/2500/flavors/1'}, {'rel': 'bookmark', 'href': u'https://localhost:8779/flavors/1'}], 'id': '1'}, 'links': [{'rel': 'self', 'href': u'https://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143'}, {'rel': 'bookmark', 'href': u'https://localhost:8779/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143'}], 'id': u'713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'datastore': {'type': u'mysql', 'version': u'mysql-5.5'}}
troveclient.compat.client: DEBUG: REQ: curl -i http://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143 -X GET -H "X-Auth-Token: 2500" -H "User-Agent: python-troveclient" -H "Content-Type: application/json" -H "X-Auth-Project-Id: 2500" -H "Accept: application/json"

troveclient.compat.client: DEBUG: RESP:{'content-location': u'http://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143', 'content-type': 'application/json', 'content-length': '711', 'status': '200'} {"instance": {"name": "qe_instance", "status": "ACTIVE", "volume": {"size": 1, "used": 0.16}, "hostname": "713cf3bd-52b3-4d0f-bf72-92ac0c107143-lay", "flavor": {"links": [{"rel": "self", "href": "https://localhost:8779/v1.0/2500/flavors/1"}, {"rel": "bookmark", "href": "https://localhost:8779/flavors/1"}], "id": "1"}, "created": "2014-03-19T20:33:32", "links": [{"rel": "self", "href": "https://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143"}, {"rel": "bookmark", "href": "https://localhost:8779/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143"}], "updated": "2014-03-19T20:33:32", "id": "713cf3bd-52b3-4d0f-bf72-92ac0c107143", "datastore": {"type": "mysql", "version": "mysql-5.5"}}}

trove.common.wsgi: DEBUG: Getting schema for type:update_all
trove.common.wsgi: DEBUG: Found Schema: none
trove.common.wsgi: INFO: Validation error: users[0] 'password' is a required property; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'; users[0]['name'] u'' is too short
trove.common.wsgi: DEBUG: Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/common/wsgi.py", line 247, in execute_action
    self.controller.validate_request(action, action_args)
  File "/mnt/opt/stack/trove/trove/common/wsgi.py", line 395, in validate_request
    raise exception.BadRequest(message=error_msg)
BadRequest: Validation error: users[0] 'password' is a required property; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'; users[0]['name'] u'' is too short

trove.common.wsgi: DEBUG: Caught Trove Error Validation error: users[0] 'password' is a required property; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'; users[0]['name'] u'' is too short
trove.common.wsgi: DEBUG: Mapped Error to <class 'webob.exc.HTTPBadRequest'>
troveclient.compat.client: DEBUG: REQ: curl -i http://localhost:8779/v1.0/2500/instances/713cf3bd-52b3-4d0f-bf72-92ac0c107143/users PUT -H "X-Auth-Token: 2500" -H "User-Agent: python-troveclient" -H "Content-Type: application/json" -H "X-Auth-Project-Id: 2500" -H "Accept: application/json"

troveclient.compat.client: DEBUG: REQ BODY: {"users": [{"name": ""}]}

troveclient.compat.client: DEBUG: RESP:{'content-type': 'application/json; charset=UTF-8', 'content-length': '197', 'status': '400'} {"badRequest": {"code": 400, "message": "Validation error: users[0] 'password' is a required property; users[0]['name'] u'' does not match '^.*[0-9a-zA-Z]+.*$'; users[0]['name'] u'' is too short"}}

--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 322 tests in 14.054s

FAILED (SKIP=13, failures=1)
ERROR: InvocationError: '/mnt/opt/stack/trove/.tox/py27/bin/python run_tests.py'
py27 runtests: commands[1] | python setup.py testr --slowest
running testr
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --list
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmplkmq3N
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpWox62r
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpq076FW
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpI693ia
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpyjjiX4
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmp1XC1Ep
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmp9vcUDm
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpjUjJ2F
No handlers could be found for logger "trove.conductor.manager"
No handlers could be found for logger "trove.conductor.manager"
No handlers could be found for logger "trove.guestagent.strategies.storage.swift"
No handlers could be found for logger "trove.guestagent.strategies.storage.swift"
No handlers could be found for logger "trove.conductor.manager"
No handlers could be found for logger "trove.guestagent.backup.backupagent"
No handlers could be found for logger "trove.guestagent.backup.backupagent"
No handlers could be found for logger "trove.guestagent.backup.backupagent"
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_update_short_name
tags: worker-6
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 249, in test_validate_update_short_name
    self.assertThat(errors[1].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: process-returncode
tags: worker-6
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
======================================================================
FAIL: instance.test_instance_controller.TestInstanceController.test_validate_resize_instance_empty_url
tags: worker-7
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/instance/test_instance_controller.py", line 201, in test_validate_resize_instance_empty_url
    errors[0].path.pop())
  File "/mnt/opt/stack/trove/trove/tests/unittests/instance/test_instance_controller.py", line 57, in verify_errors
    self.assertThat(errors[i].message, Equals(msg[i]))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: !=:
reference = "'' is too short"
actual = "'' does not match 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\\\(\\\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'"
======================================================================
FAIL: process-returncode
tags: worker-7
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_update_user_complete
tags: worker-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 198, in test_validate_update_user_complete
    self.assertThat(errors[0].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_create_short_name
tags: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 87, in test_validate_create_short_name
    self.assertThat(errors[1].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: process-returncode
tags: worker-1
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
======================================================================
FAIL: process-returncode
tags: worker-0
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_update_short_password
tags: worker-4
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 185, in test_validate_update_short_password
    self.assertThat(errors[0].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_create_short_password
tags: worker-3
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 63, in test_validate_create_short_password
    self.assertThat(errors[0].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: mysql.test_user_controller.TestUserController.test_validate_update_user_with_db_short_password
tags: worker-3
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/opt/stack/trove/trove/tests/unittests/mysql/test_user_controller.py", line 211, in test_validate_update_user_with_db_short_password
    self.assertThat(errors[0].message, Equals("'' is too short"))
  File "/mnt/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: "'' is too short" != "'' does not match '^.*[0-9a-zA-Z]+.*$'"
======================================================================
FAIL: process-returncode
tags: worker-4
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
======================================================================
FAIL: process-returncode
tags: worker-3
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
Ran 636 tests in 4.517s (+0.171s)
FAILED (id=64, failures=13 (-5), skips=2)
error: testr failed (1)

description: updated
description: updated
summary: - tox fake tests fail intermittently on second run
+ tox tests fail intermittently on multiple runs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
assignee: nobody → Nikhil Manchanda (slicknik)
status: New → In Progress
Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

Isn't this bug a duplicate of 1291954 which has been marked as duplicate for this bug .....

Revision history for this message
vaibhav (vaibhav-bhatkar) wrote :

yes sushil, you are correct. This bug is duplicate of #1291954!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/81668
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=45a868aa63bac9a6cc22e17cb7b7c1b4950af1b3
Submitter: Jenkins
Branch: master

commit 45a868aa63bac9a6cc22e17cb7b7c1b4950af1b3
Author: Nikhil Manchanda <email address hidden>
Date: Wed Mar 19 16:16:13 2014 -0700

    Tox tests should not require errors in rigid order

    Fix the tox tests to not require Validation Error messages to be returned
    in a specific order. Since the order of validation errors can be
    non-deterministic, the tests should merely check for existence of the error.

    Change-Id: I615359cfb7129b2af9f22c43ad4475b53f7acab3
    Closes-bug: 1294850

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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