functiontest test_component_get is failing sometimes

Bug #1342399 reported by Angus Salkeld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
High
Angus Salkeld

Bug Description

for an example see:
http://logs.openstack.org/28/106728/1/gate/gate-solum-devstack-dsvm-f20/7a783f1/console.html

2014-07-15 20:08:24.604 | 2014-07-15 20:08:22.811 | ======================================================================
2014-07-15 20:08:24.604 | 2014-07-15 20:08:22.813 | ERROR: functionaltests.api.v1.test_component.TestComponentController.test_components_get
2014-07-15 20:08:24.604 | 2014-07-15 20:08:22.815 | ----------------------------------------------------------------------
2014-07-15 20:08:24.605 | 2014-07-15 20:08:22.816 | _StringException: Traceback (most recent call last):
2014-07-15 20:08:24.605 | 2014-07-15 20:08:22.818 | File "/opt/stack/new/solum/functionaltests/api/v1/test_component.py", line 127, in test_components_get
2014-07-15 20:08:24.605 | 2014-07-15 20:08:22.820 | self._delete_component(uuid, assembly_uuid, plan_uuid)
2014-07-15 20:08:24.605 | 2014-07-15 20:08:22.822 | File "/opt/stack/new/solum/functionaltests/api/v1/test_component.py", line 47, in _delete_component
2014-07-15 20:08:24.605 | 2014-07-15 20:08:22.824 | self._delete_assembly(assembly_uuid, plan_uuid)
2014-07-15 20:08:24.606 | 2014-07-15 20:08:22.826 | File "/opt/stack/new/solum/functionaltests/api/v1/test_component.py", line 50, in _delete_assembly
2014-07-15 20:08:24.606 | 2014-07-15 20:08:22.827 | resp, body = self.client.delete('v1/assemblies/%s' % assembly_uuid)
2014-07-15 20:08:24.606 | 2014-07-15 20:08:22.829 | File "/opt/stack/new/tempest/tempest/common/rest_client.py", line 224, in delete
2014-07-15 20:08:24.606 | 2014-07-15 20:08:22.831 | return self.request('DELETE', url, extra_headers, headers, body)
2014-07-15 20:08:24.607 | 2014-07-15 20:08:22.833 | File "/opt/stack/new/tempest/tempest/common/rest_client.py", line 430, in request
2014-07-15 20:08:24.607 | 2014-07-15 20:08:22.834 | resp, resp_body)
2014-07-15 20:08:24.607 | 2014-07-15 20:08:22.836 | File "/opt/stack/new/tempest/tempest/common/rest_client.py", line 526, in _error_checker
2014-07-15 20:08:24.607 | 2014-07-15 20:08:22.838 | raise exceptions.ServerFault(message)
2014-07-15 20:08:24.608 | 2014-07-15 20:08:22.839 | ServerFault: Got server fault
2014-07-15 20:08:24.608 | 2014-07-15 20:08:22.841 | Details: {"debuginfo": null, "faultcode": "Server", "faultstring": "UPDATE statement on table 'assembly' expected to update 1 row(s); 0 were matched."}

Revision history for this message
Angus Salkeld (asalkeld) wrote :
Download full text (4.9 KiB)

logs from solum-api:

2014-07-15 20:08:08.896 27027 ERROR solum.openstack.common.db.sqlalchemy.session [-] DB exception wrapped.
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session Traceback (most recent call last):
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/opt/stack/new/solum/solum/openstack/common/db/sqlalchemy/session.py", line 576, in _wrap
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session return f(*args, **kwargs)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/opt/stack/new/solum/solum/openstack/common/db/sqlalchemy/session.py", line 799, in flush
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session return super(Session, self).flush(*args, **kwargs)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1824, in flush
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session self._flush(objects)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1942, in _flush
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session transaction.rollback(_capture_exception=True)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 58, in __exit__
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session compat.reraise(exc_type, exc_value, exc_tb)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1906, in _flush
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session flush_context.execute()
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session rec.execute(self)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 525, in execute
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session uow
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 59, in save_obj
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session mapper, table, update)
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 514, in _emit_update_statements
2014-07-15 20:08:08.896 27027 TRACE solum.openstack.common.db.sqlalchemy.session (table.description, len(update), rows))
2014-07-15 20:08:08.896 27027 T...

Read more...

Changed in solum:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Angus Salkeld (asalkeld) wrote :

I think the issue is a heat stack has not been created and the assembly is destroyed in the deployer, then the handler
tries to update the status of the assembly (that now does not exist).

Changed in solum:
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to solum (master)

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

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

Reviewed: https://review.openstack.org/107202
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=3e3039ab5a06547ffee4e35dfe02430a95a5f11c
Submitter: Jenkins
Branch: master

commit 3e3039ab5a06547ffee4e35dfe02430a95a5f11c
Author: Angus Salkeld <email address hidden>
Date: Wed Jul 16 09:32:37 2014 +1000

    Correct the order of assembly deletion

    If a heat stack has not been created (the case in some functional tests)
    deployer.delete_heat_stack() is fast and ends up deleting the assembly
    before the assembly handler has a chance to set the state to DELETING.

    This patch just sets the state to DELETING before calling delete_heat_stack()
    to prevent this.

    Change-Id: I2ba64c02f1d797327582b93229eb980617c3a504
    Closes-bug: #1342399

Changed in solum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in solum:
status: Fix Committed → Fix Released
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.