unclear-error-message-on-lp-create

Bug #1498955 reported by Devdatta Kulkarni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
High
Devdatta Kulkarni

Bug Description

If a languagepack with a specific name already exists, then trying to create a new languagepack with that name fails as expected.

However, the error message on the CLI is not very informative.

Here is the stack trace from the api:

2015-09-23 14:43:36.728 6580 DEBUG oslo_db.sqlalchemy.engines [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:256
2015-09-23 14:43:36.744 6580 DEBUG wsme.api [-] Client-side error: The python resource already exists. format_exception /usr/local/lib/python2.7/dist-packages/wsme/api.py:221
2015-09-23 14:43:36.745 6580 ERROR solum.common.exception [-] c600560c-881d-40b2-b93c-928b53bd983d:The python resource already exists.
10.0.2.15 - - [23/Sep/2015 14:43:36] "POST /v1/language_packs HTTP/1.1" 409 375 0.187264

Here is the error message on the client:

vagrant@devstack:/opt/stack/solum$ !41
solum languagepack create python https://github.com/rackspace-solum-samples/solum-languagepack-python.git

ERROR: Your request could not be handled because of a problem in the server. Error Correlation id is: c600560c-881d-40b2-b93c-928b53bd983d

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

Also, we are seeing following exception line in the solum-api log:

2015-09-28_23:46:10.33248 2015-09-28 23:46:10.332 25349 ERROR solum.common.exception [-] 28efb80a-ca8f-4d3f-8b3b-511fc314b234:Unknown Error

This is happening because of incorrect exception wrapper that we are using to wrap solum controller methods.

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

Reviewed: https://review.openstack.org/225281
Committed: https://git.openstack.org/cgit/openstack/solum/commit/?id=4d469df2d9b292c9b013a043ddb12fe855877288
Submitter: Jenkins
Branch: master

commit 4d469df2d9b292c9b013a043ddb12fe855877288
Author: Devdatta Kulkarni <email address hidden>
Date: Fri Sep 18 13:52:52 2015 -0500

    Languagepack delete fixup to work with app

    1) Modified language_pack_handler's delete method to accommodate
    plans and that are created in the background as part
    of app deployment invocations.

    2) Added a check to ensure that languagepack is deleted only
    if it not being used by any apps and any plans

    3) Changed a exception wrapper on the language_pack_controller's
    methods as it was obscuring the real error message and causing
    a spurious exception line to be generated in the solum-api
    log (Bug: 1498955)

    Change-Id: Iaa71159f9af319e4bab8cdee8d11558a8ab00650
    Closes-Bug: #1497414
    Closes-Bug: #1498955

Changed in solum:
status: New → Fix Committed
Changed in solum:
assignee: nobody → Devdatta Kulkarni (devdatta-kulkarni)
milestone: none → 2015.1.2
Changed in solum:
milestone: 2015.1.2 → 4.0.0
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.