DatasourceNameInUse error

Bug #1492334 reported by Tim Hinrichs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
congress
Fix Released
Medium
Tim Hinrichs

Bug Description

When raising DatasourceNameInUse or DatasourceCreationError in managers/datasource.py in add_datasource, an error gets thrown:

2015-09-04 15:29:56.195 DEBUG congress.managers.datasource [req-aef25e7b-de7e-4410-adcd-584303fd8f35 admin 2ce6b3b11b364d419eac74353a57f2e6] updating db from (pid=47868) add_datasource /opt/stack/congress/congress/managers/datasource.py:50
2015-09-04 15:29:56.256 ERROR congress.exception [req-aef25e7b-de7e-4410-adcd-584303fd8f35 admin 2ce6b3b11b364d419eac74353a57f2e6] Exception in string format operation
2015-09-04 15:29:56.256 TRACE congress.exception Traceback (most recent call last):
2015-09-04 15:29:56.256 TRACE congress.exception File "/opt/stack/congress/congress/exception.py", line 77, in __init__
2015-09-04 15:29:56.256 TRACE congress.exception message = self.msg_fmt % kwargs
2015-09-04 15:29:56.256 TRACE congress.exception KeyError: 'name'
2015-09-04 15:29:56.256 TRACE congress.exception
2015-09-04 15:29:56.257 ERROR congress.exception [req-aef25e7b-de7e-4410-adcd-584303fd8f35 admin 2ce6b3b11b364d419eac74353a57f2e6] code: 409
2015-09-04 15:29:56.257 INFO API-datasource [req-aef25e7b-de7e-4410-adcd-584303fd8f35 admin 2ce6b3b11b364d419eac74353a57f2e6] Datasource Error: Datasource already in use with name %(name)s
2015-09-04 15:29:56.257 DEBUG congress.api.application [req-aef25e7b-de7e-4410-adcd-584303fd8f35 admin 2ce6b3b11b364d419eac74353a57f2e6] ApiApplication: found DataModelException Datasource already in use with name %(name)s from (pid=47868) __call__ /opt/stack/congress/congress/api/application.py:52

Tags: liberty-rc
Tim Hinrichs (thinrichs)
Changed in congress:
assignee: nobody → Tim Hinrichs (thinrichs)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to congress (master)

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

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

Reviewed: https://review.openstack.org/220700
Committed: https://git.openstack.org/cgit/openstack/congress/commit/?id=65b59ea54c30511290a4a9810020964d76d981b0
Submitter: Jenkins
Branch: master

commit 65b59ea54c30511290a4a9810020964d76d981b0
Author: Tim Hinrichs <email address hidden>
Date: Fri Sep 4 16:39:51 2015 -0700

    Unbreak master with 2 fixes in 1 commit

    1. Avoid double-use of 'name' value in exceptions

    Previously the Congress Exception used 'name' as the name of
    the error code to use and some of its subclasses used 'name'
    as a placeholder in the error message. This caused problems
    because CongressException popped 'name' off the keyword args
    in the super class, which meant it was unavailable during
    message construction. This was causing congress to fail
    to start in devstack.

    This change eliminates the use of 'name' in the subclasses.

    2. Fix nova datasource driver instantiation failure

    The nova client failed to load because an equality check
    on nova client was raising an exception. This was causing
    all unit tests using nova to fail.

    This fix replaces an implicit == check with an 'is' check.

    Closes-bug: 1492334
    Closes-bug: 1492051
    Change-Id: I8c166cd4db6d4c45d0709cb33a16bc3188d3d5eb

Changed in congress:
status: In Progress → Fix Committed
Tim Hinrichs (thinrichs)
Changed in congress:
milestone: none → liberty-rc2
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.