Error in taskmanager.test_pxc_clusters.PXCClusterTasksTest.test_shrink_cluster_does_not_exist

Bug #1549291 reported by Amrith Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Craig Vyvial

Bug Description

When this test is run, the DB API throws the following error. This does not look benign.

DBAPIError exception wrapped from (sqlite3.InterfaceError) Error binding parameter 0 - probably unsupported type. \
[SQL: u'SELECT instances.id AS instances_id, instances.created AS instances_created, instances.updated AS instance\
s_updated, instances.name AS instances_name, instances.hostname AS instances_hostname, instances.compute_instance_\
id AS instances_compute_instance_id, instances.task_id AS instances_task_id, instances.task_description AS instanc\
es_task_description, instances.task_start_time AS instances_task_start_time, instances.volume_id AS instances_volu\
me_id, instances.flavor_id AS instances_flavor_id, instances.volume_size AS instances_volume_size, instances.tenan\
t_id AS instances_tenant_id, instances.server_status AS instances_server_status, instances.deleted AS instances_de\
leted, instances.deleted_at AS instances_deleted_at, instances.datastore_version_id AS instances_datastore_version\
_id, instances.configuration_id AS instances_configuration_id, instances.slave_of_id AS instances_slave_of_id, ins\
tances.cluster_id AS instances_cluster_id, instances.shard_id AS instances_shard_id, instances.type AS instances_t\
ype \nFROM instances \nWHERE instances.id = ? AND instances.deleted = 0\n LIMIT ? OFFSET ?'] [parameters: (<Mock i\
d='140681201083344'>, 1, 0)]
Traceback (most recent call last):
  File "/opt/upstream/trove/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in \
_execute_context
    context)
  File "/opt/upstream/trove/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, i\
n do_execute
    cursor.execute(statement, parameters)
InterfaceError: Error binding parameter 0 - probably unsupported type.
*************************
Unhandled message logged from taskmanager.test_pxc_clusters.PXCClusterTasksTest.test_shrink_cluster_does_not_exist\
, oslo_db.sqlalchemy.exc_filters

Amrith Kumar (amrith)
Changed in trove:
assignee: nobody → Craig Vyvial (cp16net)
Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-3 → mitaka-rc1
Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-rc1 → mitaka-rc2
Revision history for this message
Craig Vyvial (cp16net) wrote :

This error is the effect of not mocking out the database call and the exception is printed out but the test passes as expected. There is no bad side effects other than the exception being printed out here. I'll patch this db call.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/296588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (stable/mitaka)

Change abandoned by Craig Vyvial (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/296588
Reason: Actually this is just a cosmetic change and i dont think is necessary to backport to mitaka.

Changed in trove:
status: Confirmed → In Progress
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/296591

Revision history for this message
Craig Vyvial (cp16net) wrote :

For further understand of why this sql call raises the exception is because i was using a mock object instead of a real id of the instance. "parameters: (<Mock id='140681201083344'>" so sql didnt know what to do with this. but this db call should have been mocked out any way.

Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-rc2 → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/296591
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=8e0b8ca55270cf188ebf7b72387118ce86d5bde7
Submitter: Jenkins
Branch: master

commit 8e0b8ca55270cf188ebf7b72387118ce86d5bde7
Author: Craig Vyvial <email address hidden>
Date: Wed Mar 23 11:20:09 2016 -0500

    clean up errors shown on galera cluster unittests

    Errors were being printed out in the unit tests because they were not
    mocked out. This cleans up the output of the unittests for galera
    clustering.

    Change-Id: I9d70e1853ead4d5c3d76556ba24319ff54122880
    Closes-Bug: #1549291

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/trove 6.0.0.0b2

This issue was fixed in the openstack/trove 6.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.